diff --git a/Gemfile.lock b/Gemfile.lock index 07a7c750fa..e935b41760 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -39,7 +39,7 @@ GEM prettyprint prettier_print (1.2.1) prettyprint (0.2.0) - prism (1.8.0) + prism (1.9.0) psych (5.3.1) date stringio @@ -60,7 +60,7 @@ GEM regexp_parser (2.10.0) reline (0.6.3) io-console (~> 0.5) - require-hooks (0.2.2) + require-hooks (0.2.3) rexml (3.4.4) rubocop (1.78.0) json (~> 2.3) @@ -89,15 +89,15 @@ GEM rubocop (>= 1) ruby-progressbar (1.13.0) ruby2_keywords (0.0.5) - sorbet (0.5.12230) - sorbet-static (= 0.5.12230) - sorbet-runtime (0.5.12230) - sorbet-static (0.5.12230-universal-darwin) - sorbet-static (0.5.12230-x86_64-linux) - sorbet-static-and-runtime (0.5.12230) - sorbet (= 0.5.12230) - sorbet-runtime (= 0.5.12230) - spoom (1.7.4) + sorbet (0.6.12913) + sorbet-static (= 0.6.12913) + sorbet-runtime (0.6.12913) + sorbet-static (0.6.12913-universal-darwin) + sorbet-static (0.6.12913-x86_64-linux) + sorbet-static-and-runtime (0.6.12913) + sorbet (= 0.6.12913) + sorbet-runtime (= 0.6.12913) + spoom (1.7.11) erubi (>= 1.10.0) prism (>= 0.28.0) rbi (>= 0.3.3) @@ -108,25 +108,25 @@ GEM stringio (3.2.0) syntax_tree (6.3.0) prettier_print (>= 1.2.0) - tapioca (0.17.7) + tapioca (0.17.10) benchmark bundler (>= 2.2.25) netrc (>= 0.11.0) parallel (>= 1.21.0) - rbi (>= 0.3.1) + rbi (>= 0.3.7) require-hooks (>= 0.2.2) sorbet-static-and-runtime (>= 0.5.11087) - spoom (>= 1.7.0) + spoom (>= 1.7.9) thor (>= 1.2.0) yard-sorbet test-unit (3.7.0) power_assert - thor (1.3.2) + thor (1.5.0) tsort (0.2.0) unicode-display_width (3.1.4) unicode-emoji (~> 4.0, >= 4.0.4) unicode-emoji (4.2.0) - yard (0.9.37) + yard (0.9.38) yard-sorbet (0.9.0) sorbet-runtime yard @@ -177,7 +177,7 @@ CHECKSUMS pp (0.6.3) sha256=2951d514450b93ccfeb1df7d021cae0da16e0a7f95ee1e2273719669d0ab9df6 prettier_print (1.2.1) sha256=a72838b5f23facff21f90a5423cdcdda19e4271092b41f4ea7f50b83929e6ff9 prettyprint (0.2.0) sha256=2bc9e15581a94742064a3cc8b0fb9d45aae3d03a1baa6ef80922627a0766f193 - prism (1.8.0) sha256=84453a16ef5530ea62c5f03ec16b52a459575ad4e7b9c2b360fd8ce2c39c1254 + prism (1.9.0) sha256=7b530c6a9f92c24300014919c9dcbc055bf4cdf51ec30aed099b06cd6674ef85 psych (5.3.1) sha256=eb7a57cef10c9d70173ff74e739d843ac3b2c019a003de48447b2963d81b1974 racc (1.8.1) sha256=4a7f6929691dbec8b5209a0b373bc2614882b55fc5d2e447a21aaa691303d62f rainbow (3.1.1) sha256=039491aa3a89f42efa1d6dec2fc4e62ede96eb6acd95e52f1ad581182b79bc6a @@ -187,7 +187,7 @@ CHECKSUMS rdoc (7.0.3) sha256=dfe3d0981d19b7bba71d9dbaeb57c9f4e3a7a4103162148a559c4fc687ea81f9 regexp_parser (2.10.0) sha256=cb6f0ddde88772cd64bff1dbbf68df66d376043fe2e66a9ef77fcb1b0c548c61 reline (0.6.3) sha256=1198b04973565b36ec0f11542ab3f5cfeeec34823f4e54cebde90968092b1835 - require-hooks (0.2.2) sha256=effa81b61a669ca00cb1e8910411e0d6a8bb16b49a53d9e69b5e6372d6c90f31 + require-hooks (0.2.3) sha256=224be5b4be0fd2a47cb73286c500da366704a54ec195b6627366380c950efac8 rexml (3.4.4) sha256=19e0a2c3425dfbf2d4fc1189747bdb2f849b6c5e74180401b15734bc97b5d142 rubocop (1.78.0) sha256=8b74a6f912eb4fd3e6878851f7f7f45dcad8c7185c34250d4f952b0ee80d6bc0 rubocop-ast (1.46.0) sha256=0da7f6ad5b98614f89b74f11873c191059c823eae07d6ffd40a42a3338f2232b @@ -198,21 +198,21 @@ CHECKSUMS ruby-lsp (0.26.5) ruby-progressbar (1.13.0) sha256=80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33 ruby2_keywords (0.0.5) sha256=ffd13740c573b7301cf7a2e61fc857b2a8e3d3aff32545d6f8300d8bae10e3ef - sorbet (0.5.12230) sha256=f13c654b498a2ce5dbfd2a87cb4d9311fdf7a8c9e2639abfcd83b685d268e093 - sorbet-runtime (0.5.12230) sha256=06cd707492495a66a4a94ba5d4a1da3d74c698328ac0274a072a49980368eba5 - sorbet-static (0.5.12230-universal-darwin) sha256=ca632252d853c7523ae0a1a7c806d7518848ee05cf234b65114f6c5295519021 - sorbet-static (0.5.12230-x86_64-linux) sha256=5525a2e9e870020ddb668c3ed2dbff1839817015b2482d934aa456182e287266 - sorbet-static-and-runtime (0.5.12230) sha256=afea11eddbe145806354f6b4060d7883bf4dcc7015fdd463eb401bdbc9b7be7f - spoom (1.7.4) sha256=9755877653a9be409dacf1663e97617734bc1607e3237866bcd7d4a9f23f68fb + sorbet (0.6.12913) sha256=259e28215af2b80bf530d3b6af1c509ddadcdef6fa34417a9afd315f76d4eaf4 + sorbet-runtime (0.6.12913) sha256=b07b29c4070e7729fcda55f42ca2cf76ed369537be6680b36208e66c17934ff1 + sorbet-static (0.6.12913-universal-darwin) sha256=bc064e1930f3736d7f7ded8ff7631c43d8d66681540be7103e1a3faaa08cc10f + sorbet-static (0.6.12913-x86_64-linux) sha256=8c9db957392b706e85c2e597ede567e64d46859dd6ae3ef9901e3894e971a49c + sorbet-static-and-runtime (0.6.12913) sha256=63b3c66aa107b4b1aea689b23690ad4d8b1a7b29f6cfcd16222fa1c436c555c9 + spoom (1.7.11) sha256=4e27384af6d3fde5aadc0287c51e6f76c0802259cbb3b6a67603bf718352f4cf stringio (3.2.0) sha256=c37cb2e58b4ffbd33fe5cd948c05934af997b36e0b6ca6fdf43afa234cf222e1 syntax_tree (6.3.0) sha256=56e25a9692c798ec94c5442fe94c5e94af76bef91edc8bb02052cbdecf35f13d - tapioca (0.17.7) sha256=1efb7be004f269a9cf23c97ed419338598bddfd653e3a5ac0760694e0ebfba9b + tapioca (0.17.10) sha256=880a682ca8314f798dd09e9f104134fbf1a713c13be51f7dd4741dd434e6471b test-unit (3.7.0) sha256=2b5745498c848768e1774acb63e3806d3bb47e2943bd91cc9bf559b4c6d4faa1 - thor (1.3.2) sha256=eef0293b9e24158ccad7ab383ae83534b7ad4ed99c09f96f1a6b036550abbeda + thor (1.5.0) sha256=e3a9e55fe857e44859ce104a84675ab6e8cd59c650a49106a05f55f136425e73 tsort (0.2.0) sha256=9650a793f6859a43b6641671278f79cfead60ac714148aabe4e3f0060480089f unicode-display_width (3.1.4) sha256=8caf2af1c0f2f07ec89ef9e18c7d88c2790e217c482bfc78aaa65eadd5415ac1 unicode-emoji (4.2.0) sha256=519e69150f75652e40bf736106cfbc8f0f73aa3fb6a65afe62fefa7f80b0f80f - yard (0.9.37) sha256=a6e910399e78e613f80ba9add9ba7c394b1a935f083cccbef82903a3d2a26992 + yard (0.9.38) sha256=721fb82afb10532aa49860655f6cc2eaa7130889df291b052e1e6b268283010f yard-sorbet (0.9.0) sha256=03d1aa461b9e9c82b886919a13aa3e09fcf4d1852239d2967ed97e92723ffe21 BUNDLED WITH diff --git a/project-words b/project-words index f3de6515b5..291d5a3e40 100644 --- a/project-words +++ b/project-words @@ -117,6 +117,7 @@ unaliased unindexed unparser unresolve +VALIDRUBY vcall Vinicius vscodemachineid diff --git a/sorbet/rbi/gems/ast@2.4.3.rbi b/sorbet/rbi/gems/ast@2.4.3.rbi index ffa2080ab2..c05e587e48 100644 --- a/sorbet/rbi/gems/ast@2.4.3.rbi +++ b/sorbet/rbi/gems/ast@2.4.3.rbi @@ -234,9 +234,9 @@ class AST::Node # # If the resulting node would be identical to `self`, does nothing. # - # @param type [Symbol, nil] # @param children [Array, nil] # @param properties [Hash, nil] + # @param type [Symbol, nil] # @return [AST::Node] # # source://ast//lib/ast/node.rb#133 diff --git a/sorbet/rbi/gems/mocha@2.7.1.rbi b/sorbet/rbi/gems/mocha@2.7.1.rbi index 5e60d0561d..31364344aa 100644 --- a/sorbet/rbi/gems/mocha@2.7.1.rbi +++ b/sorbet/rbi/gems/mocha@2.7.1.rbi @@ -112,13 +112,6 @@ module Mocha::API # Specify that an expected invocation must occur within a named {Sequence} by calling {Expectation#in_sequence} # on each expectation or by passing a block within which all expectations should be constrained by the {Sequence}. # - # @example Ensure methods on egg are invoked in correct order. - # breakfast = sequence('breakfast') - # - # egg = mock('egg') - # egg.expects(:crack).in_sequence(breakfast) - # egg.expects(:fry).in_sequence(breakfast) - # egg.expects(:eat).in_sequence(breakfast) # @example Ensure methods across multiple objects are invoked in correct order. # sequence = sequence(:task_order) # @@ -130,6 +123,13 @@ module Mocha::API # # task_one.execute # task_two.execute + # @example Ensure methods on egg are invoked in correct order. + # breakfast = sequence('breakfast') + # + # egg = mock('egg') + # egg.expects(:crack).in_sequence(breakfast) + # egg.expects(:fry).in_sequence(breakfast) + # egg.expects(:eat).in_sequence(breakfast) # @example Ensure methods on egg are invoked in the correct order using a block. # egg = mock('egg') # sequence('breakfast') do @@ -1175,6 +1175,12 @@ class Mocha::Expectation # Modifies expectation so that when the expected method is called, it raises the specified +exception+ with the specified +message+ i.e. calls +Kernel#raise(exception, message)+. # + # @example Raise an exception on first invocation of expected method and then return values on subsequent invocations. + # object = stub() + # object.stubs(:expected_method).raises(Exception).then.returns(2, 3) + # object.expected_method # => raises exception of class Exception1 + # object.expected_method # => 2 + # object.expected_method # => 3 # @example Raise custom exception with extra constructor parameters by passing in an instance of the exception. # object = stub() # object.stubs(:expected_method).raises(MyException.new('message', 1, 2, 3)) @@ -1188,36 +1194,20 @@ class Mocha::Expectation # object = stub() # object.stubs(:expected_method).raises(Exception, 'message') # object.expected_method # => raises exception of class Exception and with message 'message' - # @example Raise an exception on first invocation of expected method and then return values on subsequent invocations. - # object = stub() - # object.stubs(:expected_method).raises(Exception).then.returns(2, 3) - # object.expected_method # => raises exception of class Exception1 - # object.expected_method # => 2 - # object.expected_method # => 3 # @overload raises # @overload raises # @overload raises # @param exception [Class, Exception, String, #exception] exception to be raised or message to be passed to RuntimeError. # @param message [String] exception message. # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. - # @see Kernel#raise # @see #then + # @see Kernel#raise # # source://mocha//lib/mocha/expectation.rb#483 def raises(exception = T.unsafe(nil), message = T.unsafe(nil)); end # Modifies expectation so that when the expected method is called, it returns the specified +value+. # - # @example Return the same value on every invocation. - # object = mock() - # object.stubs(:stubbed_method).returns('result') - # object.stubbed_method # => 'result' - # object.stubbed_method # => 'result' - # @example Return a different value on consecutive invocations. - # object = mock() - # object.stubs(:stubbed_method).returns(1, 2) - # object.stubbed_method # => 1 - # object.stubbed_method # => 2 # @example Alternative way to return a different value on consecutive invocations. # object = mock() # object.stubs(:expected_method).returns(1, 2).then.returns(3) @@ -1236,6 +1226,16 @@ class Mocha::Expectation # x, y = object.expected_method # x # => 1 # y # => 2 + # @example Return a different value on consecutive invocations. + # object = mock() + # object.stubs(:stubbed_method).returns(1, 2) + # object.stubbed_method # => 1 + # object.stubbed_method # => 2 + # @example Return the same value on every invocation. + # object = mock() + # object.stubs(:stubbed_method).returns('result') + # object.stubbed_method # => 'result' + # object.stubbed_method # => 'result' # @overload returns # @overload returns # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. @@ -1276,14 +1276,6 @@ class Mocha::Expectation # Modifies expectation so that when the expected method is called, it throws the specified +tag+ with the specific return value +object+ i.e. calls +Kernel#throw(tag, object)+. # - # @example Throw tag with return value +object+ c.f. +Kernel#throw+. - # object = stub() - # object.stubs(:expected_method).throws(:done, 'result') - # object.expected_method # => throws tag :done and causes catch block to return 'result' - # @example Throw tag when expected method is invoked. - # object = stub() - # object.stubs(:expected_method).throws(:done) - # object.expected_method # => throws tag :done # @example Throw different tags on consecutive invocations of the expected method. # object = stub() # object.stubs(:expected_method).throws(:done).then.throws(:continue) @@ -1295,38 +1287,46 @@ class Mocha::Expectation # object.expected_method # => throws :done # object.expected_method # => 2 # object.expected_method # => 3 + # @example Throw tag when expected method is invoked. + # object = stub() + # object.stubs(:expected_method).throws(:done) + # object.expected_method # => throws tag :done + # @example Throw tag with return value +object+ c.f. +Kernel#throw+. + # object = stub() + # object.stubs(:expected_method).throws(:done, 'result') + # object.expected_method # => throws tag :done and causes catch block to return 'result' # @overload throw # @overload throw - # @param tag [Symbol, String] tag to throw to transfer control to the active catch block. # @param object [Object] return value for the catch block. + # @param tag [Symbol, String] tag to throw to transfer control to the active catch block. # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. - # @see Kernel#throw # @see #then + # @see Kernel#throw # # source://mocha//lib/mocha/expectation.rb#522 def throws(tag, object = T.unsafe(nil)); end # Modifies expectation so that the number of calls to the expected method must be within a specific +range+. # - # @example Specifying a specific number of expected invocations. + # @example Specifying a range in the number of expected invocations. # object = mock() - # object.expects(:expected_method).times(3) + # object.expects(:expected_method).times(2..4) # 3.times { object.expected_method } # # => verify succeeds # # object = mock() - # object.expects(:expected_method).times(3) - # 2.times { object.expected_method } + # object.expects(:expected_method).times(2..4) + # object.expected_method # # => verify fails - # @example Specifying a range in the number of expected invocations. + # @example Specifying a specific number of expected invocations. # object = mock() - # object.expects(:expected_method).times(2..4) + # object.expects(:expected_method).times(3) # 3.times { object.expected_method } # # => verify succeeds # # object = mock() - # object.expects(:expected_method).times(2..4) - # object.expected_method + # object.expects(:expected_method).times(3) + # 2.times { object.expected_method } # # => verify fails # @param range [Range, Integer] specifies the allowable range in the number of expected invocations. # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. @@ -1384,9 +1384,9 @@ class Mocha::Expectation # radio.expects(:switch_off).then(power.is('off')) # @param state_predicate [StateMachine::StatePredicate] +state_machine.is(state_name)+ provides a mechanism to determine whether the +state_machine+ is in the state specified by +state_predicate+ when the expected method is invoked. # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. + # @see #then # @see API#states # @see StateMachine - # @see #then # # source://mocha//lib/mocha/expectation.rb#581 def when(state_predicate); end @@ -1426,6 +1426,21 @@ class Mocha::Expectation # object.expects(:expected_method).with(includes('string2'), anything) # object.expected_method(['string1'], 'any-old-value') # # => verify fails + # @example Extracting a custom matcher into an instance method on the test class. + # class MyTest < Minitest::Test + # def test_expected_method_is_called_with_a_value_divisible_by_4 + # object = mock() + # object.expects(:expected_method).with(&method(:divisible_by_4)) + # object.expected_method(16) + # # => verify succeeds + # end + # + # private + # + # def divisible_by_4(value) + # value % 4 == 0 + # end + # end # @example Loose keyword argument matching (default) # # class Example @@ -1460,25 +1475,10 @@ class Mocha::Expectation # object.expects(:expected_method).with() { |value| value % 4 == 0 } # object.expected_method(17) # # => verify fails - # @example Extracting a custom matcher into an instance method on the test class. - # class MyTest < Minitest::Test - # def test_expected_method_is_called_with_a_value_divisible_by_4 - # object = mock() - # object.expects(:expected_method).with(&method(:divisible_by_4)) - # object.expected_method(16) - # # => verify succeeds - # end - # - # private - # - # def divisible_by_4(value) - # value % 4 == 0 - # end - # end # @param expected_parameters_or_matchers [Array] expected parameter values or parameter matchers. # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. - # @see ParameterMatchers # @see Configuration#strict_keyword_argument_matching= + # @see ParameterMatchers # @yield optional block specifying custom matching. # @yieldparam actual_parameters [Array] parameters with which expected method was invoked. # @yieldreturn [Boolean] +true+ if +actual_parameters+ are acceptable; +false+ otherwise. @@ -1528,18 +1528,6 @@ class Mocha::Expectation # # May be called multiple times on the same expectation for consecutive invocations. # - # @example Yield when expected method is invoked. - # benchmark = mock() - # benchmark.expects(:measure).yields - # yielded = false - # benchmark.measure { yielded = true } - # yielded # => true - # @example Yield parameters when expected method is invoked. - # fibonacci = mock() - # fibonacci.expects(:next_pair).yields(0, 1) - # sum = 0 - # fibonacci.next_pair { |first, second| sum = first + second } - # sum # => 1 # @example Yield different parameters on different invocations of the expected method. # fibonacci = mock() # fibonacci.expects(:next_pair).yields(0, 1).then.yields(1, 1) @@ -1548,6 +1536,18 @@ class Mocha::Expectation # sum # => 1 # fibonacci.next_pair { |first, second| sum = first + second } # sum # => 2 + # @example Yield parameters when expected method is invoked. + # fibonacci = mock() + # fibonacci.expects(:next_pair).yields(0, 1) + # sum = 0 + # fibonacci.next_pair { |first, second| sum = first + second } + # sum # => 1 + # @example Yield when expected method is invoked. + # benchmark = mock() + # benchmark.expects(:measure).yields + # yielded = false + # benchmark.measure { yielded = true } + # yielded # => true # @param parameters [*Array] parameters to be yielded. # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. # @see #then @@ -1665,10 +1665,10 @@ end # # See the code in the +Adapter+ modules for examples of how to use the methods in this module. +Mocha::ExpectationErrorFactory+ may be used if you want +Mocha+ to raise a different type of exception. # -# @see Mocha::Integration::TestUnit::Adapter -# @see Mocha::Integration::Minitest::Adapter -# @see Mocha::ExpectationErrorFactory # @see Mocha::API +# @see Mocha::ExpectationErrorFactory +# @see Mocha::Integration::Minitest::Adapter +# @see Mocha::Integration::TestUnit::Adapter # # source://mocha//lib/mocha/hooks.rb#18 module Mocha::Hooks @@ -2026,15 +2026,15 @@ class Mocha::Mock # object = mock() # object.expects(:expected_method) # object.expected_method - # @example Expected method not invoked so error raised - # object = mock() - # object.expects(:expected_method) - # # error raised when test completes, because expected_method not called exactly once # @example Expected method invoked twice so error raised # object = mock() # object.expects(:expected_method) # object.expected_method # object.expected_method # => error raised when expected method invoked second time + # @example Expected method not invoked so error raised + # object = mock() + # object.expects(:expected_method) + # # error raised when test completes, because expected_method not called exactly once # @example Setup multiple expectations using +expected_methods_vs_return_values+. # object = mock() # object.expects(expected_method_one: :result_one, expected_method_two: :result_two) @@ -2116,15 +2116,15 @@ class Mocha::Mock # object = mock() # object.expects(:expected_method) # object.expected_method - # @example Expected method not invoked so error raised - # object = mock() - # object.expects(:expected_method) - # # error raised when test completes, because expected_method not called exactly once # @example Expected method invoked twice so error raised # object = mock() # object.expects(:expected_method) # object.expected_method # object.expected_method # => error raised when expected method invoked second time + # @example Expected method not invoked so error raised + # object = mock() + # object.expects(:expected_method) + # # error raised when test completes, because expected_method not called exactly once # @example Setup multiple expectations using +expected_methods_vs_return_values+. # object = mock() # object.expects(expected_method_one: :result_one, expected_method_two: :result_two) @@ -2178,19 +2178,6 @@ class Mocha::Mock # sheep.chew # sheep.foo # # no error raised - # @example Using {#responds_like} with an instance method - # class Sheep - # def chew(grass); end - # end - # - # sheep = mock('sheep') - # sheep.responds_like(Sheep.new) - # sheep.expects(:chew) - # sheep.expects(:foo) - # sheep.respond_to?(:chew) # => true - # sheep.respond_to?(:foo) # => false - # sheep.chew - # sheep.foo # => raises NoMethodError exception # @example Using {#responds_like} with a class method # class Sheep # def self.number_of_legs; end @@ -2204,6 +2191,19 @@ class Mocha::Mock # sheep_class.respond_to?(:foo) # => false # sheep_class.number_of_legs # => 4 # sheep_class.foo # => raises NoMethodError exception + # @example Using {#responds_like} with an instance method + # class Sheep + # def chew(grass); end + # end + # + # sheep = mock('sheep') + # sheep.responds_like(Sheep.new) + # sheep.expects(:chew) + # sheep.expects(:foo) + # sheep.respond_to?(:chew) # => true + # sheep.respond_to?(:foo) # => false + # sheep.chew + # sheep.foo # => raises NoMethodError exception # @param responder [Object, #respond_to?] an object used to determine whether {Mock} instance should +#respond_to?+ to an invocation. # @return [Mock] the same {Mock} instance, thereby allowing invocations of other {Mock} methods to be chained. # @see #responds_like_instance_of @@ -2259,19 +2259,6 @@ class Mocha::Mock # sheep.chew # sheep.foo # # no error raised - # @example Using {#responds_like} with an instance method - # class Sheep - # def chew(grass); end - # end - # - # sheep = mock('sheep') - # sheep.responds_like(Sheep.new) - # sheep.expects(:chew) - # sheep.expects(:foo) - # sheep.respond_to?(:chew) # => true - # sheep.respond_to?(:foo) # => false - # sheep.chew - # sheep.foo # => raises NoMethodError exception # @example Using {#responds_like} with a class method # class Sheep # def self.number_of_legs; end @@ -2285,6 +2272,19 @@ class Mocha::Mock # sheep_class.respond_to?(:foo) # => false # sheep_class.number_of_legs # => 4 # sheep_class.foo # => raises NoMethodError exception + # @example Using {#responds_like} with an instance method + # class Sheep + # def chew(grass); end + # end + # + # sheep = mock('sheep') + # sheep.responds_like(Sheep.new) + # sheep.expects(:chew) + # sheep.expects(:foo) + # sheep.respond_to?(:chew) # => true + # sheep.respond_to?(:foo) # => false + # sheep.chew + # sheep.foo # => raises NoMethodError exception # @param responder [Object, #respond_to?] an object used to determine whether {Mock} instance should +#respond_to?+ to an invocation. # @return [Mock] the same {Mock} instance, thereby allowing invocations of other {Mock} methods to be chained. # @see #responds_like_instance_of @@ -2650,16 +2650,16 @@ end module Mocha::ParameterMatchers # Matches if +matcher+ does *not* match. # - # @example Actual parameter does not include the value +1+. - # object = mock() - # object.expects(:method_1).with(Not(includes(1))) - # object.method_1([0, 2, 3]) - # # no error raised # @example Actual parameter does include the value +1+. # object = mock() # object.expects(:method_1).with(Not(includes(1))) # object.method_1([0, 1, 2, 3]) # # error raised, because method_1 was not called with object not including 1 + # @example Actual parameter does not include the value +1+. + # object = mock() + # object.expects(:method_1).with(Not(includes(1))) + # object.method_1([0, 2, 3]) + # # no error raised # @param matcher [Base] matcher whose logic to invert. # @return [Not] parameter matcher. # @see Expectation#with @@ -2688,6 +2688,11 @@ module Mocha::ParameterMatchers # Matches if any +matchers+ match. # + # @example Neither parameter matcher matches. + # object = mock() + # object.expects(:method_1).with(any_of(1, 3)) + # object.method_1(2) + # # error raised, because method_1 was not called with 1 or 3 # @example One parameter matcher matches. # object = mock() # object.expects(:method_1).with(any_of(1, 3)) @@ -2698,11 +2703,6 @@ module Mocha::ParameterMatchers # object.expects(:method_1).with(any_of(1, 3)) # object.method_1(3) # # no error raised - # @example Neither parameter matcher matches. - # object = mock() - # object.expects(:method_1).with(any_of(1, 3)) - # object.method_1(2) - # # error raised, because method_1 was not called with 1 or 3 # @param matchers [*Array] parameter matchers. # @return [AnyOf] parameter matcher. # @see Expectation#with @@ -2745,16 +2745,16 @@ module Mocha::ParameterMatchers # Matches any +Object+ equalling +value+. # - # @example Actual parameter equals expected parameter. - # object = mock() - # object.expects(:method_1).with(equals(2)) - # object.method_1(2) - # # no error raised # @example Actual parameter does not equal expected parameter. # object = mock() # object.expects(:method_1).with(equals(2)) # object.method_1(3) # # error raised, because method_1 was not called with an +Object+ that equals 2 + # @example Actual parameter equals expected parameter. + # object = mock() + # object.expects(:method_1).with(equals(2)) + # object.method_1(2) + # # no error raised # @param value [Object] expected value. # @return [Equals] parameter matcher. # @see Expectation#with @@ -2803,27 +2803,27 @@ module Mocha::ParameterMatchers # Matches +Hash+ containing entry with +key+ and +value+. # - # @example Actual parameter contains expected entry supplied as key and value. - # object = mock() - # object.expects(:method_1).with(has_entry('key_1', 1)) - # object.method_1('key_1' => 1, 'key_2' => 2) - # # no error raised # @example Actual parameter contains expected entry supplied as +Hash+ entry. # object = mock() # object.expects(:method_1).with(has_entry('key_1' => 1)) # object.method_1('key_1' => 1, 'key_2' => 2) # # no error raised - # @example Actual parameter does not contain expected entry supplied as key and value. + # @example Actual parameter contains expected entry supplied as key and value. # object = mock() # object.expects(:method_1).with(has_entry('key_1', 1)) - # object.method_1('key_1' => 2, 'key_2' => 1) - # # error raised, because method_1 was not called with Hash containing entry: 'key_1' => 1 + # object.method_1('key_1' => 1, 'key_2' => 2) + # # no error raised # @example Actual parameter does not contain expected entry supplied as +Hash+ entry. # # object = mock() # object.expects(:method_1).with(has_entry('key_1' => 1)) # object.method_1('key_1' => 2, 'key_2' => 1) # # error raised, because method_1 was not called with Hash containing entry: 'key_1' => 1 + # @example Actual parameter does not contain expected entry supplied as key and value. + # object = mock() + # object.expects(:method_1).with(has_entry('key_1', 1)) + # object.method_1('key_1' => 2, 'key_2' => 1) + # # error raised, because method_1 was not called with Hash containing entry: 'key_1' => 1 # @overload has_entry # @overload has_entry # @return [HasEntry] parameter matcher. @@ -2892,46 +2892,46 @@ module Mocha::ParameterMatchers # Matches any object that responds with +true+ to +include?(item)+ # for all items. # + # @example Actual parameter does not include all items. + # object.method_1(['foo', 'baz']) + # # error raised, because ['foo', 'baz'] does not include 'bar'. + # @example Actual parameter does not include item matching nested matcher. + # object.method_1(['foo', 'bar', {:other_key => 'baz'}]) + # # error raised, because no element matches `has_key(:key)` matcher # @example Actual parameter includes all items. # object = mock() # object.expects(:method_1).with(includes('foo', 'bar')) # object.method_1(['foo', 'bar', 'baz']) # # no error raised - # @example Actual parameter does not include all items. - # object.method_1(['foo', 'baz']) - # # error raised, because ['foo', 'baz'] does not include 'bar'. # @example Actual parameter includes item which matches nested matcher. # object = mock() # object.expects(:method_1).with(includes(has_key(:key))) # object.method_1(['foo', 'bar', {key: 'baz'}]) # # no error raised - # @example Actual parameter does not include item matching nested matcher. - # object.method_1(['foo', 'bar', {:other_key => 'baz'}]) - # # error raised, because no element matches `has_key(:key)` matcher - # @example Actual parameter is a String including substring. - # object = mock() - # object.expects(:method_1).with(includes('bar')) - # object.method_1('foobarbaz') - # # no error raised - # @example Actual parameter is a String not including substring. - # object.method_1('foobaz') - # # error raised, because 'foobaz' does not include 'bar' # @example Actual parameter is a Hash including the given key. # object = mock() # object.expects(:method_1).with(includes(:bar)) # object.method_1({foo: 1, bar: 2}) # # no error raised - # @example Actual parameter is a Hash without the given key. - # object.method_1({foo: 1, baz: 2}) - # # error raised, because hash does not include key 'bar' + # @example Actual parameter is a Hash no key matching the given matcher. + # object.method_1({'foo' => 1, 'baz' => 3}) + # # error raised, because hash does not include a key matching /ar/ # @example Actual parameter is a Hash with a key matching the given matcher. # object = mock() # object.expects(:method_1).with(includes(regexp_matches(/ar/))) # object.method_1({'foo' => 1, 'bar' => 2}) # # no error raised - # @example Actual parameter is a Hash no key matching the given matcher. - # object.method_1({'foo' => 1, 'baz' => 3}) - # # error raised, because hash does not include a key matching /ar/ + # @example Actual parameter is a Hash without the given key. + # object.method_1({foo: 1, baz: 2}) + # # error raised, because hash does not include key 'bar' + # @example Actual parameter is a String including substring. + # object = mock() + # object.expects(:method_1).with(includes('bar')) + # object.method_1('foobarbaz') + # # no error raised + # @example Actual parameter is a String not including substring. + # object.method_1('foobaz') + # # error raised, because 'foobaz' does not include 'bar' # @param items [*Array] expected items. # @return [Includes] parameter matcher. # @see Expectation#with @@ -3001,26 +3001,26 @@ module Mocha::ParameterMatchers # Matches optional parameters if available. # - # @example Only the two required parameters are supplied and they both match their expected value. + # @example Both required parameters and both of the optional parameters are supplied and they all match their expected value. # object = mock() # object.expects(:method_1).with(1, 2, optionally(3, 4)) - # object.method_1(1, 2) + # object.method_1(1, 2, 3, 4) # # no error raised # @example Both required parameters and one of the optional parameters are supplied and they all match their expected value. # object = mock() # object.expects(:method_1).with(1, 2, optionally(3, 4)) # object.method_1(1, 2, 3) # # no error raised - # @example Both required parameters and both of the optional parameters are supplied and they all match their expected value. - # object = mock() - # object.expects(:method_1).with(1, 2, optionally(3, 4)) - # object.method_1(1, 2, 3, 4) - # # no error raised # @example One of the actual optional parameters does not match the expected value. # object = mock() # object.expects(:method_1).with(1, 2, optionally(3, 4)) # object.method_1(1, 2, 3, 5) # # error raised, because optional parameters did not match + # @example Only the two required parameters are supplied and they both match their expected value. + # object = mock() + # object.expects(:method_1).with(1, 2, optionally(3, 4)) + # object.method_1(1, 2) + # # no error raised # @param matchers [*Array] matchers for optional parameters. # @return [Optionally] parameter matcher. # @see Expectation#with @@ -3048,11 +3048,6 @@ module Mocha::ParameterMatchers # source://mocha//lib/mocha/parameter_matchers/regexp_matches.rb#24 def regexp_matches(regexp); end - # @example Actual parameter responds with "FOO" when :upcase is invoked. - # object = mock() - # object.expects(:method_1).with(responds_with(:upcase, "FOO")) - # object.method_1("foo") - # # no error raised, because "foo".upcase == "FOO" # @example Actual parameter does not respond with "FOO" when :upcase is invoked. # object = mock() # object.expects(:method_1).with(responds_with(:upcase, "BAR")) @@ -3063,6 +3058,11 @@ module Mocha::ParameterMatchers # object.expects(:method_1).with(responds_with(upcase: "FOO", reverse: "oof")) # object.method_1("foo") # # no error raised, because "foo".upcase == "FOO" and "foo".reverse == "oof" + # @example Actual parameter responds with "FOO" when :upcase is invoked. + # object = mock() + # object.expects(:method_1).with(responds_with(:upcase, "FOO")) + # object.method_1("foo") + # # no error raised, because "foo".upcase == "FOO" # @overload responds_with # @overload responds_with # @return [RespondsWith] parameter matcher. @@ -3932,7 +3932,6 @@ class Mocha::StubbedMethod def use_prepended_module_for_stub_method; end end -# source://mocha//lib/mocha/stubbed_method.rb#6 class Mocha::StubbedMethod::PrependedModule < ::Module; end # Exception raised when stubbing a particular method is not allowed. diff --git a/sorbet/rbi/gems/parser@3.3.8.0.rbi b/sorbet/rbi/gems/parser@3.3.8.0.rbi index 579aa458bc..32bdda310f 100644 --- a/sorbet/rbi/gems/parser@3.3.8.0.rbi +++ b/sorbet/rbi/gems/parser@3.3.8.0.rbi @@ -763,8 +763,8 @@ class Parser::Base < ::Racc::Parser # `:tSTRING "foo"`; such details must not be relied upon. # # @api public - # @param source_buffer [Parser::Source::Buffer] # @param recover [Boolean] If true, recover from syntax errors. False by default. + # @param source_buffer [Parser::Source::Buffer] # @return [Array] # # source://parser//lib/parser/base.rb#236 @@ -806,9 +806,9 @@ class Parser::Base < ::Racc::Parser # @api public # @example # Parser::Base.parse('puts "hello"') - # @param string [String] The block of code to parse. # @param file [String] The name of the file the code originated from. # @param line [Numeric] The initial line number. + # @param string [String] The block of code to parse. # @return [Parser::AST::Node] # # source://parser//lib/parser/base.rb#33 @@ -845,9 +845,9 @@ class Parser::Base < ::Racc::Parser # @api public # @example # Parser::Base.parse_with_comments('puts "hello"') - # @param string [String] The block of code to parse. # @param file [String] The name of the file the code originated from. # @param line [Numeric] The initial line number. + # @param string [String] The block of code to parse. # @return [Array] # # source://parser//lib/parser/base.rb#52 @@ -1693,11 +1693,11 @@ end # source://parser//lib/parser/diagnostic.rb#31 class Parser::Diagnostic # @api public - # @param level [Symbol] - # @param reason [Symbol] # @param arguments [Hash] - # @param location [Parser::Source::Range] # @param highlights [Array] + # @param level [Symbol] + # @param location [Parser::Source::Range] + # @param reason [Symbol] # @return [Diagnostic] a new instance of Diagnostic # # source://parser//lib/parser/diagnostic.rb#49 @@ -3272,8 +3272,8 @@ class Parser::Rewriter < ::Parser::AST::Processor # Inserts new code after the given source range. # # @api public - # @param range [Parser::Source::Range] # @param content [String] + # @param range [Parser::Source::Range] # # source://parser//lib/parser/rewriter.rb#77 def insert_after(range, content); end @@ -3281,8 +3281,8 @@ class Parser::Rewriter < ::Parser::AST::Processor # Inserts new code before the given source range. # # @api public - # @param range [Parser::Source::Range] # @param content [String] + # @param range [Parser::Source::Range] # # source://parser//lib/parser/rewriter.rb#67 def insert_before(range, content); end @@ -3298,8 +3298,8 @@ class Parser::Rewriter < ::Parser::AST::Processor # Replaces the code of the source range `range` with `content`. # # @api public - # @param range [Parser::Source::Range] # @param content [String] + # @param range [Parser::Source::Range] # # source://parser//lib/parser/rewriter.rb#87 def replace(range, content); end @@ -3308,8 +3308,8 @@ class Parser::Rewriter < ::Parser::AST::Processor # version. # # @api public - # @param source_buffer [Parser::Source::Buffer] # @param ast [Parser::AST::Node] + # @param source_buffer [Parser::Source::Buffer] # @return [String] # # source://parser//lib/parser/rewriter.rb#23 @@ -3318,8 +3318,8 @@ class Parser::Rewriter < ::Parser::AST::Processor # Wraps the given source range with the given values. # # @api public - # @param range [Parser::Source::Range] # @param content [String] + # @param range [Parser::Source::Range] # # source://parser//lib/parser/rewriter.rb#57 def wrap(range, before, after); end @@ -4178,9 +4178,9 @@ class Parser::Source::Range include ::Comparable # @api public - # @param source_buffer [Buffer] # @param begin_pos [Integer] # @param end_pos [Integer] + # @param source_buffer [Buffer] # @return [Range] a new instance of Range # # source://parser//lib/parser/source/range.rb#37 @@ -4493,8 +4493,8 @@ class Parser::Source::Rewriter # # @api public # @deprecated Use {TreeRewriter#insert_after} - # @param range [Range] # @param content [String] + # @param range [Range] # @raise [ClobberingError] when clobbering is detected # @return [Rewriter] self # @@ -4513,8 +4513,8 @@ class Parser::Source::Rewriter # insert_after_multi(range, ')'). # insert_after_multi(range, ']'). # process - # @param range [Range] # @param content [String] + # @param range [Range] # @raise [ClobberingError] when clobbering is detected # @return [Rewriter] self # @@ -4525,8 +4525,8 @@ class Parser::Source::Rewriter # # @api public # @deprecated Use {TreeRewriter#insert_before} - # @param range [Range] # @param content [String] + # @param range [Range] # @raise [ClobberingError] when clobbering is detected # @return [Rewriter] self # @@ -4545,8 +4545,8 @@ class Parser::Source::Rewriter # insert_before_multi(range, '('). # insert_before_multi(range, '['). # process - # @param range [Range] # @param content [String] + # @param range [Range] # @raise [ClobberingError] when clobbering is detected # @return [Rewriter] self # @@ -4578,8 +4578,8 @@ class Parser::Source::Rewriter # # @api public # @deprecated Use {TreeRewriter#replace} - # @param range [Range] # @param content [String] + # @param range [Range] # @raise [ClobberingError] when clobbering is detected # @return [Rewriter] self # @@ -4616,9 +4616,9 @@ class Parser::Source::Rewriter # # @api public # @deprecated Use {TreeRewriter#wrap} - # @param range [Range] - # @param before [String] # @param after [String] + # @param before [String] + # @param range [Range] # @raise [ClobberingError] when clobbering is detected # @return [Rewriter] self # @@ -4964,8 +4964,8 @@ class Parser::Source::TreeRewriter # or that needs to be offset. Policies of the receiver are used. # # @api public - # @param rewriter [TreeRewriter] from different source_buffer # @param offset [Integer] + # @param rewriter [TreeRewriter] from different source_buffer # @raise [IndexError] if action ranges (once offset) don't fit the current buffer # @return [Rewriter] self # @@ -4981,8 +4981,8 @@ class Parser::Source::TreeRewriter # Shortcut for `wrap(range, nil, content)` # # @api public - # @param range [Range] # @param content [String] + # @param range [Range] # @raise [ClobberingError] when clobbering is detected # @return [Rewriter] self # @@ -4998,8 +4998,8 @@ class Parser::Source::TreeRewriter # Shortcut for `wrap(range, content, nil)` # # @api public - # @param range [Range] # @param content [String] + # @param range [Range] # @raise [ClobberingError] when clobbering is detected # @return [Rewriter] self # @@ -5063,8 +5063,8 @@ class Parser::Source::TreeRewriter # Replaces the code of the source range `range` with `content`. # # @api public - # @param range [Range] # @param content [String] + # @param range [Range] # @raise [ClobberingError] when clobbering is detected # @return [Rewriter] self # @@ -5090,9 +5090,9 @@ class Parser::Source::TreeRewriter # Inserts the given strings before and after the given range. # # @api public - # @param range [Range] - # @param insert_before [String, nil] # @param insert_after [String, nil] + # @param insert_before [String, nil] + # @param range [Range] # @raise [ClobberingError] when clobbering is detected # @return [Rewriter] self # @@ -5437,8 +5437,8 @@ class Parser::TreeRewriter < ::Parser::AST::Processor # Inserts new code after the given source range. # # @api public - # @param range [Parser::Source::Range] # @param content [String] + # @param range [Parser::Source::Range] # # source://parser//lib/parser/tree_rewriter.rb#118 def insert_after(range, content); end @@ -5446,8 +5446,8 @@ class Parser::TreeRewriter < ::Parser::AST::Processor # Inserts new code before the given source range. # # @api public - # @param range [Parser::Source::Range] # @param content [String] + # @param range [Parser::Source::Range] # # source://parser//lib/parser/tree_rewriter.rb#108 def insert_before(range, content); end @@ -5463,8 +5463,8 @@ class Parser::TreeRewriter < ::Parser::AST::Processor # Replaces the code of the source range `range` with `content`. # # @api public - # @param range [Parser::Source::Range] # @param content [String] + # @param range [Parser::Source::Range] # # source://parser//lib/parser/tree_rewriter.rb#128 def replace(range, content); end @@ -5473,10 +5473,10 @@ class Parser::TreeRewriter < ::Parser::AST::Processor # version. # # @api public - # @param source_buffer [Parser::Source::Buffer] # @param ast [Parser::AST::Node] # @param crossing_deletions:, [Symbol] different_replacements:, swallowed_insertions: # policy arguments for TreeRewriter (optional) + # @param source_buffer [Parser::Source::Buffer] # @return [String] # # source://parser//lib/parser/tree_rewriter.rb#62 @@ -5485,8 +5485,8 @@ class Parser::TreeRewriter < ::Parser::AST::Processor # Wraps the given source range with the given values. # # @api public - # @param range [Parser::Source::Range] # @param content [String] + # @param range [Parser::Source::Range] # # source://parser//lib/parser/tree_rewriter.rb#98 def wrap(range, before, after); end diff --git a/sorbet/rbi/gems/prism@1.8.0.rbi b/sorbet/rbi/gems/prism@1.9.0.rbi similarity index 88% rename from sorbet/rbi/gems/prism@1.8.0.rbi rename to sorbet/rbi/gems/prism@1.9.0.rbi index ef2f2bf8a9..60db155a1b 100644 --- a/sorbet/rbi/gems/prism@1.8.0.rbi +++ b/sorbet/rbi/gems/prism@1.9.0.rbi @@ -39,139 +39,127 @@ module Prism class << self # Mirror the Prism.dump API by using the serialization API. # - # source://prism//lib/prism.rb#105 + # source://prism//lib/prism.rb#92 def dump(*_arg0); end # Mirror the Prism.dump_file API by using the serialization API. # - # source://prism//lib/prism.rb#105 + # source://prism//lib/prism.rb#92 def dump_file(*_arg0); end # Mirror the Prism.lex API by using the serialization API. # - # source://prism//lib/prism.rb#105 + # source://prism//lib/prism.rb#92 def lex(*_arg0); end # :call-seq: # Prism::lex_compat(source, **options) -> LexCompat::Result # # Returns a parse result whose value is an array of tokens that closely - # resembles the return value of Ripper::lex. The main difference is that the - # `:on_sp` token is not emitted. + # resembles the return value of Ripper::lex. # # For supported options, see Prism::parse. # - # source://prism//lib/prism.rb#68 + # source://prism//lib/prism.rb#65 sig { params(source: String, options: T::Hash[Symbol, T.untyped]).returns(Prism::LexCompat::Result) } def lex_compat(source, **options); end # Mirror the Prism.lex_file API by using the serialization API. # - # source://prism//lib/prism.rb#105 + # source://prism//lib/prism.rb#92 def lex_file(*_arg0); end - # :call-seq: - # Prism::lex_ripper(source) -> Array - # - # This lexes with the Ripper lex. It drops any space events but otherwise - # returns the same tokens. Raises SyntaxError if the syntax in source is - # invalid. - # - # source://prism//lib/prism.rb#78 - sig { params(source: String).returns(T::Array[T.untyped]) } - def lex_ripper(source); end - # :call-seq: # Prism::load(source, serialized, freeze) -> ParseResult # # Load the serialized AST using the source as a reference into a tree. # - # source://prism//lib/prism.rb#86 + # source://prism//lib/prism.rb#73 sig { params(source: String, serialized: String, freeze: T.nilable(T::Boolean)).returns(Prism::ParseResult) } def load(source, serialized, freeze = T.unsafe(nil)); end # Mirror the Prism.parse API by using the serialization API. # - # source://prism//lib/prism.rb#105 + # source://prism//lib/prism.rb#92 def parse(*_arg0); end # Mirror the Prism.parse_comments API by using the serialization API. # - # source://prism//lib/prism.rb#105 + # source://prism//lib/prism.rb#92 def parse_comments(*_arg0); end # Mirror the Prism.parse_failure? API by using the serialization API. # # @return [Boolean] # - # source://prism//lib/prism.rb#105 + # source://prism//lib/prism.rb#92 def parse_failure?(*_arg0); end # Mirror the Prism.parse_file API by using the serialization API. This uses # native strings instead of Ruby strings because it allows us to use mmap # when it is available. # - # source://prism//lib/prism.rb#105 + # source://prism//lib/prism.rb#92 def parse_file(*_arg0); end # Mirror the Prism.parse_file_comments API by using the serialization # API. This uses native strings instead of Ruby strings because it allows us # to use mmap when it is available. # - # source://prism//lib/prism.rb#105 + # source://prism//lib/prism.rb#92 def parse_file_comments(*_arg0); end # Mirror the Prism.parse_file_failure? API by using the serialization API. # # @return [Boolean] # - # source://prism//lib/prism.rb#105 + # source://prism//lib/prism.rb#92 def parse_file_failure?(*_arg0); end # Mirror the Prism.parse_file_success? API by using the serialization API. # # @return [Boolean] # - # source://prism//lib/prism.rb#105 + # source://prism//lib/prism.rb#92 def parse_file_success?(*_arg0); end # Mirror the Prism.parse_lex API by using the serialization API. # - # source://prism//lib/prism.rb#105 + # source://prism//lib/prism.rb#92 def parse_lex(*_arg0); end # Mirror the Prism.parse_lex_file API by using the serialization API. # - # source://prism//lib/prism.rb#105 + # source://prism//lib/prism.rb#92 def parse_lex_file(*_arg0); end # Mirror the Prism.parse_stream API by using the serialization API. # - # source://prism//lib/prism.rb#105 + # source://prism//lib/prism.rb#92 def parse_stream(*_arg0); end # Mirror the Prism.parse_success? API by using the serialization API. # # @return [Boolean] # - # source://prism//lib/prism.rb#105 + # source://prism//lib/prism.rb#92 def parse_success?(*_arg0); end # Mirror the Prism.profile API by using the serialization API. # - # source://prism//lib/prism.rb#105 + # source://prism//lib/prism.rb#92 def profile(*_arg0); end # Mirror the Prism.profile_file API by using the serialization API. # - # source://prism//lib/prism.rb#105 + # source://prism//lib/prism.rb#92 def profile_file(*_arg0); end # Create a new scope with the given locals and forwarding options that is # suitable for passing into one of the Prism.* methods that accepts the # `scopes` option. # - # source://prism//lib/prism/parse_result.rb#895 + # source://prism//lib/prism/parse_result.rb#904 sig { params(locals: T::Array[Symbol], forwarding: T::Array[Symbol]).returns(Prism::Scope) } def scope(locals: T.unsafe(nil), forwarding: T.unsafe(nil)); end end @@ -186,17 +174,17 @@ end # 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#241 +# source://prism//lib/prism/parse_result.rb#250 class Prism::ASCIISource < ::Prism::Source # Return the column number in characters for the given byte offset. # - # source://prism//lib/prism/parse_result.rb#248 + # source://prism//lib/prism/parse_result.rb#257 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#243 + # source://prism//lib/prism/parse_result.rb#252 sig { params(byte_offset: Integer).returns(Integer) } def character_offset(byte_offset); end @@ -204,7 +192,7 @@ class Prism::ASCIISource < ::Prism::Source # 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#265 + # source://prism//lib/prism/parse_result.rb#274 sig do params( encoding: Encoding @@ -216,7 +204,7 @@ class Prism::ASCIISource < ::Prism::Source # `code_units_offset`, which is a more expensive operation. This is # essentially the same as `Prism::Source#column`. # - # source://prism//lib/prism/parse_result.rb#272 + # source://prism//lib/prism/parse_result.rb#281 sig { params(byte_offset: Integer, encoding: Encoding).returns(Integer) } def code_units_column(byte_offset, encoding); end @@ -227,7 +215,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#258 + # source://prism//lib/prism/parse_result.rb#267 sig { params(byte_offset: Integer, encoding: Encoding).returns(Integer) } def code_units_offset(byte_offset, encoding); end end @@ -237,13 +225,13 @@ end # alias $foo $bar # ^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#326 +# source://prism//lib/prism/node.rb#334 class Prism::AliasGlobalVariableNode < ::Prism::Node # Initialize a new AliasGlobalVariableNode node. # # @return [AliasGlobalVariableNode] a new instance of AliasGlobalVariableNode # - # source://prism//lib/prism/node.rb#328 + # source://prism//lib/prism/node.rb#336 sig do params( source: Prism::Source, @@ -260,36 +248,36 @@ class Prism::AliasGlobalVariableNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#429 + # source://prism//lib/prism/node.rb#437 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#339 + # source://prism//lib/prism/node.rb#347 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#344 + # source://prism//lib/prism/node.rb#352 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#362 + # source://prism//lib/prism/node.rb#370 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#357 + # source://prism//lib/prism/node.rb#365 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?new_name: GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode, ?old_name: GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode | SymbolNode | MissingNode, ?keyword_loc: Location) -> AliasGlobalVariableNode # - # source://prism//lib/prism/node.rb#367 + # source://prism//lib/prism/node.rb#375 sig do params( node_id: Integer, @@ -305,13 +293,13 @@ class Prism::AliasGlobalVariableNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#372 + # source://prism//lib/prism/node.rb#380 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, new_name: GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode, old_name: GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode | SymbolNode | MissingNode, keyword_loc: Location } # - # source://prism//lib/prism/node.rb#375 + # source://prism//lib/prism/node.rb#383 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -319,7 +307,7 @@ class Prism::AliasGlobalVariableNode < ::Prism::Node # # @yield [new_name] # - # source://prism//lib/prism/node.rb#349 + # source://prism//lib/prism/node.rb#357 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -327,13 +315,13 @@ class Prism::AliasGlobalVariableNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#413 + # source://prism//lib/prism/node.rb#421 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#408 + # source://prism//lib/prism/node.rb#416 sig { returns(String) } def keyword; end @@ -342,7 +330,7 @@ class Prism::AliasGlobalVariableNode < ::Prism::Node # alias $foo $bar # ^^^^^ # - # source://prism//lib/prism/node.rb#395 + # source://prism//lib/prism/node.rb#403 sig { returns(Prism::Location) } def keyword_loc; end @@ -351,7 +339,7 @@ class Prism::AliasGlobalVariableNode < ::Prism::Node # alias $foo $bar # ^^^^ # - # source://prism//lib/prism/node.rb#383 + # source://prism//lib/prism/node.rb#391 sig { returns(T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)) } def new_name; end @@ -360,7 +348,7 @@ class Prism::AliasGlobalVariableNode < ::Prism::Node # alias $foo $bar # ^^^^ # - # source://prism//lib/prism/node.rb#389 + # source://prism//lib/prism/node.rb#397 sig do returns(T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::SymbolNode, Prism::MissingNode)) end @@ -369,19 +357,19 @@ class Prism::AliasGlobalVariableNode < ::Prism::Node # Save the keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#403 + # source://prism//lib/prism/node.rb#411 def save_keyword_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#418 + # source://prism//lib/prism/node.rb#426 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#423 + # source://prism//lib/prism/node.rb#431 def type; end end end @@ -391,13 +379,13 @@ end # alias foo bar # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#441 +# source://prism//lib/prism/node.rb#449 class Prism::AliasMethodNode < ::Prism::Node # Initialize a new AliasMethodNode node. # # @return [AliasMethodNode] a new instance of AliasMethodNode # - # source://prism//lib/prism/node.rb#443 + # source://prism//lib/prism/node.rb#451 sig do params( source: Prism::Source, @@ -414,36 +402,36 @@ class Prism::AliasMethodNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#556 + # source://prism//lib/prism/node.rb#564 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#454 + # source://prism//lib/prism/node.rb#462 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#459 + # source://prism//lib/prism/node.rb#467 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#477 + # source://prism//lib/prism/node.rb#485 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#472 + # source://prism//lib/prism/node.rb#480 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?new_name: SymbolNode | InterpolatedSymbolNode, ?old_name: SymbolNode | InterpolatedSymbolNode | GlobalVariableReadNode | MissingNode, ?keyword_loc: Location) -> AliasMethodNode # - # source://prism//lib/prism/node.rb#482 + # source://prism//lib/prism/node.rb#490 sig do params( node_id: Integer, @@ -459,13 +447,13 @@ class Prism::AliasMethodNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#487 + # source://prism//lib/prism/node.rb#495 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, new_name: SymbolNode | InterpolatedSymbolNode, old_name: SymbolNode | InterpolatedSymbolNode | GlobalVariableReadNode | MissingNode, keyword_loc: Location } # - # source://prism//lib/prism/node.rb#490 + # source://prism//lib/prism/node.rb#498 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -473,7 +461,7 @@ class Prism::AliasMethodNode < ::Prism::Node # # @yield [new_name] # - # source://prism//lib/prism/node.rb#464 + # source://prism//lib/prism/node.rb#472 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -481,13 +469,13 @@ class Prism::AliasMethodNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#540 + # source://prism//lib/prism/node.rb#548 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#535 + # source://prism//lib/prism/node.rb#543 sig { returns(String) } def keyword; end @@ -496,7 +484,7 @@ class Prism::AliasMethodNode < ::Prism::Node # alias foo bar # ^^^^^ # - # source://prism//lib/prism/node.rb#522 + # source://prism//lib/prism/node.rb#530 sig { returns(Prism::Location) } def keyword_loc; end @@ -511,7 +499,7 @@ class Prism::AliasMethodNode < ::Prism::Node # alias :"#{foo}" :"#{bar}" # ^^^^^^^^^ # - # source://prism//lib/prism/node.rb#504 + # source://prism//lib/prism/node.rb#512 sig { returns(T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)) } def new_name; end @@ -526,7 +514,7 @@ class Prism::AliasMethodNode < ::Prism::Node # alias :"#{foo}" :"#{bar}" # ^^^^^^^^^ # - # source://prism//lib/prism/node.rb#516 + # source://prism//lib/prism/node.rb#524 sig do returns(T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode, Prism::GlobalVariableReadNode, Prism::MissingNode)) end @@ -535,19 +523,19 @@ class Prism::AliasMethodNode < ::Prism::Node # Save the keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#530 + # source://prism//lib/prism/node.rb#538 def save_keyword_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#545 + # source://prism//lib/prism/node.rb#553 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#550 + # source://prism//lib/prism/node.rb#558 def type; end end end @@ -557,13 +545,13 @@ end # foo => bar | baz # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#568 +# source://prism//lib/prism/node.rb#576 class Prism::AlternationPatternNode < ::Prism::Node # Initialize a new AlternationPatternNode node. # # @return [AlternationPatternNode] a new instance of AlternationPatternNode # - # source://prism//lib/prism/node.rb#570 + # source://prism//lib/prism/node.rb#578 sig do params( source: Prism::Source, @@ -580,36 +568,36 @@ class Prism::AlternationPatternNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#671 + # source://prism//lib/prism/node.rb#679 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#581 + # source://prism//lib/prism/node.rb#589 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#586 + # source://prism//lib/prism/node.rb#594 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#604 + # source://prism//lib/prism/node.rb#612 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#599 + # source://prism//lib/prism/node.rb#607 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?left: Prism::node, ?right: Prism::node, ?operator_loc: Location) -> AlternationPatternNode # - # source://prism//lib/prism/node.rb#609 + # source://prism//lib/prism/node.rb#617 sig do params( node_id: Integer, @@ -625,13 +613,13 @@ class Prism::AlternationPatternNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#614 + # source://prism//lib/prism/node.rb#622 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node, right: Prism::node, operator_loc: Location } # - # source://prism//lib/prism/node.rb#617 + # source://prism//lib/prism/node.rb#625 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -639,7 +627,7 @@ class Prism::AlternationPatternNode < ::Prism::Node # # @yield [left] # - # source://prism//lib/prism/node.rb#591 + # source://prism//lib/prism/node.rb#599 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -647,7 +635,7 @@ class Prism::AlternationPatternNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#655 + # source://prism//lib/prism/node.rb#663 sig { override.returns(String) } def inspect; end @@ -656,13 +644,13 @@ class Prism::AlternationPatternNode < ::Prism::Node # foo => bar | baz # ^^^ # - # source://prism//lib/prism/node.rb#625 + # source://prism//lib/prism/node.rb#633 sig { returns(Prism::Node) } def left; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#650 + # source://prism//lib/prism/node.rb#658 sig { returns(String) } def operator; end @@ -671,7 +659,7 @@ class Prism::AlternationPatternNode < ::Prism::Node # foo => bar | baz # ^ # - # source://prism//lib/prism/node.rb#637 + # source://prism//lib/prism/node.rb#645 sig { returns(Prism::Location) } def operator_loc; end @@ -680,26 +668,26 @@ class Prism::AlternationPatternNode < ::Prism::Node # foo => bar | baz # ^^^ # - # source://prism//lib/prism/node.rb#631 + # source://prism//lib/prism/node.rb#639 sig { returns(Prism::Node) } def right; end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#645 + # source://prism//lib/prism/node.rb#653 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#660 + # source://prism//lib/prism/node.rb#668 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#665 + # source://prism//lib/prism/node.rb#673 def type; end end end @@ -709,13 +697,13 @@ end # left and right # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#683 +# source://prism//lib/prism/node.rb#691 class Prism::AndNode < ::Prism::Node # Initialize a new AndNode node. # # @return [AndNode] a new instance of AndNode # - # source://prism//lib/prism/node.rb#685 + # source://prism//lib/prism/node.rb#693 sig do params( source: Prism::Source, @@ -732,36 +720,36 @@ class Prism::AndNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#792 + # source://prism//lib/prism/node.rb#800 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#696 + # source://prism//lib/prism/node.rb#704 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#701 + # source://prism//lib/prism/node.rb#709 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#719 + # source://prism//lib/prism/node.rb#727 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#714 + # source://prism//lib/prism/node.rb#722 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?left: Prism::node, ?right: Prism::node, ?operator_loc: Location) -> AndNode # - # source://prism//lib/prism/node.rb#724 + # source://prism//lib/prism/node.rb#732 sig do params( node_id: Integer, @@ -777,13 +765,13 @@ class Prism::AndNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#729 + # source://prism//lib/prism/node.rb#737 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node, right: Prism::node, operator_loc: Location } # - # source://prism//lib/prism/node.rb#732 + # source://prism//lib/prism/node.rb#740 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -791,7 +779,7 @@ class Prism::AndNode < ::Prism::Node # # @yield [left] # - # source://prism//lib/prism/node.rb#706 + # source://prism//lib/prism/node.rb#714 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -799,7 +787,7 @@ class Prism::AndNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#776 + # source://prism//lib/prism/node.rb#784 sig { override.returns(String) } def inspect; end @@ -811,13 +799,13 @@ class Prism::AndNode < ::Prism::Node # 1 && 2 # ^ # - # source://prism//lib/prism/node.rb#743 + # source://prism//lib/prism/node.rb#751 sig { returns(Prism::Node) } def left; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#771 + # source://prism//lib/prism/node.rb#779 sig { returns(String) } def operator; end @@ -826,7 +814,7 @@ class Prism::AndNode < ::Prism::Node # left and right # ^^^ # - # source://prism//lib/prism/node.rb#758 + # source://prism//lib/prism/node.rb#766 sig { returns(Prism::Location) } def operator_loc; end @@ -838,26 +826,26 @@ class Prism::AndNode < ::Prism::Node # 1 and 2 # ^ # - # source://prism//lib/prism/node.rb#752 + # source://prism//lib/prism/node.rb#760 sig { returns(Prism::Node) } def right; end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#766 + # source://prism//lib/prism/node.rb#774 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#781 + # source://prism//lib/prism/node.rb#789 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#786 + # source://prism//lib/prism/node.rb#794 def type; end end end @@ -867,13 +855,13 @@ end # return foo, bar, baz # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#804 +# source://prism//lib/prism/node.rb#812 class Prism::ArgumentsNode < ::Prism::Node # Initialize a new ArgumentsNode node. # # @return [ArgumentsNode] a new instance of ArgumentsNode # - # source://prism//lib/prism/node.rb#806 + # source://prism//lib/prism/node.rb#814 sig do params( source: Prism::Source, @@ -888,12 +876,12 @@ class Prism::ArgumentsNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#902 + # source://prism//lib/prism/node.rb#910 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#815 + # source://prism//lib/prism/node.rb#823 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -902,25 +890,25 @@ class Prism::ArgumentsNode < ::Prism::Node # foo(bar, baz) # ^^^^^^^^ # - # source://prism//lib/prism/node.rb#883 + # source://prism//lib/prism/node.rb#891 sig { returns(T::Array[Prism::Node]) } def arguments; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#820 + # source://prism//lib/prism/node.rb#828 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#837 + # source://prism//lib/prism/node.rb#845 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#832 + # source://prism//lib/prism/node.rb#840 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end @@ -928,7 +916,7 @@ class Prism::ArgumentsNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#855 + # source://prism//lib/prism/node.rb#863 sig { returns(T::Boolean) } def contains_forwarding?; end @@ -936,7 +924,7 @@ class Prism::ArgumentsNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#865 + # source://prism//lib/prism/node.rb#873 sig { returns(T::Boolean) } def contains_keyword_splat?; end @@ -944,7 +932,7 @@ class Prism::ArgumentsNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#860 + # source://prism//lib/prism/node.rb#868 sig { returns(T::Boolean) } def contains_keywords?; end @@ -952,7 +940,7 @@ class Prism::ArgumentsNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#875 + # source://prism//lib/prism/node.rb#883 sig { returns(T::Boolean) } def contains_multiple_splats?; end @@ -960,13 +948,13 @@ class Prism::ArgumentsNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#870 + # source://prism//lib/prism/node.rb#878 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#842 + # source://prism//lib/prism/node.rb#850 sig do params( node_id: Integer, @@ -980,19 +968,19 @@ class Prism::ArgumentsNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#847 + # source://prism//lib/prism/node.rb#855 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, arguments: Array[Prism::node] } # - # source://prism//lib/prism/node.rb#850 + # source://prism//lib/prism/node.rb#858 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#825 + # source://prism//lib/prism/node.rb#833 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -1000,52 +988,52 @@ class Prism::ArgumentsNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#886 + # source://prism//lib/prism/node.rb#894 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#891 + # source://prism//lib/prism/node.rb#899 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#896 + # source://prism//lib/prism/node.rb#904 def type; end end end # Flags for arguments nodes. # -# source://prism//lib/prism/node.rb#19772 +# source://prism//lib/prism/node.rb#19780 module Prism::ArgumentsNodeFlags; end # if the arguments contain forwarding # -# source://prism//lib/prism/node.rb#19774 +# source://prism//lib/prism/node.rb#19782 Prism::ArgumentsNodeFlags::CONTAINS_FORWARDING = T.let(T.unsafe(nil), Integer) # if the arguments contain keywords # -# source://prism//lib/prism/node.rb#19777 +# source://prism//lib/prism/node.rb#19785 Prism::ArgumentsNodeFlags::CONTAINS_KEYWORDS = T.let(T.unsafe(nil), Integer) # if the arguments contain a keyword splat # -# source://prism//lib/prism/node.rb#19780 +# source://prism//lib/prism/node.rb#19788 Prism::ArgumentsNodeFlags::CONTAINS_KEYWORD_SPLAT = T.let(T.unsafe(nil), Integer) # if the arguments contain multiple splats # -# source://prism//lib/prism/node.rb#19786 +# source://prism//lib/prism/node.rb#19794 Prism::ArgumentsNodeFlags::CONTAINS_MULTIPLE_SPLATS = T.let(T.unsafe(nil), Integer) # if the arguments contain a splat # -# source://prism//lib/prism/node.rb#19783 +# source://prism//lib/prism/node.rb#19791 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. @@ -1053,13 +1041,13 @@ Prism::ArgumentsNodeFlags::CONTAINS_SPLAT = T.let(T.unsafe(nil), Integer) # [1, 2, 3] # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#914 +# source://prism//lib/prism/node.rb#922 class Prism::ArrayNode < ::Prism::Node # Initialize a new ArrayNode node. # # @return [ArrayNode] a new instance of ArrayNode # - # source://prism//lib/prism/node.rb#916 + # source://prism//lib/prism/node.rb#924 sig do params( source: Prism::Source, @@ -1076,24 +1064,24 @@ class Prism::ArrayNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#1049 + # source://prism//lib/prism/node.rb#1057 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#927 + # source://prism//lib/prism/node.rb#935 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#932 + # source://prism//lib/prism/node.rb#940 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#1028 + # source://prism//lib/prism/node.rb#1036 sig { returns(T.nilable(String)) } def closing; end @@ -1104,19 +1092,19 @@ class Prism::ArrayNode < ::Prism::Node # %I(apple orange banana) # ")" # foo = 1, 2, 3 # nil # - # source://prism//lib/prism/node.rb#1004 + # source://prism//lib/prism/node.rb#1012 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#949 + # source://prism//lib/prism/node.rb#957 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#944 + # source://prism//lib/prism/node.rb#952 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end @@ -1124,13 +1112,13 @@ class Prism::ArrayNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#967 + # source://prism//lib/prism/node.rb#975 sig { returns(T::Boolean) } def contains_splat?; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?elements: Array[Prism::node], ?opening_loc: Location?, ?closing_loc: Location?) -> ArrayNode # - # source://prism//lib/prism/node.rb#954 + # source://prism//lib/prism/node.rb#962 sig do params( node_id: Integer, @@ -1146,24 +1134,24 @@ class Prism::ArrayNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#959 + # source://prism//lib/prism/node.rb#967 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, elements: Array[Prism::node], opening_loc: Location?, closing_loc: Location? } # - # source://prism//lib/prism/node.rb#962 + # source://prism//lib/prism/node.rb#970 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#937 + # source://prism//lib/prism/node.rb#945 def each_child_node; 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#972 + # source://prism//lib/prism/node.rb#980 sig { returns(T::Array[Prism::Node]) } def elements; end @@ -1172,13 +1160,13 @@ class Prism::ArrayNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#1033 + # source://prism//lib/prism/node.rb#1041 sig { override.returns(String) } def inspect; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#1023 + # source://prism//lib/prism/node.rb#1031 sig { returns(T.nilable(String)) } def opening; end @@ -1189,44 +1177,44 @@ class Prism::ArrayNode < ::Prism::Node # %I(apple orange banana) # "%I(" # foo = 1, 2, 3 # nil # - # source://prism//lib/prism/node.rb#980 + # source://prism//lib/prism/node.rb#988 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#1018 + # source://prism//lib/prism/node.rb#1026 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#994 + # source://prism//lib/prism/node.rb#1002 def save_opening_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#1038 + # source://prism//lib/prism/node.rb#1046 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#1043 + # source://prism//lib/prism/node.rb#1051 def type; end end end # Flags for array nodes. # -# source://prism//lib/prism/node.rb#19790 +# source://prism//lib/prism/node.rb#19798 module Prism::ArrayNodeFlags; end # if array contains splat nodes # -# source://prism//lib/prism/node.rb#19792 +# source://prism//lib/prism/node.rb#19800 Prism::ArrayNodeFlags::CONTAINS_SPLAT = T.let(T.unsafe(nil), Integer) # Represents an array pattern in pattern matching. @@ -1246,13 +1234,13 @@ Prism::ArrayNodeFlags::CONTAINS_SPLAT = T.let(T.unsafe(nil), Integer) # foo in Bar[1, 2, 3] # ^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#1075 +# source://prism//lib/prism/node.rb#1083 class Prism::ArrayPatternNode < ::Prism::Node # Initialize a new ArrayPatternNode node. # # @return [ArrayPatternNode] a new instance of ArrayPatternNode # - # source://prism//lib/prism/node.rb#1077 + # source://prism//lib/prism/node.rb#1085 sig do params( source: Prism::Source, @@ -1272,24 +1260,24 @@ class Prism::ArrayPatternNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#1239 + # source://prism//lib/prism/node.rb#1247 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1091 + # source://prism//lib/prism/node.rb#1099 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#1096 + # source://prism//lib/prism/node.rb#1104 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#1218 + # source://prism//lib/prism/node.rb#1226 sig { returns(T.nilable(String)) } def closing; end @@ -1298,19 +1286,19 @@ class Prism::ArrayPatternNode < ::Prism::Node # foo in [1, 2] # ^ # - # source://prism//lib/prism/node.rb#1194 + # source://prism//lib/prism/node.rb#1202 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1121 + # source://prism//lib/prism/node.rb#1129 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1111 + # source://prism//lib/prism/node.rb#1119 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end @@ -1325,13 +1313,13 @@ class Prism::ArrayPatternNode < ::Prism::Node # foo in Bar::Baz[1, 2, 3] # ^^^^^^^^ # - # source://prism//lib/prism/node.rb#1148 + # source://prism//lib/prism/node.rb#1156 sig { returns(T.nilable(T.any(Prism::ConstantPathNode, Prism::ConstantReadNode))) } def constant; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?constant: ConstantPathNode | ConstantReadNode | 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#1126 + # source://prism//lib/prism/node.rb#1134 sig do params( node_id: Integer, @@ -1350,13 +1338,13 @@ class Prism::ArrayPatternNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#1131 + # source://prism//lib/prism/node.rb#1139 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, constant: ConstantPathNode | ConstantReadNode | nil, requireds: Array[Prism::node], rest: Prism::node?, posts: Array[Prism::node], opening_loc: Location?, closing_loc: Location? } # - # source://prism//lib/prism/node.rb#1134 + # source://prism//lib/prism/node.rb#1142 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -1364,7 +1352,7 @@ class Prism::ArrayPatternNode < ::Prism::Node # # @yield [constant] # - # source://prism//lib/prism/node.rb#1101 + # source://prism//lib/prism/node.rb#1109 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -1372,13 +1360,13 @@ class Prism::ArrayPatternNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#1223 + # source://prism//lib/prism/node.rb#1231 sig { override.returns(String) } def inspect; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#1213 + # source://prism//lib/prism/node.rb#1221 sig { returns(T.nilable(String)) } def opening; end @@ -1387,7 +1375,7 @@ class Prism::ArrayPatternNode < ::Prism::Node # foo in [1, 2] # ^ # - # source://prism//lib/prism/node.rb#1172 + # source://prism//lib/prism/node.rb#1180 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end @@ -1396,7 +1384,7 @@ class Prism::ArrayPatternNode < ::Prism::Node # foo in *bar, baz # ^^^ # - # source://prism//lib/prism/node.rb#1166 + # source://prism//lib/prism/node.rb#1174 sig { returns(T::Array[Prism::Node]) } def posts; end @@ -1405,7 +1393,7 @@ class Prism::ArrayPatternNode < ::Prism::Node # foo in [1, 2] # ^ ^ # - # source://prism//lib/prism/node.rb#1154 + # source://prism//lib/prism/node.rb#1162 sig { returns(T::Array[Prism::Node]) } def requireds; end @@ -1414,32 +1402,32 @@ class Prism::ArrayPatternNode < ::Prism::Node # foo in *bar # ^^^^ # - # source://prism//lib/prism/node.rb#1160 + # source://prism//lib/prism/node.rb#1168 sig { returns(T.nilable(Prism::Node)) } def rest; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#1208 + # source://prism//lib/prism/node.rb#1216 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#1186 + # source://prism//lib/prism/node.rb#1194 def save_opening_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#1228 + # source://prism//lib/prism/node.rb#1236 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#1233 + # source://prism//lib/prism/node.rb#1241 def type; end end end @@ -1449,13 +1437,13 @@ end # { a => b } # ^^^^^^ # -# source://prism//lib/prism/node.rb#1256 +# source://prism//lib/prism/node.rb#1264 class Prism::AssocNode < ::Prism::Node # Initialize a new AssocNode node. # # @return [AssocNode] a new instance of AssocNode # - # source://prism//lib/prism/node.rb#1258 + # source://prism//lib/prism/node.rb#1266 sig do params( source: Prism::Source, @@ -1472,36 +1460,36 @@ class Prism::AssocNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#1374 + # source://prism//lib/prism/node.rb#1382 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1269 + # source://prism//lib/prism/node.rb#1277 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#1274 + # source://prism//lib/prism/node.rb#1282 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1292 + # source://prism//lib/prism/node.rb#1300 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1287 + # source://prism//lib/prism/node.rb#1295 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?key: Prism::node, ?value: Prism::node, ?operator_loc: Location?) -> AssocNode # - # source://prism//lib/prism/node.rb#1297 + # source://prism//lib/prism/node.rb#1305 sig do params( node_id: Integer, @@ -1517,13 +1505,13 @@ class Prism::AssocNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#1302 + # source://prism//lib/prism/node.rb#1310 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, key: Prism::node, value: Prism::node, operator_loc: Location? } # - # source://prism//lib/prism/node.rb#1305 + # source://prism//lib/prism/node.rb#1313 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -1531,7 +1519,7 @@ class Prism::AssocNode < ::Prism::Node # # @yield [key] # - # source://prism//lib/prism/node.rb#1279 + # source://prism//lib/prism/node.rb#1287 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -1539,7 +1527,7 @@ class Prism::AssocNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#1358 + # source://prism//lib/prism/node.rb#1366 sig { override.returns(String) } def inspect; end @@ -1554,13 +1542,13 @@ class Prism::AssocNode < ::Prism::Node # { def a; end => 1 } # ^^^^^^^^^^ # - # source://prism//lib/prism/node.rb#1319 + # source://prism//lib/prism/node.rb#1327 sig { returns(Prism::Node) } def key; end # def operator: () -> String? # - # source://prism//lib/prism/node.rb#1353 + # source://prism//lib/prism/node.rb#1361 sig { returns(T.nilable(String)) } def operator; end @@ -1569,19 +1557,19 @@ class Prism::AssocNode < ::Prism::Node # { foo => bar } # ^^ # - # source://prism//lib/prism/node.rb#1334 + # source://prism//lib/prism/node.rb#1342 sig { returns(T.nilable(Prism::Location)) } def operator_loc; end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#1348 + # source://prism//lib/prism/node.rb#1356 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#1363 + # source://prism//lib/prism/node.rb#1371 sig { override.returns(Symbol) } def type; end @@ -1593,14 +1581,14 @@ class Prism::AssocNode < ::Prism::Node # { x: 1 } # ^ # - # source://prism//lib/prism/node.rb#1328 + # source://prism//lib/prism/node.rb#1336 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#1368 + # source://prism//lib/prism/node.rb#1376 def type; end end end @@ -1610,13 +1598,13 @@ end # { **foo } # ^^^^^ # -# source://prism//lib/prism/node.rb#1386 +# source://prism//lib/prism/node.rb#1394 class Prism::AssocSplatNode < ::Prism::Node # Initialize a new AssocSplatNode node. # # @return [AssocSplatNode] a new instance of AssocSplatNode # - # source://prism//lib/prism/node.rb#1388 + # source://prism//lib/prism/node.rb#1396 sig do params( source: Prism::Source, @@ -1632,36 +1620,36 @@ class Prism::AssocSplatNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#1483 + # source://prism//lib/prism/node.rb#1491 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1398 + # source://prism//lib/prism/node.rb#1406 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#1403 + # source://prism//lib/prism/node.rb#1411 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1422 + # source://prism//lib/prism/node.rb#1430 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1415 + # source://prism//lib/prism/node.rb#1423 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Prism::node?, ?operator_loc: Location) -> AssocSplatNode # - # source://prism//lib/prism/node.rb#1427 + # source://prism//lib/prism/node.rb#1435 sig do params( node_id: Integer, @@ -1676,13 +1664,13 @@ class Prism::AssocSplatNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#1432 + # source://prism//lib/prism/node.rb#1440 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Prism::node?, operator_loc: Location } # - # source://prism//lib/prism/node.rb#1435 + # source://prism//lib/prism/node.rb#1443 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -1690,7 +1678,7 @@ class Prism::AssocSplatNode < ::Prism::Node # # @yield [value] # - # source://prism//lib/prism/node.rb#1408 + # source://prism//lib/prism/node.rb#1416 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -1698,13 +1686,13 @@ class Prism::AssocSplatNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#1467 + # source://prism//lib/prism/node.rb#1475 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#1462 + # source://prism//lib/prism/node.rb#1470 sig { returns(String) } def operator; end @@ -1713,19 +1701,19 @@ class Prism::AssocSplatNode < ::Prism::Node # { **x } # ^^ # - # source://prism//lib/prism/node.rb#1449 + # source://prism//lib/prism/node.rb#1457 sig { returns(Prism::Location) } def operator_loc; end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#1457 + # source://prism//lib/prism/node.rb#1465 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#1472 + # source://prism//lib/prism/node.rb#1480 sig { override.returns(Symbol) } def type; end @@ -1734,21 +1722,21 @@ class Prism::AssocSplatNode < ::Prism::Node # { **foo } # ^^^ # - # source://prism//lib/prism/node.rb#1443 + # source://prism//lib/prism/node.rb#1451 sig { returns(T.nilable(Prism::Node)) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#1477 + # source://prism//lib/prism/node.rb#1485 def type; end end end # The FFI backend is used on other Ruby implementations. # -# source://prism//lib/prism.rb#103 +# source://prism//lib/prism.rb#90 Prism::BACKEND = T.let(T.unsafe(nil), Symbol) # Represents reading a reference to a field in the previous match. @@ -1756,49 +1744,49 @@ Prism::BACKEND = T.let(T.unsafe(nil), Symbol) # $' # ^^ # -# source://prism//lib/prism/node.rb#1494 +# source://prism//lib/prism/node.rb#1502 class Prism::BackReferenceReadNode < ::Prism::Node # Initialize a new BackReferenceReadNode node. # # @return [BackReferenceReadNode] a new instance of BackReferenceReadNode # - # source://prism//lib/prism/node.rb#1496 + # source://prism//lib/prism/node.rb#1504 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#1567 + # source://prism//lib/prism/node.rb#1575 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1505 + # source://prism//lib/prism/node.rb#1513 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#1510 + # source://prism//lib/prism/node.rb#1518 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1526 + # source://prism//lib/prism/node.rb#1534 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1521 + # source://prism//lib/prism/node.rb#1529 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> BackReferenceReadNode # - # source://prism//lib/prism/node.rb#1531 + # source://prism//lib/prism/node.rb#1539 sig do params( node_id: Integer, @@ -1812,19 +1800,19 @@ class Prism::BackReferenceReadNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#1536 + # source://prism//lib/prism/node.rb#1544 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#1539 + # source://prism//lib/prism/node.rb#1547 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#1515 + # source://prism//lib/prism/node.rb#1523 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -1832,7 +1820,7 @@ class Prism::BackReferenceReadNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#1551 + # source://prism//lib/prism/node.rb#1559 sig { override.returns(String) } def inspect; end @@ -1842,20 +1830,20 @@ class Prism::BackReferenceReadNode < ::Prism::Node # # $+ # name `:$+` # - # source://prism//lib/prism/node.rb#1548 + # source://prism//lib/prism/node.rb#1556 sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#1556 + # source://prism//lib/prism/node.rb#1564 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#1561 + # source://prism//lib/prism/node.rb#1569 def type; end end end @@ -1894,13 +1882,13 @@ end # end # ^^^^^ # -# source://prism//lib/prism/node.rb#1579 +# source://prism//lib/prism/node.rb#1587 class Prism::BeginNode < ::Prism::Node # Initialize a new BeginNode node. # # @return [BeginNode] a new instance of BeginNode # - # source://prism//lib/prism/node.rb#1581 + # source://prism//lib/prism/node.rb#1589 sig do params( source: Prism::Source, @@ -1920,18 +1908,18 @@ class Prism::BeginNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#1737 + # source://prism//lib/prism/node.rb#1745 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1595 + # source://prism//lib/prism/node.rb#1603 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def begin_keyword: () -> String? # - # source://prism//lib/prism/node.rb#1711 + # source://prism//lib/prism/node.rb#1719 sig { returns(T.nilable(String)) } def begin_keyword; end @@ -1940,31 +1928,31 @@ class Prism::BeginNode < ::Prism::Node # begin x end # ^^^^^ # - # source://prism//lib/prism/node.rb#1646 + # source://prism//lib/prism/node.rb#1654 sig { returns(T.nilable(Prism::Location)) } def begin_keyword_loc; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#1600 + # source://prism//lib/prism/node.rb#1608 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1625 + # source://prism//lib/prism/node.rb#1633 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1615 + # source://prism//lib/prism/node.rb#1623 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?begin_keyword_loc: Location?, ?statements: StatementsNode?, ?rescue_clause: RescueNode?, ?else_clause: ElseNode?, ?ensure_clause: EnsureNode?, ?end_keyword_loc: Location?) -> BeginNode # - # source://prism//lib/prism/node.rb#1630 + # source://prism//lib/prism/node.rb#1638 sig do params( node_id: Integer, @@ -1983,13 +1971,13 @@ class Prism::BeginNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#1635 + # source://prism//lib/prism/node.rb#1643 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, begin_keyword_loc: Location?, statements: StatementsNode?, rescue_clause: RescueNode?, else_clause: ElseNode?, ensure_clause: EnsureNode?, end_keyword_loc: Location? } # - # source://prism//lib/prism/node.rb#1638 + # source://prism//lib/prism/node.rb#1646 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -1997,7 +1985,7 @@ class Prism::BeginNode < ::Prism::Node # # @yield [statements] # - # source://prism//lib/prism/node.rb#1605 + # source://prism//lib/prism/node.rb#1613 def each_child_node; end # Represents the else clause within the begin block. @@ -2005,13 +1993,13 @@ class Prism::BeginNode < ::Prism::Node # begin x; rescue y; else z; end # ^^^^^^ # - # source://prism//lib/prism/node.rb#1680 + # source://prism//lib/prism/node.rb#1688 sig { returns(T.nilable(Prism::ElseNode)) } def else_clause; end # def end_keyword: () -> String? # - # source://prism//lib/prism/node.rb#1716 + # source://prism//lib/prism/node.rb#1724 sig { returns(T.nilable(String)) } def end_keyword; end @@ -2020,7 +2008,7 @@ class Prism::BeginNode < ::Prism::Node # begin x end # ^^^ # - # source://prism//lib/prism/node.rb#1692 + # source://prism//lib/prism/node.rb#1700 sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end @@ -2029,7 +2017,7 @@ class Prism::BeginNode < ::Prism::Node # begin x; ensure y; end # ^^^^^^^^ # - # source://prism//lib/prism/node.rb#1686 + # source://prism//lib/prism/node.rb#1694 sig { returns(T.nilable(Prism::EnsureNode)) } def ensure_clause; end @@ -2038,7 +2026,7 @@ class Prism::BeginNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#1721 + # source://prism//lib/prism/node.rb#1729 sig { override.returns(String) } def inspect; end @@ -2050,20 +2038,20 @@ class Prism::BeginNode < ::Prism::Node # begin x; rescue y; end # ^^^^^^^^ # - # source://prism//lib/prism/node.rb#1674 + # source://prism//lib/prism/node.rb#1682 sig { returns(T.nilable(Prism::RescueNode)) } def rescue_clause; end # Save the begin_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#1660 + # source://prism//lib/prism/node.rb#1668 def save_begin_keyword_loc(repository); end # Save the end_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#1706 + # source://prism//lib/prism/node.rb#1714 def save_end_keyword_loc(repository); end # Represents the statements within the begin block. @@ -2071,20 +2059,20 @@ class Prism::BeginNode < ::Prism::Node # begin x end # ^ # - # source://prism//lib/prism/node.rb#1668 + # source://prism//lib/prism/node.rb#1676 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#1726 + # source://prism//lib/prism/node.rb#1734 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#1731 + # source://prism//lib/prism/node.rb#1739 def type; end end end @@ -2094,13 +2082,13 @@ end # bar(&args) # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#1752 +# source://prism//lib/prism/node.rb#1760 class Prism::BlockArgumentNode < ::Prism::Node # Initialize a new BlockArgumentNode node. # # @return [BlockArgumentNode] a new instance of BlockArgumentNode # - # source://prism//lib/prism/node.rb#1754 + # source://prism//lib/prism/node.rb#1762 sig do params( source: Prism::Source, @@ -2116,36 +2104,36 @@ class Prism::BlockArgumentNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#1849 + # source://prism//lib/prism/node.rb#1857 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1764 + # source://prism//lib/prism/node.rb#1772 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#1769 + # source://prism//lib/prism/node.rb#1777 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1788 + # source://prism//lib/prism/node.rb#1796 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1781 + # source://prism//lib/prism/node.rb#1789 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?expression: Prism::node?, ?operator_loc: Location) -> BlockArgumentNode # - # source://prism//lib/prism/node.rb#1793 + # source://prism//lib/prism/node.rb#1801 sig do params( node_id: Integer, @@ -2160,13 +2148,13 @@ class Prism::BlockArgumentNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#1798 + # source://prism//lib/prism/node.rb#1806 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, expression: Prism::node?, operator_loc: Location } # - # source://prism//lib/prism/node.rb#1801 + # source://prism//lib/prism/node.rb#1809 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -2174,7 +2162,7 @@ class Prism::BlockArgumentNode < ::Prism::Node # # @yield [expression] # - # source://prism//lib/prism/node.rb#1774 + # source://prism//lib/prism/node.rb#1782 def each_child_node; end # The expression that is being passed as a block argument. This can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). @@ -2182,7 +2170,7 @@ class Prism::BlockArgumentNode < ::Prism::Node # foo(&args) # ^^^^^ # - # source://prism//lib/prism/node.rb#1809 + # source://prism//lib/prism/node.rb#1817 sig { returns(T.nilable(Prism::Node)) } def expression; end @@ -2191,13 +2179,13 @@ class Prism::BlockArgumentNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#1833 + # source://prism//lib/prism/node.rb#1841 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#1828 + # source://prism//lib/prism/node.rb#1836 sig { returns(String) } def operator; end @@ -2206,26 +2194,26 @@ class Prism::BlockArgumentNode < ::Prism::Node # foo(&args) # ^ # - # source://prism//lib/prism/node.rb#1815 + # source://prism//lib/prism/node.rb#1823 sig { returns(Prism::Location) } def operator_loc; end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#1823 + # source://prism//lib/prism/node.rb#1831 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#1838 + # source://prism//lib/prism/node.rb#1846 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#1843 + # source://prism//lib/prism/node.rb#1851 def type; end end end @@ -2235,49 +2223,49 @@ end # a { |; b| } # ^ # -# source://prism//lib/prism/node.rb#1860 +# source://prism//lib/prism/node.rb#1868 class Prism::BlockLocalVariableNode < ::Prism::Node # Initialize a new BlockLocalVariableNode node. # # @return [BlockLocalVariableNode] a new instance of BlockLocalVariableNode # - # source://prism//lib/prism/node.rb#1862 + # source://prism//lib/prism/node.rb#1870 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#1937 + # source://prism//lib/prism/node.rb#1945 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1871 + # source://prism//lib/prism/node.rb#1879 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#1876 + # source://prism//lib/prism/node.rb#1884 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1892 + # source://prism//lib/prism/node.rb#1900 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1887 + # source://prism//lib/prism/node.rb#1895 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> BlockLocalVariableNode # - # source://prism//lib/prism/node.rb#1897 + # source://prism//lib/prism/node.rb#1905 sig do params( node_id: Integer, @@ -2291,19 +2279,19 @@ class Prism::BlockLocalVariableNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#1902 + # source://prism//lib/prism/node.rb#1910 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#1905 + # source://prism//lib/prism/node.rb#1913 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#1881 + # source://prism//lib/prism/node.rb#1889 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -2311,7 +2299,7 @@ class Prism::BlockLocalVariableNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#1921 + # source://prism//lib/prism/node.rb#1929 sig { override.returns(String) } def inspect; end @@ -2320,7 +2308,7 @@ class Prism::BlockLocalVariableNode < ::Prism::Node # a { |; b| } # name `:b` # ^ # - # source://prism//lib/prism/node.rb#1918 + # source://prism//lib/prism/node.rb#1926 sig { returns(Symbol) } def name; end @@ -2328,20 +2316,20 @@ class Prism::BlockLocalVariableNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#1910 + # source://prism//lib/prism/node.rb#1918 sig { returns(T::Boolean) } def repeated_parameter?; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#1926 + # source://prism//lib/prism/node.rb#1934 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#1931 + # source://prism//lib/prism/node.rb#1939 def type; end end end @@ -2351,13 +2339,13 @@ end # [1, 2, 3].each { |i| puts x } # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#1948 +# source://prism//lib/prism/node.rb#1956 class Prism::BlockNode < ::Prism::Node # Initialize a new BlockNode node. # # @return [BlockNode] a new instance of BlockNode # - # source://prism//lib/prism/node.rb#1950 + # source://prism//lib/prism/node.rb#1958 sig do params( source: Prism::Source, @@ -2376,12 +2364,12 @@ class Prism::BlockNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#2087 + # source://prism//lib/prism/node.rb#2095 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1963 + # source://prism//lib/prism/node.rb#1971 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -2390,46 +2378,46 @@ class Prism::BlockNode < ::Prism::Node # [1, 2, 3].each { |i| puts x } # ^^^^^^ # - # source://prism//lib/prism/node.rb#2026 + # source://prism//lib/prism/node.rb#2034 sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } def body; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#1968 + # source://prism//lib/prism/node.rb#1976 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#2066 + # source://prism//lib/prism/node.rb#2074 sig { returns(String) } def closing; end - # Represents the location of the closing `|`. + # Represents the location of the closing `}` or `end`. # # [1, 2, 3].each { |i| puts x } - # ^ + # ^ # - # source://prism//lib/prism/node.rb#2048 + # source://prism//lib/prism/node.rb#2056 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1989 + # source://prism//lib/prism/node.rb#1997 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1981 + # source://prism//lib/prism/node.rb#1989 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil, ?body: StatementsNode | BeginNode | nil, ?opening_loc: Location, ?closing_loc: Location) -> BlockNode # - # source://prism//lib/prism/node.rb#1994 + # source://prism//lib/prism/node.rb#2002 sig do params( node_id: Integer, @@ -2447,13 +2435,13 @@ class Prism::BlockNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#1999 + # source://prism//lib/prism/node.rb#2007 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil, body: StatementsNode | BeginNode | nil, opening_loc: Location, closing_loc: Location } # - # source://prism//lib/prism/node.rb#2002 + # source://prism//lib/prism/node.rb#2010 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -2461,7 +2449,7 @@ class Prism::BlockNode < ::Prism::Node # # @yield [parameters] # - # source://prism//lib/prism/node.rb#1973 + # source://prism//lib/prism/node.rb#1981 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -2469,7 +2457,7 @@ class Prism::BlockNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#2071 + # source://prism//lib/prism/node.rb#2079 sig { override.returns(String) } def inspect; end @@ -2478,22 +2466,22 @@ class Prism::BlockNode < ::Prism::Node # [1, 2, 3].each { |i| puts x } # locals: [:i] # ^ # - # source://prism//lib/prism/node.rb#2010 + # source://prism//lib/prism/node.rb#2018 sig { returns(T::Array[Symbol]) } def locals; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#2061 + # source://prism//lib/prism/node.rb#2069 sig { returns(String) } def opening; end - # Represents the location of the opening `|`. + # Represents the location of the opening `{` or `do`. # # [1, 2, 3].each { |i| puts x } - # ^ + # ^ # - # source://prism//lib/prism/node.rb#2032 + # source://prism//lib/prism/node.rb#2040 sig { returns(Prism::Location) } def opening_loc; end @@ -2506,32 +2494,32 @@ class Prism::BlockNode < ::Prism::Node # [1, 2, 3].each { puts it } # ^^^^^^^^^^^ # - # source://prism//lib/prism/node.rb#2020 + # source://prism//lib/prism/node.rb#2028 sig { returns(T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode))) } def parameters; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#2056 + # source://prism//lib/prism/node.rb#2064 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#2040 + # source://prism//lib/prism/node.rb#2048 def save_opening_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#2076 + # source://prism//lib/prism/node.rb#2084 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#2081 + # source://prism//lib/prism/node.rb#2089 def type; end end end @@ -2542,13 +2530,13 @@ end # ^^ # end # -# source://prism//lib/prism/node.rb#2103 +# source://prism//lib/prism/node.rb#2111 class Prism::BlockParameterNode < ::Prism::Node # Initialize a new BlockParameterNode node. # # @return [BlockParameterNode] a new instance of BlockParameterNode # - # source://prism//lib/prism/node.rb#2105 + # source://prism//lib/prism/node.rb#2113 sig do params( source: Prism::Source, @@ -2565,36 +2553,36 @@ class Prism::BlockParameterNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#2227 + # source://prism//lib/prism/node.rb#2235 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#2116 + # source://prism//lib/prism/node.rb#2124 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#2121 + # source://prism//lib/prism/node.rb#2129 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#2137 + # source://prism//lib/prism/node.rb#2145 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#2132 + # source://prism//lib/prism/node.rb#2140 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol?, ?name_loc: Location?, ?operator_loc: Location) -> BlockParameterNode # - # source://prism//lib/prism/node.rb#2142 + # source://prism//lib/prism/node.rb#2150 sig do params( node_id: Integer, @@ -2610,19 +2598,19 @@ class Prism::BlockParameterNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#2147 + # source://prism//lib/prism/node.rb#2155 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol?, name_loc: Location?, operator_loc: Location } # - # source://prism//lib/prism/node.rb#2150 + # source://prism//lib/prism/node.rb#2158 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#2126 + # source://prism//lib/prism/node.rb#2134 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -2630,7 +2618,7 @@ class Prism::BlockParameterNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#2211 + # source://prism//lib/prism/node.rb#2219 sig { override.returns(String) } def inspect; end @@ -2640,7 +2628,7 @@ class Prism::BlockParameterNode < ::Prism::Node # ^ # end # - # source://prism//lib/prism/node.rb#2164 + # source://prism//lib/prism/node.rb#2172 sig { returns(T.nilable(Symbol)) } def name; end @@ -2649,13 +2637,13 @@ class Prism::BlockParameterNode < ::Prism::Node # def a(&b) # ^ # - # source://prism//lib/prism/node.rb#2170 + # source://prism//lib/prism/node.rb#2178 sig { returns(T.nilable(Prism::Location)) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#2206 + # source://prism//lib/prism/node.rb#2214 sig { returns(String) } def operator; end @@ -2665,7 +2653,7 @@ class Prism::BlockParameterNode < ::Prism::Node # ^ # end # - # source://prism//lib/prism/node.rb#2193 + # source://prism//lib/prism/node.rb#2201 sig { returns(Prism::Location) } def operator_loc; end @@ -2673,32 +2661,32 @@ class Prism::BlockParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2155 + # source://prism//lib/prism/node.rb#2163 sig { returns(T::Boolean) } def repeated_parameter?; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#2184 + # source://prism//lib/prism/node.rb#2192 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#2201 + # source://prism//lib/prism/node.rb#2209 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#2216 + # source://prism//lib/prism/node.rb#2224 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#2221 + # source://prism//lib/prism/node.rb#2229 def type; end end end @@ -2712,13 +2700,13 @@ end # ^^^^^^^^^^^^^^^^^ # end # -# source://prism//lib/prism/node.rb#2244 +# source://prism//lib/prism/node.rb#2252 class Prism::BlockParametersNode < ::Prism::Node # Initialize a new BlockParametersNode node. # # @return [BlockParametersNode] a new instance of BlockParametersNode # - # source://prism//lib/prism/node.rb#2246 + # source://prism//lib/prism/node.rb#2254 sig do params( source: Prism::Source, @@ -2736,24 +2724,24 @@ class Prism::BlockParametersNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#2400 + # source://prism//lib/prism/node.rb#2408 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#2258 + # source://prism//lib/prism/node.rb#2266 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#2263 + # source://prism//lib/prism/node.rb#2271 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#2379 + # source://prism//lib/prism/node.rb#2387 sig { returns(T.nilable(String)) } def closing; end @@ -2766,25 +2754,25 @@ class Prism::BlockParametersNode < ::Prism::Node # ^ # end # - # source://prism//lib/prism/node.rb#2355 + # source://prism//lib/prism/node.rb#2363 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#2284 + # source://prism//lib/prism/node.rb#2292 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#2276 + # source://prism//lib/prism/node.rb#2284 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?parameters: ParametersNode?, ?locals: Array[BlockLocalVariableNode], ?opening_loc: Location?, ?closing_loc: Location?) -> BlockParametersNode # - # source://prism//lib/prism/node.rb#2289 + # source://prism//lib/prism/node.rb#2297 sig do params( node_id: Integer, @@ -2801,13 +2789,13 @@ class Prism::BlockParametersNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#2294 + # source://prism//lib/prism/node.rb#2302 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, parameters: ParametersNode?, locals: Array[BlockLocalVariableNode], opening_loc: Location?, closing_loc: Location? } # - # source://prism//lib/prism/node.rb#2297 + # source://prism//lib/prism/node.rb#2305 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -2815,7 +2803,7 @@ class Prism::BlockParametersNode < ::Prism::Node # # @yield [parameters] # - # source://prism//lib/prism/node.rb#2268 + # source://prism//lib/prism/node.rb#2276 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -2823,7 +2811,7 @@ class Prism::BlockParametersNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#2384 + # source://prism//lib/prism/node.rb#2392 sig { override.returns(String) } def inspect; end @@ -2836,13 +2824,13 @@ class Prism::BlockParametersNode < ::Prism::Node # ^^^^^ # end # - # source://prism//lib/prism/node.rb#2319 + # source://prism//lib/prism/node.rb#2327 sig { returns(T::Array[Prism::BlockLocalVariableNode]) } def locals; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#2374 + # source://prism//lib/prism/node.rb#2382 sig { returns(T.nilable(String)) } def opening; end @@ -2855,7 +2843,7 @@ class Prism::BlockParametersNode < ::Prism::Node # ^ # end # - # source://prism//lib/prism/node.rb#2329 + # source://prism//lib/prism/node.rb#2337 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end @@ -2868,32 +2856,32 @@ class Prism::BlockParametersNode < ::Prism::Node # ^^^^^^^^ # end # - # source://prism//lib/prism/node.rb#2309 + # source://prism//lib/prism/node.rb#2317 sig { returns(T.nilable(Prism::ParametersNode)) } def parameters; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#2369 + # source://prism//lib/prism/node.rb#2377 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#2343 + # source://prism//lib/prism/node.rb#2351 def save_opening_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#2389 + # source://prism//lib/prism/node.rb#2397 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#2394 + # source://prism//lib/prism/node.rb#2402 def type; end end end @@ -2903,13 +2891,13 @@ end # break foo # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#2414 +# source://prism//lib/prism/node.rb#2422 class Prism::BreakNode < ::Prism::Node # Initialize a new BreakNode node. # # @return [BreakNode] a new instance of BreakNode # - # source://prism//lib/prism/node.rb#2416 + # source://prism//lib/prism/node.rb#2424 sig do params( source: Prism::Source, @@ -2925,12 +2913,12 @@ class Prism::BreakNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#2511 + # source://prism//lib/prism/node.rb#2519 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#2426 + # source://prism//lib/prism/node.rb#2434 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -2939,31 +2927,31 @@ class Prism::BreakNode < ::Prism::Node # break foo # ^^^ # - # source://prism//lib/prism/node.rb#2471 + # source://prism//lib/prism/node.rb#2479 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#2431 + # source://prism//lib/prism/node.rb#2439 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#2450 + # source://prism//lib/prism/node.rb#2458 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#2443 + # source://prism//lib/prism/node.rb#2451 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?arguments: ArgumentsNode?, ?keyword_loc: Location) -> BreakNode # - # source://prism//lib/prism/node.rb#2455 + # source://prism//lib/prism/node.rb#2463 sig do params( node_id: Integer, @@ -2978,13 +2966,13 @@ class Prism::BreakNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#2460 + # source://prism//lib/prism/node.rb#2468 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, arguments: ArgumentsNode?, keyword_loc: Location } # - # source://prism//lib/prism/node.rb#2463 + # source://prism//lib/prism/node.rb#2471 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -2992,7 +2980,7 @@ class Prism::BreakNode < ::Prism::Node # # @yield [arguments] # - # source://prism//lib/prism/node.rb#2436 + # source://prism//lib/prism/node.rb#2444 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -3000,13 +2988,13 @@ class Prism::BreakNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#2495 + # source://prism//lib/prism/node.rb#2503 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#2490 + # source://prism//lib/prism/node.rb#2498 sig { returns(String) } def keyword; end @@ -3015,26 +3003,26 @@ class Prism::BreakNode < ::Prism::Node # break foo # ^^^^^ # - # source://prism//lib/prism/node.rb#2477 + # source://prism//lib/prism/node.rb#2485 sig { returns(Prism::Location) } def keyword_loc; end # Save the keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#2485 + # source://prism//lib/prism/node.rb#2493 def save_keyword_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#2500 + # source://prism//lib/prism/node.rb#2508 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#2505 + # source://prism//lib/prism/node.rb#2513 def type; end end end @@ -3044,13 +3032,13 @@ end # foo.bar &&= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#2522 +# source://prism//lib/prism/node.rb#2530 class Prism::CallAndWriteNode < ::Prism::Node # Initialize a new CallAndWriteNode node. # # @return [CallAndWriteNode] a new instance of CallAndWriteNode # - # source://prism//lib/prism/node.rb#2524 + # source://prism//lib/prism/node.rb#2532 sig do params( source: Prism::Source, @@ -3071,12 +3059,12 @@ class Prism::CallAndWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#2718 + # source://prism//lib/prism/node.rb#2726 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#2539 + # source://prism//lib/prism/node.rb#2547 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -3084,13 +3072,13 @@ class Prism::CallAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2593 + # source://prism//lib/prism/node.rb#2601 sig { returns(T::Boolean) } def attribute_write?; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#2687 + # source://prism//lib/prism/node.rb#2695 sig { returns(T.nilable(String)) } def call_operator; end @@ -3099,31 +3087,31 @@ class Prism::CallAndWriteNode < ::Prism::Node # foo.bar &&= value # ^ # - # source://prism//lib/prism/node.rb#2612 + # source://prism//lib/prism/node.rb#2620 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#2544 + # source://prism//lib/prism/node.rb#2552 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#2565 + # source://prism//lib/prism/node.rb#2573 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#2557 + # source://prism//lib/prism/node.rb#2565 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?message_loc: Location?, ?read_name: Symbol, ?write_name: Symbol, ?operator_loc: Location, ?value: Prism::node) -> CallAndWriteNode # - # source://prism//lib/prism/node.rb#2570 + # source://prism//lib/prism/node.rb#2578 sig do params( node_id: Integer, @@ -3143,13 +3131,13 @@ class Prism::CallAndWriteNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#2575 + # source://prism//lib/prism/node.rb#2583 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#2578 + # source://prism//lib/prism/node.rb#2586 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -3157,7 +3145,7 @@ class Prism::CallAndWriteNode < ::Prism::Node # # @yield [receiver] # - # source://prism//lib/prism/node.rb#2549 + # source://prism//lib/prism/node.rb#2557 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -3167,19 +3155,19 @@ class Prism::CallAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2598 + # source://prism//lib/prism/node.rb#2606 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#2702 + # source://prism//lib/prism/node.rb#2710 sig { override.returns(String) } def inspect; end # def message: () -> String? # - # source://prism//lib/prism/node.rb#2692 + # source://prism//lib/prism/node.rb#2700 sig { returns(T.nilable(String)) } def message; end @@ -3188,13 +3176,13 @@ class Prism::CallAndWriteNode < ::Prism::Node # foo.bar &&= value # ^^^ # - # source://prism//lib/prism/node.rb#2634 + # source://prism//lib/prism/node.rb#2642 sig { returns(T.nilable(Prism::Location)) } def message_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#2697 + # source://prism//lib/prism/node.rb#2705 sig { returns(String) } def operator; end @@ -3203,7 +3191,7 @@ class Prism::CallAndWriteNode < ::Prism::Node # foo.bar &&= value # ^^^ # - # source://prism//lib/prism/node.rb#2668 + # source://prism//lib/prism/node.rb#2676 sig { returns(Prism::Location) } def operator_loc; end @@ -3212,7 +3200,7 @@ class Prism::CallAndWriteNode < ::Prism::Node # foo.bar &&= value # read_name `:bar` # ^^^ # - # source://prism//lib/prism/node.rb#2656 + # source://prism//lib/prism/node.rb#2664 sig { returns(Symbol) } def read_name; end @@ -3221,7 +3209,7 @@ class Prism::CallAndWriteNode < ::Prism::Node # foo.bar &&= value # ^^^ # - # source://prism//lib/prism/node.rb#2606 + # source://prism//lib/prism/node.rb#2614 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -3229,31 +3217,31 @@ class Prism::CallAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2583 + # source://prism//lib/prism/node.rb#2591 sig { returns(T::Boolean) } def safe_navigation?; end # Save the call_operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#2626 + # source://prism//lib/prism/node.rb#2634 def save_call_operator_loc(repository); end # Save the message_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#2648 + # source://prism//lib/prism/node.rb#2656 def save_message_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#2676 + # source://prism//lib/prism/node.rb#2684 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#2707 + # source://prism//lib/prism/node.rb#2715 sig { override.returns(Symbol) } def type; end @@ -3262,7 +3250,7 @@ class Prism::CallAndWriteNode < ::Prism::Node # foo.bar &&= value # ^^^^^ # - # source://prism//lib/prism/node.rb#2684 + # source://prism//lib/prism/node.rb#2692 sig { returns(Prism::Node) } def value; end @@ -3270,7 +3258,7 @@ class Prism::CallAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2588 + # source://prism//lib/prism/node.rb#2596 sig { returns(T::Boolean) } def variable_call?; end @@ -3279,14 +3267,14 @@ class Prism::CallAndWriteNode < ::Prism::Node # foo.bar &&= value # write_name `:bar=` # ^^^ # - # source://prism//lib/prism/node.rb#2662 + # source://prism//lib/prism/node.rb#2670 sig { returns(Symbol) } def write_name; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#2712 + # source://prism//lib/prism/node.rb#2720 def type; end end end @@ -3311,13 +3299,13 @@ end # foo&.bar # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#2750 +# source://prism//lib/prism/node.rb#2758 class Prism::CallNode < ::Prism::Node # Initialize a new CallNode node. # # @return [CallNode] a new instance of CallNode # - # source://prism//lib/prism/node.rb#2752 + # source://prism//lib/prism/node.rb#2760 sig do params( source: Prism::Source, @@ -3340,12 +3328,12 @@ class Prism::CallNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#3021 + # source://prism//lib/prism/node.rb#3029 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#2769 + # source://prism//lib/prism/node.rb#2777 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -3354,7 +3342,7 @@ class Prism::CallNode < ::Prism::Node # foo(bar) # ^^^ # - # source://prism//lib/prism/node.rb#2924 + # source://prism//lib/prism/node.rb#2932 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end @@ -3362,7 +3350,7 @@ class Prism::CallNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2825 + # source://prism//lib/prism/node.rb#2833 sig { returns(T::Boolean) } def attribute_write?; end @@ -3371,13 +3359,13 @@ class Prism::CallNode < ::Prism::Node # foo { |a| a } # ^^^^^^^^^ # - # source://prism//lib/prism/node.rb#2977 + # source://prism//lib/prism/node.rb#2985 sig { returns(T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode))) } def block; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#2980 + # source://prism//lib/prism/node.rb#2988 sig { returns(T.nilable(String)) } def call_operator; end @@ -3389,19 +3377,19 @@ class Prism::CallNode < ::Prism::Node # foo&.bar # ^^ # - # source://prism//lib/prism/node.rb#2853 + # source://prism//lib/prism/node.rb#2861 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#2774 + # source://prism//lib/prism/node.rb#2782 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#2995 + # source://prism//lib/prism/node.rb#3003 sig { returns(T.nilable(String)) } def closing; end @@ -3410,25 +3398,25 @@ class Prism::CallNode < ::Prism::Node # foo(bar) # ^ # - # source://prism//lib/prism/node.rb#2930 + # source://prism//lib/prism/node.rb#2938 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#2797 + # source://prism//lib/prism/node.rb#2805 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#2788 + # source://prism//lib/prism/node.rb#2796 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?name: Symbol, ?message_loc: Location?, ?opening_loc: Location?, ?arguments: ArgumentsNode?, ?closing_loc: Location?, ?equal_loc: Location?, ?block: BlockNode | BlockArgumentNode | nil) -> CallNode # - # source://prism//lib/prism/node.rb#2802 + # source://prism//lib/prism/node.rb#2810 sig do params( node_id: Integer, @@ -3450,13 +3438,13 @@ class Prism::CallNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#2807 + # source://prism//lib/prism/node.rb#2815 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, name: Symbol, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, equal_loc: Location?, block: BlockNode | BlockArgumentNode | nil } # - # source://prism//lib/prism/node.rb#2810 + # source://prism//lib/prism/node.rb#2818 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -3464,12 +3452,12 @@ class Prism::CallNode < ::Prism::Node # # @yield [receiver] # - # source://prism//lib/prism/node.rb#2779 + # source://prism//lib/prism/node.rb#2787 def each_child_node; end # def equal: () -> String? # - # source://prism//lib/prism/node.rb#3000 + # source://prism//lib/prism/node.rb#3008 sig { returns(T.nilable(String)) } def equal; end @@ -3481,7 +3469,7 @@ class Prism::CallNode < ::Prism::Node # foo[bar] = value # ^ # - # source://prism//lib/prism/node.rb#2955 + # source://prism//lib/prism/node.rb#2963 sig { returns(T.nilable(Prism::Location)) } def equal_loc; end @@ -3506,19 +3494,19 @@ class Prism::CallNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2830 + # source://prism//lib/prism/node.rb#2838 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#3005 + # source://prism//lib/prism/node.rb#3013 sig { override.returns(String) } def inspect; end # def message: () -> String? # - # source://prism//lib/prism/node.rb#2985 + # source://prism//lib/prism/node.rb#2993 sig { returns(T.nilable(String)) } def message; end @@ -3527,7 +3515,7 @@ class Prism::CallNode < ::Prism::Node # foo.bar # ^^^ # - # source://prism//lib/prism/node.rb#2881 + # source://prism//lib/prism/node.rb#2889 sig { returns(T.nilable(Prism::Location)) } def message_loc; end @@ -3536,13 +3524,13 @@ class Prism::CallNode < ::Prism::Node # foo.bar # name `:foo` # ^^^ # - # source://prism//lib/prism/node.rb#2875 + # source://prism//lib/prism/node.rb#2883 sig { returns(Symbol) } def name; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#2990 + # source://prism//lib/prism/node.rb#2998 sig { returns(T.nilable(String)) } def opening; end @@ -3550,7 +3538,7 @@ class Prism::CallNode < ::Prism::Node # foo(bar) # ^ # - # source://prism//lib/prism/node.rb#2902 + # source://prism//lib/prism/node.rb#2910 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end @@ -3565,7 +3553,7 @@ class Prism::CallNode < ::Prism::Node # foo + bar # ^^^ # - # source://prism//lib/prism/node.rb#2844 + # source://prism//lib/prism/node.rb#2852 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -3573,43 +3561,43 @@ class Prism::CallNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2815 + # source://prism//lib/prism/node.rb#2823 sig { returns(T::Boolean) } def safe_navigation?; end # Save the call_operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#2867 + # source://prism//lib/prism/node.rb#2875 def save_call_operator_loc(repository); end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#2944 + # source://prism//lib/prism/node.rb#2952 def save_closing_loc(repository); end # Save the equal_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#2969 + # source://prism//lib/prism/node.rb#2977 def save_equal_loc(repository); end # Save the message_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#2895 + # source://prism//lib/prism/node.rb#2903 def save_message_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#2916 + # source://prism//lib/prism/node.rb#2924 def save_opening_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#3010 + # source://prism//lib/prism/node.rb#3018 sig { override.returns(Symbol) } def type; end @@ -3617,41 +3605,41 @@ class Prism::CallNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2820 + # source://prism//lib/prism/node.rb#2828 sig { returns(T::Boolean) } def variable_call?; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#3015 + # source://prism//lib/prism/node.rb#3023 def type; end end end # Flags for call nodes. # -# source://prism//lib/prism/node.rb#19796 +# source://prism//lib/prism/node.rb#19804 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#19804 +# source://prism//lib/prism/node.rb#19812 Prism::CallNodeFlags::ATTRIBUTE_WRITE = T.let(T.unsafe(nil), Integer) # a call that ignores method visibility # -# source://prism//lib/prism/node.rb#19807 +# source://prism//lib/prism/node.rb#19815 Prism::CallNodeFlags::IGNORE_VISIBILITY = T.let(T.unsafe(nil), Integer) # &. operator # -# source://prism//lib/prism/node.rb#19798 +# source://prism//lib/prism/node.rb#19806 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#19801 +# source://prism//lib/prism/node.rb#19809 Prism::CallNodeFlags::VARIABLE_CALL = T.let(T.unsafe(nil), Integer) # Represents the use of an assignment operator on a call. @@ -3659,13 +3647,13 @@ Prism::CallNodeFlags::VARIABLE_CALL = T.let(T.unsafe(nil), Integer) # foo.bar += baz # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3040 +# source://prism//lib/prism/node.rb#3048 class Prism::CallOperatorWriteNode < ::Prism::Node # Initialize a new CallOperatorWriteNode node. # # @return [CallOperatorWriteNode] a new instance of CallOperatorWriteNode # - # source://prism//lib/prism/node.rb#3042 + # source://prism//lib/prism/node.rb#3050 sig do params( source: Prism::Source, @@ -3687,12 +3675,12 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#3238 + # source://prism//lib/prism/node.rb#3246 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3058 + # source://prism//lib/prism/node.rb#3066 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -3700,7 +3688,7 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#3112 + # source://prism//lib/prism/node.rb#3120 sig { returns(T::Boolean) } def attribute_write?; end @@ -3709,7 +3697,7 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # foo.bar += value # binary_operator `:+` # ^ # - # source://prism//lib/prism/node.rb#3187 + # source://prism//lib/prism/node.rb#3195 sig { returns(Symbol) } def binary_operator; end @@ -3718,13 +3706,13 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # foo.bar += value # ^^ # - # source://prism//lib/prism/node.rb#3193 + # source://prism//lib/prism/node.rb#3201 sig { returns(Prism::Location) } def binary_operator_loc; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#3212 + # source://prism//lib/prism/node.rb#3220 sig { returns(T.nilable(String)) } def call_operator; end @@ -3733,31 +3721,31 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # foo.bar += value # ^ # - # source://prism//lib/prism/node.rb#3131 + # source://prism//lib/prism/node.rb#3139 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#3063 + # source://prism//lib/prism/node.rb#3071 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#3084 + # source://prism//lib/prism/node.rb#3092 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#3076 + # source://prism//lib/prism/node.rb#3084 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?message_loc: Location?, ?read_name: Symbol, ?write_name: Symbol, ?binary_operator: Symbol, ?binary_operator_loc: Location, ?value: Prism::node) -> CallOperatorWriteNode # - # source://prism//lib/prism/node.rb#3089 + # source://prism//lib/prism/node.rb#3097 sig do params( node_id: Integer, @@ -3778,13 +3766,13 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#3094 + # source://prism//lib/prism/node.rb#3102 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, binary_operator: Symbol, binary_operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#3097 + # source://prism//lib/prism/node.rb#3105 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -3792,7 +3780,7 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # # @yield [receiver] # - # source://prism//lib/prism/node.rb#3068 + # source://prism//lib/prism/node.rb#3076 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -3802,19 +3790,19 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#3117 + # source://prism//lib/prism/node.rb#3125 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#3222 + # source://prism//lib/prism/node.rb#3230 sig { override.returns(String) } def inspect; end # def message: () -> String? # - # source://prism//lib/prism/node.rb#3217 + # source://prism//lib/prism/node.rb#3225 sig { returns(T.nilable(String)) } def message; end @@ -3823,7 +3811,7 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # foo.bar += value # ^^^ # - # source://prism//lib/prism/node.rb#3153 + # source://prism//lib/prism/node.rb#3161 sig { returns(T.nilable(Prism::Location)) } def message_loc; end @@ -3844,7 +3832,7 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # foo.bar += value # read_name `:bar` # ^^^ # - # source://prism//lib/prism/node.rb#3175 + # source://prism//lib/prism/node.rb#3183 sig { returns(Symbol) } def read_name; end @@ -3853,7 +3841,7 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # foo.bar += value # ^^^ # - # source://prism//lib/prism/node.rb#3125 + # source://prism//lib/prism/node.rb#3133 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -3861,31 +3849,31 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#3102 + # source://prism//lib/prism/node.rb#3110 sig { returns(T::Boolean) } def safe_navigation?; end # Save the binary_operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#3201 + # source://prism//lib/prism/node.rb#3209 def save_binary_operator_loc(repository); end # Save the call_operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#3145 + # source://prism//lib/prism/node.rb#3153 def save_call_operator_loc(repository); end # Save the message_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#3167 + # source://prism//lib/prism/node.rb#3175 def save_message_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#3227 + # source://prism//lib/prism/node.rb#3235 sig { override.returns(Symbol) } def type; end @@ -3894,7 +3882,7 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # foo.bar += value # ^^^^^ # - # source://prism//lib/prism/node.rb#3209 + # source://prism//lib/prism/node.rb#3217 sig { returns(Prism::Node) } def value; end @@ -3902,7 +3890,7 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#3107 + # source://prism//lib/prism/node.rb#3115 sig { returns(T::Boolean) } def variable_call?; end @@ -3911,14 +3899,14 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # foo.bar += value # write_name `:bar=` # ^^^ # - # source://prism//lib/prism/node.rb#3181 + # source://prism//lib/prism/node.rb#3189 sig { returns(Symbol) } def write_name; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#3232 + # source://prism//lib/prism/node.rb#3240 def type; end end end @@ -3928,13 +3916,13 @@ end # foo.bar ||= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3256 +# source://prism//lib/prism/node.rb#3264 class Prism::CallOrWriteNode < ::Prism::Node # Initialize a new CallOrWriteNode node. # # @return [CallOrWriteNode] a new instance of CallOrWriteNode # - # source://prism//lib/prism/node.rb#3258 + # source://prism//lib/prism/node.rb#3266 sig do params( source: Prism::Source, @@ -3955,12 +3943,12 @@ class Prism::CallOrWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#3452 + # source://prism//lib/prism/node.rb#3460 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3273 + # source://prism//lib/prism/node.rb#3281 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -3968,13 +3956,13 @@ class Prism::CallOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#3327 + # source://prism//lib/prism/node.rb#3335 sig { returns(T::Boolean) } def attribute_write?; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#3421 + # source://prism//lib/prism/node.rb#3429 sig { returns(T.nilable(String)) } def call_operator; end @@ -3983,31 +3971,31 @@ class Prism::CallOrWriteNode < ::Prism::Node # foo.bar ||= value # ^ # - # source://prism//lib/prism/node.rb#3346 + # source://prism//lib/prism/node.rb#3354 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#3278 + # source://prism//lib/prism/node.rb#3286 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#3299 + # source://prism//lib/prism/node.rb#3307 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#3291 + # source://prism//lib/prism/node.rb#3299 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?message_loc: Location?, ?read_name: Symbol, ?write_name: Symbol, ?operator_loc: Location, ?value: Prism::node) -> CallOrWriteNode # - # source://prism//lib/prism/node.rb#3304 + # source://prism//lib/prism/node.rb#3312 sig do params( node_id: Integer, @@ -4027,13 +4015,13 @@ class Prism::CallOrWriteNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#3309 + # source://prism//lib/prism/node.rb#3317 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#3312 + # source://prism//lib/prism/node.rb#3320 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -4041,7 +4029,7 @@ class Prism::CallOrWriteNode < ::Prism::Node # # @yield [receiver] # - # source://prism//lib/prism/node.rb#3283 + # source://prism//lib/prism/node.rb#3291 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -4051,19 +4039,19 @@ class Prism::CallOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#3332 + # source://prism//lib/prism/node.rb#3340 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#3436 + # source://prism//lib/prism/node.rb#3444 sig { override.returns(String) } def inspect; end # def message: () -> String? # - # source://prism//lib/prism/node.rb#3426 + # source://prism//lib/prism/node.rb#3434 sig { returns(T.nilable(String)) } def message; end @@ -4072,13 +4060,13 @@ class Prism::CallOrWriteNode < ::Prism::Node # foo.bar ||= value # ^^^ # - # source://prism//lib/prism/node.rb#3368 + # source://prism//lib/prism/node.rb#3376 sig { returns(T.nilable(Prism::Location)) } def message_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#3431 + # source://prism//lib/prism/node.rb#3439 sig { returns(String) } def operator; end @@ -4087,7 +4075,7 @@ class Prism::CallOrWriteNode < ::Prism::Node # foo.bar ||= value # ^^^ # - # source://prism//lib/prism/node.rb#3402 + # source://prism//lib/prism/node.rb#3410 sig { returns(Prism::Location) } def operator_loc; end @@ -4096,7 +4084,7 @@ class Prism::CallOrWriteNode < ::Prism::Node # foo.bar ||= value # read_name `:bar` # ^^^ # - # source://prism//lib/prism/node.rb#3390 + # source://prism//lib/prism/node.rb#3398 sig { returns(Symbol) } def read_name; end @@ -4105,7 +4093,7 @@ class Prism::CallOrWriteNode < ::Prism::Node # foo.bar ||= value # ^^^ # - # source://prism//lib/prism/node.rb#3340 + # source://prism//lib/prism/node.rb#3348 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -4113,31 +4101,31 @@ class Prism::CallOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#3317 + # source://prism//lib/prism/node.rb#3325 sig { returns(T::Boolean) } def safe_navigation?; end # Save the call_operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#3360 + # source://prism//lib/prism/node.rb#3368 def save_call_operator_loc(repository); end # Save the message_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#3382 + # source://prism//lib/prism/node.rb#3390 def save_message_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#3410 + # source://prism//lib/prism/node.rb#3418 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#3441 + # source://prism//lib/prism/node.rb#3449 sig { override.returns(Symbol) } def type; end @@ -4146,7 +4134,7 @@ class Prism::CallOrWriteNode < ::Prism::Node # foo.bar ||= value # ^^^^^ # - # source://prism//lib/prism/node.rb#3418 + # source://prism//lib/prism/node.rb#3426 sig { returns(Prism::Node) } def value; end @@ -4154,7 +4142,7 @@ class Prism::CallOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#3322 + # source://prism//lib/prism/node.rb#3330 sig { returns(T::Boolean) } def variable_call?; end @@ -4163,14 +4151,14 @@ class Prism::CallOrWriteNode < ::Prism::Node # foo.bar ||= value # write_name `:bar=` # ^^^ # - # source://prism//lib/prism/node.rb#3396 + # source://prism//lib/prism/node.rb#3404 sig { returns(Symbol) } def write_name; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#3446 + # source://prism//lib/prism/node.rb#3454 def type; end end end @@ -4188,13 +4176,13 @@ end # for foo.bar in baz do end # ^^^^^^^ # -# source://prism//lib/prism/node.rb#3477 +# source://prism//lib/prism/node.rb#3485 class Prism::CallTargetNode < ::Prism::Node # Initialize a new CallTargetNode node. # # @return [CallTargetNode] a new instance of CallTargetNode # - # source://prism//lib/prism/node.rb#3479 + # source://prism//lib/prism/node.rb#3487 sig do params( source: Prism::Source, @@ -4212,12 +4200,12 @@ class Prism::CallTargetNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#3621 + # source://prism//lib/prism/node.rb#3629 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3491 + # source://prism//lib/prism/node.rb#3499 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -4225,13 +4213,13 @@ class Prism::CallTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#3541 + # source://prism//lib/prism/node.rb#3549 sig { returns(T::Boolean) } def attribute_write?; end # def call_operator: () -> String # - # source://prism//lib/prism/node.rb#3595 + # source://prism//lib/prism/node.rb#3603 sig { returns(String) } def call_operator; end @@ -4240,31 +4228,31 @@ class Prism::CallTargetNode < ::Prism::Node # foo.bar = 1 # ^ # - # source://prism//lib/prism/node.rb#3560 + # source://prism//lib/prism/node.rb#3568 sig { returns(Prism::Location) } def call_operator_loc; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#3496 + # 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#3513 + # source://prism//lib/prism/node.rb#3521 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#3508 + # source://prism//lib/prism/node.rb#3516 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node, ?call_operator_loc: Location, ?name: Symbol, ?message_loc: Location) -> CallTargetNode # - # source://prism//lib/prism/node.rb#3518 + # source://prism//lib/prism/node.rb#3526 sig do params( node_id: Integer, @@ -4281,13 +4269,13 @@ class Prism::CallTargetNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#3523 + # source://prism//lib/prism/node.rb#3531 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node, call_operator_loc: Location, name: Symbol, message_loc: Location } # - # source://prism//lib/prism/node.rb#3526 + # source://prism//lib/prism/node.rb#3534 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -4295,7 +4283,7 @@ class Prism::CallTargetNode < ::Prism::Node # # @yield [receiver] # - # source://prism//lib/prism/node.rb#3501 + # source://prism//lib/prism/node.rb#3509 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -4305,19 +4293,19 @@ class Prism::CallTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#3546 + # source://prism//lib/prism/node.rb#3554 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#3605 + # source://prism//lib/prism/node.rb#3613 sig { override.returns(String) } def inspect; end # def message: () -> String # - # source://prism//lib/prism/node.rb#3600 + # source://prism//lib/prism/node.rb#3608 sig { returns(String) } def message; end @@ -4326,7 +4314,7 @@ class Prism::CallTargetNode < ::Prism::Node # foo.bar = 1 # ^^^ # - # source://prism//lib/prism/node.rb#3582 + # source://prism//lib/prism/node.rb#3590 sig { returns(Prism::Location) } def message_loc; end @@ -4335,7 +4323,7 @@ class Prism::CallTargetNode < ::Prism::Node # foo.bar = 1 # name `:foo` # ^^^ # - # source://prism//lib/prism/node.rb#3576 + # source://prism//lib/prism/node.rb#3584 sig { returns(Symbol) } def name; end @@ -4344,7 +4332,7 @@ class Prism::CallTargetNode < ::Prism::Node # foo.bar = 1 # ^^^ # - # source://prism//lib/prism/node.rb#3554 + # source://prism//lib/prism/node.rb#3562 sig { returns(Prism::Node) } def receiver; end @@ -4352,25 +4340,25 @@ class Prism::CallTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#3531 + # source://prism//lib/prism/node.rb#3539 sig { returns(T::Boolean) } def safe_navigation?; end # Save the call_operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#3568 + # source://prism//lib/prism/node.rb#3576 def save_call_operator_loc(repository); end # Save the message_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#3590 + # source://prism//lib/prism/node.rb#3598 def save_message_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#3610 + # source://prism//lib/prism/node.rb#3618 sig { override.returns(Symbol) } def type; end @@ -4378,14 +4366,14 @@ class Prism::CallTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#3536 + # source://prism//lib/prism/node.rb#3544 sig { returns(T::Boolean) } def variable_call?; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#3615 + # source://prism//lib/prism/node.rb#3623 def type; end end end @@ -4395,13 +4383,13 @@ end # foo => [bar => baz] # ^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3635 +# source://prism//lib/prism/node.rb#3643 class Prism::CapturePatternNode < ::Prism::Node # Initialize a new CapturePatternNode node. # # @return [CapturePatternNode] a new instance of CapturePatternNode # - # source://prism//lib/prism/node.rb#3637 + # source://prism//lib/prism/node.rb#3645 sig do params( source: Prism::Source, @@ -4418,36 +4406,36 @@ class Prism::CapturePatternNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#3738 + # source://prism//lib/prism/node.rb#3746 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3648 + # source://prism//lib/prism/node.rb#3656 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#3653 + # source://prism//lib/prism/node.rb#3661 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#3671 + # source://prism//lib/prism/node.rb#3679 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#3666 + # source://prism//lib/prism/node.rb#3674 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Prism::node, ?target: LocalVariableTargetNode, ?operator_loc: Location) -> CapturePatternNode # - # source://prism//lib/prism/node.rb#3676 + # source://prism//lib/prism/node.rb#3684 sig do params( node_id: Integer, @@ -4463,13 +4451,13 @@ class Prism::CapturePatternNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#3681 + # source://prism//lib/prism/node.rb#3689 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Prism::node, target: LocalVariableTargetNode, operator_loc: Location } # - # source://prism//lib/prism/node.rb#3684 + # source://prism//lib/prism/node.rb#3692 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -4477,7 +4465,7 @@ class Prism::CapturePatternNode < ::Prism::Node # # @yield [value] # - # source://prism//lib/prism/node.rb#3658 + # source://prism//lib/prism/node.rb#3666 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -4485,13 +4473,13 @@ class Prism::CapturePatternNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#3722 + # source://prism//lib/prism/node.rb#3730 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#3717 + # source://prism//lib/prism/node.rb#3725 sig { returns(String) } def operator; end @@ -4500,14 +4488,14 @@ class Prism::CapturePatternNode < ::Prism::Node # foo => bar # ^^ # - # source://prism//lib/prism/node.rb#3704 + # source://prism//lib/prism/node.rb#3712 sig { returns(Prism::Location) } def operator_loc; end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#3712 + # source://prism//lib/prism/node.rb#3720 def save_operator_loc(repository); end # Represents the target of the capture. @@ -4515,13 +4503,13 @@ class Prism::CapturePatternNode < ::Prism::Node # foo => bar # ^^^ # - # source://prism//lib/prism/node.rb#3698 + # source://prism//lib/prism/node.rb#3706 sig { returns(Prism::LocalVariableTargetNode) } def target; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#3727 + # source://prism//lib/prism/node.rb#3735 sig { override.returns(Symbol) } def type; end @@ -4530,14 +4518,14 @@ class Prism::CapturePatternNode < ::Prism::Node # foo => bar # ^^^ # - # source://prism//lib/prism/node.rb#3692 + # source://prism//lib/prism/node.rb#3700 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#3732 + # source://prism//lib/prism/node.rb#3740 def type; end end end @@ -4549,13 +4537,13 @@ end # end # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3752 +# source://prism//lib/prism/node.rb#3760 class Prism::CaseMatchNode < ::Prism::Node # Initialize a new CaseMatchNode node. # # @return [CaseMatchNode] a new instance of CaseMatchNode # - # source://prism//lib/prism/node.rb#3754 + # source://prism//lib/prism/node.rb#3762 sig do params( source: Prism::Source, @@ -4574,18 +4562,18 @@ class Prism::CaseMatchNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#3889 + # source://prism//lib/prism/node.rb#3897 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3767 + # source://prism//lib/prism/node.rb#3775 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def case_keyword: () -> String # - # source://prism//lib/prism/node.rb#3863 + # source://prism//lib/prism/node.rb#3871 sig { returns(String) } def case_keyword; end @@ -4594,25 +4582,25 @@ class Prism::CaseMatchNode < ::Prism::Node # case true; in false; end # ^^^^ # - # source://prism//lib/prism/node.rb#3834 + # source://prism//lib/prism/node.rb#3842 sig { returns(Prism::Location) } def case_keyword_loc; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#3772 + # source://prism//lib/prism/node.rb#3780 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#3795 + # source://prism//lib/prism/node.rb#3803 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#3786 + # source://prism//lib/prism/node.rb#3794 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end @@ -4621,7 +4609,7 @@ class Prism::CaseMatchNode < ::Prism::Node # case true; in false; end # ^^^^^^^^ # - # source://prism//lib/prism/node.rb#3822 + # source://prism//lib/prism/node.rb#3830 sig { returns(T::Array[Prism::InNode]) } def conditions; end @@ -4633,7 +4621,7 @@ class Prism::CaseMatchNode < ::Prism::Node # 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#3800 + # source://prism//lib/prism/node.rb#3808 sig do params( node_id: Integer, @@ -4651,13 +4639,13 @@ class Prism::CaseMatchNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#3805 + # source://prism//lib/prism/node.rb#3813 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, predicate: Prism::node?, conditions: Array[InNode], else_clause: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location } # - # source://prism//lib/prism/node.rb#3808 + # source://prism//lib/prism/node.rb#3816 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -4665,7 +4653,7 @@ class Prism::CaseMatchNode < ::Prism::Node # # @yield [predicate] # - # source://prism//lib/prism/node.rb#3777 + # source://prism//lib/prism/node.rb#3785 def each_child_node; end # Represents the else clause of the case match. @@ -4673,13 +4661,13 @@ class Prism::CaseMatchNode < ::Prism::Node # case true; in false; else; end # ^^^^ # - # source://prism//lib/prism/node.rb#3828 + # source://prism//lib/prism/node.rb#3836 sig { returns(T.nilable(Prism::ElseNode)) } def else_clause; end # def end_keyword: () -> String # - # source://prism//lib/prism/node.rb#3868 + # source://prism//lib/prism/node.rb#3876 sig { returns(String) } def end_keyword; end @@ -4688,7 +4676,7 @@ class Prism::CaseMatchNode < ::Prism::Node # case true; in false; end # ^^^ # - # source://prism//lib/prism/node.rb#3850 + # source://prism//lib/prism/node.rb#3858 sig { returns(Prism::Location) } def end_keyword_loc; end @@ -4697,7 +4685,7 @@ class Prism::CaseMatchNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#3873 + # source://prism//lib/prism/node.rb#3881 sig { override.returns(String) } def inspect; end @@ -4706,32 +4694,32 @@ class Prism::CaseMatchNode < ::Prism::Node # case true; in false; end # ^^^^ # - # source://prism//lib/prism/node.rb#3816 + # source://prism//lib/prism/node.rb#3824 sig { returns(T.nilable(Prism::Node)) } def predicate; end # Save the case_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#3842 + # source://prism//lib/prism/node.rb#3850 def save_case_keyword_loc(repository); end # Save the end_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#3858 + # source://prism//lib/prism/node.rb#3866 def save_end_keyword_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#3878 + # source://prism//lib/prism/node.rb#3886 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#3883 + # source://prism//lib/prism/node.rb#3891 def type; end end end @@ -4743,13 +4731,13 @@ end # end # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3906 +# source://prism//lib/prism/node.rb#3914 class Prism::CaseNode < ::Prism::Node # Initialize a new CaseNode node. # # @return [CaseNode] a new instance of CaseNode # - # source://prism//lib/prism/node.rb#3908 + # source://prism//lib/prism/node.rb#3916 sig do params( source: Prism::Source, @@ -4768,18 +4756,18 @@ class Prism::CaseNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#4043 + # source://prism//lib/prism/node.rb#4051 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3921 + # source://prism//lib/prism/node.rb#3929 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def case_keyword: () -> String # - # source://prism//lib/prism/node.rb#4017 + # source://prism//lib/prism/node.rb#4025 sig { returns(String) } def case_keyword; end @@ -4788,25 +4776,25 @@ class Prism::CaseNode < ::Prism::Node # case true; when false; end # ^^^^ # - # source://prism//lib/prism/node.rb#3988 + # source://prism//lib/prism/node.rb#3996 sig { returns(Prism::Location) } def case_keyword_loc; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#3926 + # source://prism//lib/prism/node.rb#3934 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#3949 + # source://prism//lib/prism/node.rb#3957 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#3940 + # source://prism//lib/prism/node.rb#3948 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end @@ -4815,7 +4803,7 @@ class Prism::CaseNode < ::Prism::Node # case true; when false; end # ^^^^^^^^^^ # - # source://prism//lib/prism/node.rb#3976 + # source://prism//lib/prism/node.rb#3984 sig { returns(T::Array[Prism::WhenNode]) } def conditions; end @@ -4827,7 +4815,7 @@ class Prism::CaseNode < ::Prism::Node # 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#3954 + # source://prism//lib/prism/node.rb#3962 sig do params( node_id: Integer, @@ -4845,13 +4833,13 @@ class Prism::CaseNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#3959 + # source://prism//lib/prism/node.rb#3967 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, predicate: Prism::node?, conditions: Array[WhenNode], else_clause: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location } # - # source://prism//lib/prism/node.rb#3962 + # source://prism//lib/prism/node.rb#3970 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -4859,7 +4847,7 @@ class Prism::CaseNode < ::Prism::Node # # @yield [predicate] # - # source://prism//lib/prism/node.rb#3931 + # source://prism//lib/prism/node.rb#3939 def each_child_node; end # Represents the else clause of the case statement. @@ -4867,13 +4855,13 @@ class Prism::CaseNode < ::Prism::Node # case true; when false; else; end # ^^^^ # - # source://prism//lib/prism/node.rb#3982 + # source://prism//lib/prism/node.rb#3990 sig { returns(T.nilable(Prism::ElseNode)) } def else_clause; end # def end_keyword: () -> String # - # source://prism//lib/prism/node.rb#4022 + # source://prism//lib/prism/node.rb#4030 sig { returns(String) } def end_keyword; end @@ -4882,7 +4870,7 @@ class Prism::CaseNode < ::Prism::Node # case true; when false; end # ^^^ # - # source://prism//lib/prism/node.rb#4004 + # source://prism//lib/prism/node.rb#4012 sig { returns(Prism::Location) } def end_keyword_loc; end @@ -4891,7 +4879,7 @@ class Prism::CaseNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#4027 + # source://prism//lib/prism/node.rb#4035 sig { override.returns(String) } def inspect; end @@ -4900,32 +4888,32 @@ class Prism::CaseNode < ::Prism::Node # case true; when false; end # ^^^^ # - # source://prism//lib/prism/node.rb#3970 + # source://prism//lib/prism/node.rb#3978 sig { returns(T.nilable(Prism::Node)) } def predicate; end # Save the case_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#3996 + # source://prism//lib/prism/node.rb#4004 def save_case_keyword_loc(repository); end # Save the end_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#4012 + # source://prism//lib/prism/node.rb#4020 def save_end_keyword_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#4032 + # source://prism//lib/prism/node.rb#4040 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#4037 + # source://prism//lib/prism/node.rb#4045 def type; end end end @@ -4935,13 +4923,13 @@ end # class Foo end # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4058 +# source://prism//lib/prism/node.rb#4066 class Prism::ClassNode < ::Prism::Node # Initialize a new ClassNode node. # # @return [ClassNode] a new instance of ClassNode # - # source://prism//lib/prism/node.rb#4060 + # source://prism//lib/prism/node.rb#4068 sig do params( source: Prism::Source, @@ -4963,12 +4951,12 @@ class Prism::ClassNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#4231 + # source://prism//lib/prism/node.rb#4239 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4076 + # source://prism//lib/prism/node.rb#4084 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -4978,19 +4966,19 @@ class Prism::ClassNode < ::Prism::Node # foo # ^^^ # - # source://prism//lib/prism/node.rb#4176 + # source://prism//lib/prism/node.rb#4184 sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } def body; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#4081 + # source://prism//lib/prism/node.rb#4089 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def class_keyword: () -> String # - # source://prism//lib/prism/node.rb#4200 + # source://prism//lib/prism/node.rb#4208 sig { returns(String) } def class_keyword; end @@ -4999,31 +4987,31 @@ class Prism::ClassNode < ::Prism::Node # class Foo end # ^^^^^ # - # source://prism//lib/prism/node.rb#4128 + # source://prism//lib/prism/node.rb#4136 sig { returns(Prism::Location) } def class_keyword_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4104 + # source://prism//lib/prism/node.rb#4112 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4095 + # source://prism//lib/prism/node.rb#4103 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # attr_reader constant_path: ConstantReadNode | ConstantPathNode | CallNode # - # source://prism//lib/prism/node.rb#4141 + # source://prism//lib/prism/node.rb#4149 sig { returns(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::CallNode)) } def constant_path; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?class_keyword_loc: Location, ?constant_path: ConstantReadNode | ConstantPathNode | CallNode, ?inheritance_operator_loc: Location?, ?superclass: Prism::node?, ?body: StatementsNode | BeginNode | nil, ?end_keyword_loc: Location, ?name: Symbol) -> ClassNode # - # source://prism//lib/prism/node.rb#4109 + # source://prism//lib/prism/node.rb#4117 sig do params( node_id: Integer, @@ -5044,13 +5032,13 @@ class Prism::ClassNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#4114 + # source://prism//lib/prism/node.rb#4122 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], class_keyword_loc: Location, constant_path: ConstantReadNode | ConstantPathNode | CallNode, inheritance_operator_loc: Location?, superclass: Prism::node?, body: StatementsNode | BeginNode | nil, end_keyword_loc: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#4117 + # source://prism//lib/prism/node.rb#4125 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -5058,12 +5046,12 @@ class Prism::ClassNode < ::Prism::Node # # @yield [constant_path] # - # source://prism//lib/prism/node.rb#4086 + # source://prism//lib/prism/node.rb#4094 def each_child_node; end # def end_keyword: () -> String # - # source://prism//lib/prism/node.rb#4210 + # source://prism//lib/prism/node.rb#4218 sig { returns(String) } def end_keyword; end @@ -5072,7 +5060,7 @@ class Prism::ClassNode < ::Prism::Node # class Foo end # ^^^ # - # source://prism//lib/prism/node.rb#4182 + # source://prism//lib/prism/node.rb#4190 sig { returns(Prism::Location) } def end_keyword_loc; end @@ -5081,7 +5069,7 @@ class Prism::ClassNode < ::Prism::Node # def inheritance_operator: () -> String? # - # source://prism//lib/prism/node.rb#4205 + # source://prism//lib/prism/node.rb#4213 sig { returns(T.nilable(String)) } def inheritance_operator; end @@ -5090,19 +5078,19 @@ class Prism::ClassNode < ::Prism::Node # class Foo < Bar # ^ # - # source://prism//lib/prism/node.rb#4147 + # source://prism//lib/prism/node.rb#4155 sig { returns(T.nilable(Prism::Location)) } def inheritance_operator_loc; end # def inspect -> String # - # source://prism//lib/prism/node.rb#4215 + # source://prism//lib/prism/node.rb#4223 sig { override.returns(String) } def inspect; end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#4122 + # source://prism//lib/prism/node.rb#4130 sig { returns(T::Array[Symbol]) } def locals; end @@ -5110,26 +5098,26 @@ class Prism::ClassNode < ::Prism::Node # # class Foo end # name `:Foo` # - # source://prism//lib/prism/node.rb#4197 + # source://prism//lib/prism/node.rb#4205 sig { returns(Symbol) } def name; end # Save the class_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#4136 + # source://prism//lib/prism/node.rb#4144 def save_class_keyword_loc(repository); end # Save the end_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#4190 + # source://prism//lib/prism/node.rb#4198 def save_end_keyword_loc(repository); end # Save the inheritance_operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#4161 + # source://prism//lib/prism/node.rb#4169 def save_inheritance_operator_loc(repository); end # Represents the superclass of the class. @@ -5137,20 +5125,20 @@ class Prism::ClassNode < ::Prism::Node # class Foo < Bar # ^^^ # - # source://prism//lib/prism/node.rb#4169 + # source://prism//lib/prism/node.rb#4177 sig { returns(T.nilable(Prism::Node)) } def superclass; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#4220 + # source://prism//lib/prism/node.rb#4228 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#4225 + # source://prism//lib/prism/node.rb#4233 def type; end end end @@ -5160,13 +5148,13 @@ end # @@target &&= value # ^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4249 +# source://prism//lib/prism/node.rb#4257 class Prism::ClassVariableAndWriteNode < ::Prism::Node # Initialize a new ClassVariableAndWriteNode node. # # @return [ClassVariableAndWriteNode] a new instance of ClassVariableAndWriteNode # - # source://prism//lib/prism/node.rb#4251 + # source://prism//lib/prism/node.rb#4259 sig do params( source: Prism::Source, @@ -5184,36 +5172,36 @@ class Prism::ClassVariableAndWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#4368 + # source://prism//lib/prism/node.rb#4376 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4263 + # source://prism//lib/prism/node.rb#4271 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#4268 + # source://prism//lib/prism/node.rb#4276 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4285 + # source://prism//lib/prism/node.rb#4293 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4280 + # source://prism//lib/prism/node.rb#4288 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> ClassVariableAndWriteNode # - # source://prism//lib/prism/node.rb#4290 + # source://prism//lib/prism/node.rb#4298 sig do params( node_id: Integer, @@ -5230,13 +5218,13 @@ class Prism::ClassVariableAndWriteNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#4295 + # source://prism//lib/prism/node.rb#4303 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#4298 + # source://prism//lib/prism/node.rb#4306 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -5247,7 +5235,7 @@ class Prism::ClassVariableAndWriteNode < ::Prism::Node # # @yield [value] # - # source://prism//lib/prism/node.rb#4273 + # source://prism//lib/prism/node.rb#4281 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -5255,7 +5243,7 @@ class Prism::ClassVariableAndWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#4352 + # source://prism//lib/prism/node.rb#4360 sig { override.returns(String) } def inspect; end @@ -5264,7 +5252,7 @@ class Prism::ClassVariableAndWriteNode < ::Prism::Node # @@target &&= value # name `:@@target` # ^^^^^^^^ # - # source://prism//lib/prism/node.rb#4306 + # source://prism//lib/prism/node.rb#4314 sig { returns(Symbol) } def name; end @@ -5273,13 +5261,13 @@ class Prism::ClassVariableAndWriteNode < ::Prism::Node # @@target &&= value # ^^^^^^^^ # - # source://prism//lib/prism/node.rb#4312 + # source://prism//lib/prism/node.rb#4320 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#4347 + # source://prism//lib/prism/node.rb#4355 sig { returns(String) } def operator; end @@ -5288,25 +5276,25 @@ class Prism::ClassVariableAndWriteNode < ::Prism::Node # @@target &&= value # ^^^ # - # source://prism//lib/prism/node.rb#4328 + # source://prism//lib/prism/node.rb#4336 sig { returns(Prism::Location) } def operator_loc; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#4320 + # source://prism//lib/prism/node.rb#4328 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#4336 + # source://prism//lib/prism/node.rb#4344 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#4357 + # source://prism//lib/prism/node.rb#4365 sig { override.returns(Symbol) } def type; end @@ -5315,14 +5303,14 @@ class Prism::ClassVariableAndWriteNode < ::Prism::Node # @@target &&= value # ^^^^^ # - # source://prism//lib/prism/node.rb#4344 + # source://prism//lib/prism/node.rb#4352 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#4362 + # source://prism//lib/prism/node.rb#4370 def type; end end end @@ -5332,13 +5320,13 @@ end # @@target += value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4381 +# source://prism//lib/prism/node.rb#4389 class Prism::ClassVariableOperatorWriteNode < ::Prism::Node # Initialize a new ClassVariableOperatorWriteNode node. # # @return [ClassVariableOperatorWriteNode] a new instance of ClassVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#4383 + # source://prism//lib/prism/node.rb#4391 sig do params( source: Prism::Source, @@ -5357,48 +5345,48 @@ class Prism::ClassVariableOperatorWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#4487 + # source://prism//lib/prism/node.rb#4495 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4396 + # source://prism//lib/prism/node.rb#4404 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader binary_operator: Symbol # - # source://prism//lib/prism/node.rb#4468 + # source://prism//lib/prism/node.rb#4476 sig { returns(Symbol) } def binary_operator; end # attr_reader binary_operator_loc: Location # - # source://prism//lib/prism/node.rb#4452 + # source://prism//lib/prism/node.rb#4460 sig { returns(Prism::Location) } def binary_operator_loc; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#4401 + # source://prism//lib/prism/node.rb#4409 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4418 + # source://prism//lib/prism/node.rb#4426 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4413 + # source://prism//lib/prism/node.rb#4421 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol) -> ClassVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#4423 + # source://prism//lib/prism/node.rb#4431 sig do params( node_id: Integer, @@ -5416,13 +5404,13 @@ class Prism::ClassVariableOperatorWriteNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#4428 + # source://prism//lib/prism/node.rb#4436 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol } # - # source://prism//lib/prism/node.rb#4431 + # source://prism//lib/prism/node.rb#4439 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -5433,7 +5421,7 @@ class Prism::ClassVariableOperatorWriteNode < ::Prism::Node # # @yield [value] # - # source://prism//lib/prism/node.rb#4406 + # source://prism//lib/prism/node.rb#4414 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -5441,19 +5429,19 @@ class Prism::ClassVariableOperatorWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#4471 + # source://prism//lib/prism/node.rb#4479 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#4436 + # source://prism//lib/prism/node.rb#4444 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#4439 + # source://prism//lib/prism/node.rb#4447 sig { returns(Prism::Location) } def name_loc; end @@ -5472,31 +5460,31 @@ class Prism::ClassVariableOperatorWriteNode < ::Prism::Node # Save the binary_operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#4460 + # source://prism//lib/prism/node.rb#4468 def save_binary_operator_loc(repository); end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#4447 + # source://prism//lib/prism/node.rb#4455 def save_name_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#4476 + # source://prism//lib/prism/node.rb#4484 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#4465 + # source://prism//lib/prism/node.rb#4473 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#4481 + # source://prism//lib/prism/node.rb#4489 def type; end end end @@ -5506,13 +5494,13 @@ end # @@target ||= value # ^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4501 +# source://prism//lib/prism/node.rb#4509 class Prism::ClassVariableOrWriteNode < ::Prism::Node # Initialize a new ClassVariableOrWriteNode node. # # @return [ClassVariableOrWriteNode] a new instance of ClassVariableOrWriteNode # - # source://prism//lib/prism/node.rb#4503 + # source://prism//lib/prism/node.rb#4511 sig do params( source: Prism::Source, @@ -5530,36 +5518,36 @@ class Prism::ClassVariableOrWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#4608 + # source://prism//lib/prism/node.rb#4616 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4515 + # source://prism//lib/prism/node.rb#4523 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#4520 + # source://prism//lib/prism/node.rb#4528 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4537 + # source://prism//lib/prism/node.rb#4545 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4532 + # source://prism//lib/prism/node.rb#4540 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> ClassVariableOrWriteNode # - # source://prism//lib/prism/node.rb#4542 + # source://prism//lib/prism/node.rb#4550 sig do params( node_id: Integer, @@ -5576,13 +5564,13 @@ class Prism::ClassVariableOrWriteNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#4547 + # source://prism//lib/prism/node.rb#4555 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#4550 + # source://prism//lib/prism/node.rb#4558 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -5593,7 +5581,7 @@ class Prism::ClassVariableOrWriteNode < ::Prism::Node # # @yield [value] # - # source://prism//lib/prism/node.rb#4525 + # source://prism//lib/prism/node.rb#4533 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -5601,62 +5589,62 @@ class Prism::ClassVariableOrWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#4592 + # source://prism//lib/prism/node.rb#4600 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#4555 + # source://prism//lib/prism/node.rb#4563 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#4558 + # source://prism//lib/prism/node.rb#4566 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#4587 + # source://prism//lib/prism/node.rb#4595 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#4571 + # source://prism//lib/prism/node.rb#4579 sig { returns(Prism::Location) } def operator_loc; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#4566 + # source://prism//lib/prism/node.rb#4574 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#4579 + # source://prism//lib/prism/node.rb#4587 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#4597 + # source://prism//lib/prism/node.rb#4605 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#4584 + # source://prism//lib/prism/node.rb#4592 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#4602 + # source://prism//lib/prism/node.rb#4610 def type; end end end @@ -5666,49 +5654,49 @@ end # @@foo # ^^^^^ # -# source://prism//lib/prism/node.rb#4621 +# source://prism//lib/prism/node.rb#4629 class Prism::ClassVariableReadNode < ::Prism::Node # Initialize a new ClassVariableReadNode node. # # @return [ClassVariableReadNode] a new instance of ClassVariableReadNode # - # source://prism//lib/prism/node.rb#4623 + # source://prism//lib/prism/node.rb#4631 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#4694 + # source://prism//lib/prism/node.rb#4702 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4632 + # source://prism//lib/prism/node.rb#4640 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#4637 + # source://prism//lib/prism/node.rb#4645 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4653 + # source://prism//lib/prism/node.rb#4661 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4648 + # source://prism//lib/prism/node.rb#4656 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> ClassVariableReadNode # - # source://prism//lib/prism/node.rb#4658 + # source://prism//lib/prism/node.rb#4666 sig do params( node_id: Integer, @@ -5722,19 +5710,19 @@ class Prism::ClassVariableReadNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#4663 + # source://prism//lib/prism/node.rb#4671 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#4666 + # source://prism//lib/prism/node.rb#4674 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#4642 + # source://prism//lib/prism/node.rb#4650 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -5742,7 +5730,7 @@ class Prism::ClassVariableReadNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#4678 + # source://prism//lib/prism/node.rb#4686 sig { override.returns(String) } def inspect; end @@ -5752,20 +5740,20 @@ class Prism::ClassVariableReadNode < ::Prism::Node # # @@_test # name `:@@_test` # - # source://prism//lib/prism/node.rb#4675 + # source://prism//lib/prism/node.rb#4683 sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#4683 + # source://prism//lib/prism/node.rb#4691 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#4688 + # source://prism//lib/prism/node.rb#4696 def type; end end end @@ -5775,49 +5763,49 @@ end # @@foo, @@bar = baz # ^^^^^ ^^^^^ # -# source://prism//lib/prism/node.rb#4704 +# source://prism//lib/prism/node.rb#4712 class Prism::ClassVariableTargetNode < ::Prism::Node # Initialize a new ClassVariableTargetNode node. # # @return [ClassVariableTargetNode] a new instance of ClassVariableTargetNode # - # source://prism//lib/prism/node.rb#4706 + # source://prism//lib/prism/node.rb#4714 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#4773 + # source://prism//lib/prism/node.rb#4781 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4715 + # source://prism//lib/prism/node.rb#4723 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#4720 + # source://prism//lib/prism/node.rb#4728 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4736 + # source://prism//lib/prism/node.rb#4744 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4731 + # source://prism//lib/prism/node.rb#4739 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> ClassVariableTargetNode # - # source://prism//lib/prism/node.rb#4741 + # source://prism//lib/prism/node.rb#4749 sig do params( node_id: Integer, @@ -5831,19 +5819,19 @@ class Prism::ClassVariableTargetNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#4746 + # source://prism//lib/prism/node.rb#4754 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#4749 + # source://prism//lib/prism/node.rb#4757 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#4725 + # source://prism//lib/prism/node.rb#4733 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -5851,26 +5839,26 @@ class Prism::ClassVariableTargetNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#4757 + # source://prism//lib/prism/node.rb#4765 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#4754 + # source://prism//lib/prism/node.rb#4762 sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#4762 + # source://prism//lib/prism/node.rb#4770 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#4767 + # source://prism//lib/prism/node.rb#4775 def type; end end end @@ -5880,13 +5868,13 @@ end # @@foo = 1 # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4783 +# source://prism//lib/prism/node.rb#4791 class Prism::ClassVariableWriteNode < ::Prism::Node # Initialize a new ClassVariableWriteNode node. # # @return [ClassVariableWriteNode] a new instance of ClassVariableWriteNode # - # source://prism//lib/prism/node.rb#4785 + # source://prism//lib/prism/node.rb#4793 sig do params( source: Prism::Source, @@ -5904,36 +5892,36 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#4906 + # source://prism//lib/prism/node.rb#4914 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4797 + # source://prism//lib/prism/node.rb#4805 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#4802 + # source://prism//lib/prism/node.rb#4810 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4819 + # source://prism//lib/prism/node.rb#4827 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4814 + # source://prism//lib/prism/node.rb#4822 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location) -> ClassVariableWriteNode # - # source://prism//lib/prism/node.rb#4824 + # source://prism//lib/prism/node.rb#4832 sig do params( node_id: Integer, @@ -5950,13 +5938,13 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#4829 + # source://prism//lib/prism/node.rb#4837 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#4832 + # source://prism//lib/prism/node.rb#4840 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -5964,7 +5952,7 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # # @yield [value] # - # source://prism//lib/prism/node.rb#4807 + # source://prism//lib/prism/node.rb#4815 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -5972,7 +5960,7 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#4890 + # source://prism//lib/prism/node.rb#4898 sig { override.returns(String) } def inspect; end @@ -5982,7 +5970,7 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # # @@_test = :test # name `@@_test` # - # source://prism//lib/prism/node.rb#4841 + # source://prism//lib/prism/node.rb#4849 sig { returns(Symbol) } def name; end @@ -5991,13 +5979,13 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # @@foo = :bar # ^^^^^ # - # source://prism//lib/prism/node.rb#4847 + # source://prism//lib/prism/node.rb#4855 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#4885 + # source://prism//lib/prism/node.rb#4893 sig { returns(String) } def operator; end @@ -6006,25 +5994,25 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # @@foo = :bar # ^ # - # source://prism//lib/prism/node.rb#4872 + # source://prism//lib/prism/node.rb#4880 sig { returns(Prism::Location) } def operator_loc; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#4855 + # source://prism//lib/prism/node.rb#4863 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#4880 + # source://prism//lib/prism/node.rb#4888 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#4895 + # source://prism//lib/prism/node.rb#4903 sig { override.returns(Symbol) } def type; end @@ -6036,14 +6024,14 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # @@_xyz = 123 # ^^^ # - # source://prism//lib/prism/node.rb#4866 + # source://prism//lib/prism/node.rb#4874 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#4900 + # source://prism//lib/prism/node.rb#4908 def type; end end end @@ -6062,49 +6050,49 @@ end # 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#177 +# source://prism//lib/prism/parse_result.rb#186 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#203 + # source://prism//lib/prism/parse_result.rb#212 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#217 + # source://prism//lib/prism/parse_result.rb#226 sig { params(byte_offset: Integer).returns(Integer) } def [](byte_offset); end end -# source://prism//lib/prism/parse_result.rb#189 +# source://prism//lib/prism/parse_result.rb#198 class Prism::CodeUnitsCache::LengthCounter # @return [LengthCounter] a new instance of LengthCounter # - # source://prism//lib/prism/parse_result.rb#190 + # source://prism//lib/prism/parse_result.rb#199 def initialize(source, encoding); end - # source://prism//lib/prism/parse_result.rb#195 + # source://prism//lib/prism/parse_result.rb#204 def count(byte_offset, byte_length); end end -# source://prism//lib/prism/parse_result.rb#178 +# source://prism//lib/prism/parse_result.rb#187 class Prism::CodeUnitsCache::UTF16Counter # @return [UTF16Counter] a new instance of UTF16Counter # - # source://prism//lib/prism/parse_result.rb#179 + # source://prism//lib/prism/parse_result.rb#188 def initialize(source, encoding); end - # source://prism//lib/prism/parse_result.rb#184 + # source://prism//lib/prism/parse_result.rb#193 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#512 +# source://prism//lib/prism/parse_result.rb#521 class Prism::Comment abstract! @@ -6112,25 +6100,25 @@ class Prism::Comment # # @return [Comment] a new instance of Comment # - # source://prism//lib/prism/parse_result.rb#517 + # source://prism//lib/prism/parse_result.rb#526 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#522 + # source://prism//lib/prism/parse_result.rb#531 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#514 + # source://prism//lib/prism/parse_result.rb#523 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#527 + # source://prism//lib/prism/parse_result.rb#536 sig { returns(String) } def slice; end @@ -6936,13 +6924,13 @@ end # Target &&= value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4919 +# source://prism//lib/prism/node.rb#4927 class Prism::ConstantAndWriteNode < ::Prism::Node # Initialize a new ConstantAndWriteNode node. # # @return [ConstantAndWriteNode] a new instance of ConstantAndWriteNode # - # source://prism//lib/prism/node.rb#4921 + # source://prism//lib/prism/node.rb#4929 sig do params( source: Prism::Source, @@ -6960,36 +6948,36 @@ class Prism::ConstantAndWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#5026 + # source://prism//lib/prism/node.rb#5034 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4933 + # source://prism//lib/prism/node.rb#4941 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#4938 + # source://prism//lib/prism/node.rb#4946 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4955 + # source://prism//lib/prism/node.rb#4963 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4950 + # source://prism//lib/prism/node.rb#4958 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> ConstantAndWriteNode # - # source://prism//lib/prism/node.rb#4960 + # source://prism//lib/prism/node.rb#4968 sig do params( node_id: Integer, @@ -7006,13 +6994,13 @@ class Prism::ConstantAndWriteNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#4965 + # source://prism//lib/prism/node.rb#4973 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#4968 + # source://prism//lib/prism/node.rb#4976 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -7023,7 +7011,7 @@ class Prism::ConstantAndWriteNode < ::Prism::Node # # @yield [value] # - # source://prism//lib/prism/node.rb#4943 + # source://prism//lib/prism/node.rb#4951 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -7031,62 +7019,62 @@ class Prism::ConstantAndWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#5010 + # source://prism//lib/prism/node.rb#5018 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#4973 + # source://prism//lib/prism/node.rb#4981 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#4976 + # source://prism//lib/prism/node.rb#4984 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#5005 + # source://prism//lib/prism/node.rb#5013 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#4989 + # source://prism//lib/prism/node.rb#4997 sig { returns(Prism::Location) } def operator_loc; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#4984 + # source://prism//lib/prism/node.rb#4992 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#4997 + # source://prism//lib/prism/node.rb#5005 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#5015 + # source://prism//lib/prism/node.rb#5023 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#5002 + # source://prism//lib/prism/node.rb#5010 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#5020 + # source://prism//lib/prism/node.rb#5028 def type; end end end @@ -7096,13 +7084,13 @@ end # Target += value # ^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#5039 +# source://prism//lib/prism/node.rb#5047 class Prism::ConstantOperatorWriteNode < ::Prism::Node # Initialize a new ConstantOperatorWriteNode node. # # @return [ConstantOperatorWriteNode] a new instance of ConstantOperatorWriteNode # - # source://prism//lib/prism/node.rb#5041 + # source://prism//lib/prism/node.rb#5049 sig do params( source: Prism::Source, @@ -7121,48 +7109,48 @@ class Prism::ConstantOperatorWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#5145 + # source://prism//lib/prism/node.rb#5153 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5054 + # source://prism//lib/prism/node.rb#5062 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader binary_operator: Symbol # - # source://prism//lib/prism/node.rb#5126 + # source://prism//lib/prism/node.rb#5134 sig { returns(Symbol) } def binary_operator; end # attr_reader binary_operator_loc: Location # - # source://prism//lib/prism/node.rb#5110 + # source://prism//lib/prism/node.rb#5118 sig { returns(Prism::Location) } def binary_operator_loc; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#5059 + # source://prism//lib/prism/node.rb#5067 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5076 + # source://prism//lib/prism/node.rb#5084 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5071 + # source://prism//lib/prism/node.rb#5079 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol) -> ConstantOperatorWriteNode # - # source://prism//lib/prism/node.rb#5081 + # source://prism//lib/prism/node.rb#5089 sig do params( node_id: Integer, @@ -7180,13 +7168,13 @@ class Prism::ConstantOperatorWriteNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#5086 + # source://prism//lib/prism/node.rb#5094 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol } # - # source://prism//lib/prism/node.rb#5089 + # source://prism//lib/prism/node.rb#5097 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -7197,7 +7185,7 @@ class Prism::ConstantOperatorWriteNode < ::Prism::Node # # @yield [value] # - # source://prism//lib/prism/node.rb#5064 + # source://prism//lib/prism/node.rb#5072 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -7205,19 +7193,19 @@ class Prism::ConstantOperatorWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#5129 + # source://prism//lib/prism/node.rb#5137 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#5094 + # source://prism//lib/prism/node.rb#5102 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#5097 + # source://prism//lib/prism/node.rb#5105 sig { returns(Prism::Location) } def name_loc; end @@ -7236,31 +7224,31 @@ class Prism::ConstantOperatorWriteNode < ::Prism::Node # Save the binary_operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#5118 + # source://prism//lib/prism/node.rb#5126 def save_binary_operator_loc(repository); end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#5105 + # source://prism//lib/prism/node.rb#5113 def save_name_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#5134 + # source://prism//lib/prism/node.rb#5142 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#5123 + # source://prism//lib/prism/node.rb#5131 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#5139 + # source://prism//lib/prism/node.rb#5147 def type; end end end @@ -7270,13 +7258,13 @@ end # Target ||= value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#5159 +# source://prism//lib/prism/node.rb#5167 class Prism::ConstantOrWriteNode < ::Prism::Node # Initialize a new ConstantOrWriteNode node. # # @return [ConstantOrWriteNode] a new instance of ConstantOrWriteNode # - # source://prism//lib/prism/node.rb#5161 + # source://prism//lib/prism/node.rb#5169 sig do params( source: Prism::Source, @@ -7294,36 +7282,36 @@ class Prism::ConstantOrWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#5266 + # source://prism//lib/prism/node.rb#5274 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5173 + # source://prism//lib/prism/node.rb#5181 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#5178 + # source://prism//lib/prism/node.rb#5186 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5195 + # source://prism//lib/prism/node.rb#5203 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5190 + # source://prism//lib/prism/node.rb#5198 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> ConstantOrWriteNode # - # source://prism//lib/prism/node.rb#5200 + # source://prism//lib/prism/node.rb#5208 sig do params( node_id: Integer, @@ -7340,13 +7328,13 @@ class Prism::ConstantOrWriteNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#5205 + # source://prism//lib/prism/node.rb#5213 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#5208 + # source://prism//lib/prism/node.rb#5216 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -7357,7 +7345,7 @@ class Prism::ConstantOrWriteNode < ::Prism::Node # # @yield [value] # - # source://prism//lib/prism/node.rb#5183 + # source://prism//lib/prism/node.rb#5191 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -7365,62 +7353,62 @@ class Prism::ConstantOrWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#5250 + # source://prism//lib/prism/node.rb#5258 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#5213 + # source://prism//lib/prism/node.rb#5221 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#5216 + # source://prism//lib/prism/node.rb#5224 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#5245 + # source://prism//lib/prism/node.rb#5253 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#5229 + # source://prism//lib/prism/node.rb#5237 sig { returns(Prism::Location) } def operator_loc; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#5224 + # source://prism//lib/prism/node.rb#5232 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#5237 + # source://prism//lib/prism/node.rb#5245 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#5255 + # source://prism//lib/prism/node.rb#5263 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#5242 + # source://prism//lib/prism/node.rb#5250 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#5260 + # source://prism//lib/prism/node.rb#5268 def type; end end end @@ -7430,13 +7418,13 @@ end # Parent::Child &&= value # ^^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#5279 +# source://prism//lib/prism/node.rb#5287 class Prism::ConstantPathAndWriteNode < ::Prism::Node # Initialize a new ConstantPathAndWriteNode node. # # @return [ConstantPathAndWriteNode] a new instance of ConstantPathAndWriteNode # - # source://prism//lib/prism/node.rb#5281 + # source://prism//lib/prism/node.rb#5289 sig do params( source: Prism::Source, @@ -7453,36 +7441,36 @@ class Prism::ConstantPathAndWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#5373 + # source://prism//lib/prism/node.rb#5381 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5292 + # source://prism//lib/prism/node.rb#5300 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#5297 + # source://prism//lib/prism/node.rb#5305 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5315 + # source://prism//lib/prism/node.rb#5323 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5310 + # source://prism//lib/prism/node.rb#5318 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node) -> ConstantPathAndWriteNode # - # source://prism//lib/prism/node.rb#5320 + # source://prism//lib/prism/node.rb#5328 sig do params( node_id: Integer, @@ -7498,13 +7486,13 @@ class Prism::ConstantPathAndWriteNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#5325 + # source://prism//lib/prism/node.rb#5333 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, target: ConstantPathNode, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#5328 + # source://prism//lib/prism/node.rb#5336 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -7512,7 +7500,7 @@ class Prism::ConstantPathAndWriteNode < ::Prism::Node # # @yield [target] # - # source://prism//lib/prism/node.rb#5302 + # source://prism//lib/prism/node.rb#5310 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -7520,50 +7508,50 @@ class Prism::ConstantPathAndWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#5357 + # source://prism//lib/prism/node.rb#5365 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#5352 + # source://prism//lib/prism/node.rb#5360 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#5336 + # source://prism//lib/prism/node.rb#5344 sig { returns(Prism::Location) } def operator_loc; end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#5344 + # source://prism//lib/prism/node.rb#5352 def save_operator_loc(repository); end # attr_reader target: ConstantPathNode # - # source://prism//lib/prism/node.rb#5333 + # source://prism//lib/prism/node.rb#5341 sig { returns(Prism::ConstantPathNode) } def target; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#5362 + # source://prism//lib/prism/node.rb#5370 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#5349 + # source://prism//lib/prism/node.rb#5357 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#5367 + # source://prism//lib/prism/node.rb#5375 def type; end end end @@ -7573,13 +7561,13 @@ end # Foo::Bar # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#5385 +# source://prism//lib/prism/node.rb#5393 class Prism::ConstantPathNode < ::Prism::Node # Initialize a new ConstantPathNode node. # # @return [ConstantPathNode] a new instance of ConstantPathNode # - # source://prism//lib/prism/node.rb#5387 + # source://prism//lib/prism/node.rb#5395 sig do params( source: Prism::Source, @@ -7597,12 +7585,12 @@ class Prism::ConstantPathNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#5515 + # source://prism//lib/prism/node.rb#5523 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5399 + # source://prism//lib/prism/node.rb#5407 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -7615,25 +7603,25 @@ class Prism::ConstantPathNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#5404 + # source://prism//lib/prism/node.rb#5412 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5423 + # source://prism//lib/prism/node.rb#5431 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5416 + # source://prism//lib/prism/node.rb#5424 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?parent: Prism::node?, ?name: Symbol?, ?delimiter_loc: Location, ?name_loc: Location) -> ConstantPathNode # - # source://prism//lib/prism/node.rb#5428 + # source://prism//lib/prism/node.rb#5436 sig do params( node_id: Integer, @@ -7650,19 +7638,19 @@ class Prism::ConstantPathNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#5433 + # source://prism//lib/prism/node.rb#5441 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, parent: Prism::node?, name: Symbol?, delimiter_loc: Location, name_loc: Location } # - # source://prism//lib/prism/node.rb#5436 + # source://prism//lib/prism/node.rb#5444 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#5494 + # source://prism//lib/prism/node.rb#5502 sig { returns(String) } def delimiter; end @@ -7674,7 +7662,7 @@ class Prism::ConstantPathNode < ::Prism::Node # One::Two # ^^ # - # source://prism//lib/prism/node.rb#5462 + # source://prism//lib/prism/node.rb#5470 sig { returns(Prism::Location) } def delimiter_loc; end @@ -7682,7 +7670,7 @@ class Prism::ConstantPathNode < ::Prism::Node # # @yield [parent] # - # source://prism//lib/prism/node.rb#5409 + # source://prism//lib/prism/node.rb#5417 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -7703,13 +7691,13 @@ class Prism::ConstantPathNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#5499 + # source://prism//lib/prism/node.rb#5507 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#5453 + # source://prism//lib/prism/node.rb#5461 sig { returns(T.nilable(Symbol)) } def name; end @@ -7721,7 +7709,7 @@ class Prism::ConstantPathNode < ::Prism::Node # One::Two # ^^^ # - # source://prism//lib/prism/node.rb#5481 + # source://prism//lib/prism/node.rb#5489 sig { returns(Prism::Location) } def name_loc; end @@ -7736,32 +7724,32 @@ class Prism::ConstantPathNode < ::Prism::Node # a.b::C # ^^^ # - # source://prism//lib/prism/node.rb#5450 + # source://prism//lib/prism/node.rb#5458 sig { returns(T.nilable(Prism::Node)) } def parent; end # Save the delimiter_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#5470 + # source://prism//lib/prism/node.rb#5478 def save_delimiter_loc(repository); end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#5489 + # source://prism//lib/prism/node.rb#5497 def save_name_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#5504 + # source://prism//lib/prism/node.rb#5512 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#5509 + # source://prism//lib/prism/node.rb#5517 def type; end end end @@ -7788,13 +7776,13 @@ class Prism::ConstantPathNode::MissingNodesInConstantPathError < ::StandardError # Parent::Child += value # ^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#5528 +# source://prism//lib/prism/node.rb#5536 class Prism::ConstantPathOperatorWriteNode < ::Prism::Node # Initialize a new ConstantPathOperatorWriteNode node. # # @return [ConstantPathOperatorWriteNode] a new instance of ConstantPathOperatorWriteNode # - # source://prism//lib/prism/node.rb#5530 + # source://prism//lib/prism/node.rb#5538 sig do params( source: Prism::Source, @@ -7812,48 +7800,48 @@ class Prism::ConstantPathOperatorWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#5621 + # source://prism//lib/prism/node.rb#5629 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5542 + # source://prism//lib/prism/node.rb#5550 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader binary_operator: Symbol # - # source://prism//lib/prism/node.rb#5602 + # source://prism//lib/prism/node.rb#5610 sig { returns(Symbol) } def binary_operator; end # attr_reader binary_operator_loc: Location # - # source://prism//lib/prism/node.rb#5586 + # source://prism//lib/prism/node.rb#5594 sig { returns(Prism::Location) } def binary_operator_loc; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#5547 + # source://prism//lib/prism/node.rb#5555 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5565 + # source://prism//lib/prism/node.rb#5573 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5560 + # source://prism//lib/prism/node.rb#5568 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?target: ConstantPathNode, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol) -> ConstantPathOperatorWriteNode # - # source://prism//lib/prism/node.rb#5570 + # source://prism//lib/prism/node.rb#5578 sig do params( node_id: Integer, @@ -7870,13 +7858,13 @@ class Prism::ConstantPathOperatorWriteNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#5575 + # source://prism//lib/prism/node.rb#5583 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, target: ConstantPathNode, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol } # - # source://prism//lib/prism/node.rb#5578 + # source://prism//lib/prism/node.rb#5586 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -7884,7 +7872,7 @@ class Prism::ConstantPathOperatorWriteNode < ::Prism::Node # # @yield [target] # - # source://prism//lib/prism/node.rb#5552 + # source://prism//lib/prism/node.rb#5560 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -7892,7 +7880,7 @@ class Prism::ConstantPathOperatorWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#5605 + # source://prism//lib/prism/node.rb#5613 sig { override.returns(String) } def inspect; end @@ -7911,31 +7899,31 @@ class Prism::ConstantPathOperatorWriteNode < ::Prism::Node # Save the binary_operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#5594 + # source://prism//lib/prism/node.rb#5602 def save_binary_operator_loc(repository); end # attr_reader target: ConstantPathNode # - # source://prism//lib/prism/node.rb#5583 + # source://prism//lib/prism/node.rb#5591 sig { returns(Prism::ConstantPathNode) } def target; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#5610 + # source://prism//lib/prism/node.rb#5618 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#5599 + # source://prism//lib/prism/node.rb#5607 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#5615 + # source://prism//lib/prism/node.rb#5623 def type; end end end @@ -7945,13 +7933,13 @@ end # Parent::Child ||= value # ^^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#5634 +# source://prism//lib/prism/node.rb#5642 class Prism::ConstantPathOrWriteNode < ::Prism::Node # Initialize a new ConstantPathOrWriteNode node. # # @return [ConstantPathOrWriteNode] a new instance of ConstantPathOrWriteNode # - # source://prism//lib/prism/node.rb#5636 + # source://prism//lib/prism/node.rb#5644 sig do params( source: Prism::Source, @@ -7968,36 +7956,36 @@ class Prism::ConstantPathOrWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#5728 + # source://prism//lib/prism/node.rb#5736 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5647 + # source://prism//lib/prism/node.rb#5655 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#5652 + # source://prism//lib/prism/node.rb#5660 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5670 + # source://prism//lib/prism/node.rb#5678 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5665 + # source://prism//lib/prism/node.rb#5673 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node) -> ConstantPathOrWriteNode # - # source://prism//lib/prism/node.rb#5675 + # source://prism//lib/prism/node.rb#5683 sig do params( node_id: Integer, @@ -8013,13 +8001,13 @@ class Prism::ConstantPathOrWriteNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#5680 + # source://prism//lib/prism/node.rb#5688 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, target: ConstantPathNode, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#5683 + # source://prism//lib/prism/node.rb#5691 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -8027,7 +8015,7 @@ class Prism::ConstantPathOrWriteNode < ::Prism::Node # # @yield [target] # - # source://prism//lib/prism/node.rb#5657 + # source://prism//lib/prism/node.rb#5665 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -8035,50 +8023,50 @@ class Prism::ConstantPathOrWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#5712 + # source://prism//lib/prism/node.rb#5720 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#5707 + # source://prism//lib/prism/node.rb#5715 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#5691 + # source://prism//lib/prism/node.rb#5699 sig { returns(Prism::Location) } def operator_loc; end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#5699 + # source://prism//lib/prism/node.rb#5707 def save_operator_loc(repository); end # attr_reader target: ConstantPathNode # - # source://prism//lib/prism/node.rb#5688 + # source://prism//lib/prism/node.rb#5696 sig { returns(Prism::ConstantPathNode) } def target; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#5717 + # source://prism//lib/prism/node.rb#5725 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#5704 + # source://prism//lib/prism/node.rb#5712 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#5722 + # source://prism//lib/prism/node.rb#5730 def type; end end end @@ -8088,13 +8076,13 @@ end # Foo::Foo, Bar::Bar = baz # ^^^^^^^^ ^^^^^^^^ # -# source://prism//lib/prism/node.rb#5740 +# source://prism//lib/prism/node.rb#5748 class Prism::ConstantPathTargetNode < ::Prism::Node # Initialize a new ConstantPathTargetNode node. # # @return [ConstantPathTargetNode] a new instance of ConstantPathTargetNode # - # source://prism//lib/prism/node.rb#5742 + # source://prism//lib/prism/node.rb#5750 sig do params( source: Prism::Source, @@ -8112,12 +8100,12 @@ class Prism::ConstantPathTargetNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#5849 + # source://prism//lib/prism/node.rb#5857 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5754 + # source://prism//lib/prism/node.rb#5762 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -8130,25 +8118,25 @@ class Prism::ConstantPathTargetNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#5759 + # source://prism//lib/prism/node.rb#5767 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5778 + # source://prism//lib/prism/node.rb#5786 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5771 + # source://prism//lib/prism/node.rb#5779 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?parent: Prism::node?, ?name: Symbol?, ?delimiter_loc: Location, ?name_loc: Location) -> ConstantPathTargetNode # - # source://prism//lib/prism/node.rb#5783 + # source://prism//lib/prism/node.rb#5791 sig do params( node_id: Integer, @@ -8165,25 +8153,25 @@ class Prism::ConstantPathTargetNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#5788 + # source://prism//lib/prism/node.rb#5796 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, parent: Prism::node?, name: Symbol?, delimiter_loc: Location, name_loc: Location } # - # source://prism//lib/prism/node.rb#5791 + # source://prism//lib/prism/node.rb#5799 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#5828 + # source://prism//lib/prism/node.rb#5836 sig { returns(String) } def delimiter; end # attr_reader delimiter_loc: Location # - # source://prism//lib/prism/node.rb#5802 + # source://prism//lib/prism/node.rb#5810 sig { returns(Prism::Location) } def delimiter_loc; end @@ -8191,7 +8179,7 @@ class Prism::ConstantPathTargetNode < ::Prism::Node # # @yield [parent] # - # source://prism//lib/prism/node.rb#5764 + # source://prism//lib/prism/node.rb#5772 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -8212,50 +8200,50 @@ class Prism::ConstantPathTargetNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#5833 + # source://prism//lib/prism/node.rb#5841 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol? # - # source://prism//lib/prism/node.rb#5799 + # source://prism//lib/prism/node.rb#5807 sig { returns(T.nilable(Symbol)) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#5815 + # source://prism//lib/prism/node.rb#5823 sig { returns(Prism::Location) } def name_loc; end # attr_reader parent: Prism::node? # - # source://prism//lib/prism/node.rb#5796 + # source://prism//lib/prism/node.rb#5804 sig { returns(T.nilable(Prism::Node)) } def parent; end # Save the delimiter_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#5810 + # source://prism//lib/prism/node.rb#5818 def save_delimiter_loc(repository); end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#5823 + # source://prism//lib/prism/node.rb#5831 def save_name_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#5838 + # source://prism//lib/prism/node.rb#5846 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#5843 + # source://prism//lib/prism/node.rb#5851 def type; end end end @@ -8271,13 +8259,13 @@ end # ::Foo::Bar = 1 # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#5868 +# source://prism//lib/prism/node.rb#5876 class Prism::ConstantPathWriteNode < ::Prism::Node # Initialize a new ConstantPathWriteNode node. # # @return [ConstantPathWriteNode] a new instance of ConstantPathWriteNode # - # source://prism//lib/prism/node.rb#5870 + # source://prism//lib/prism/node.rb#5878 sig do params( source: Prism::Source, @@ -8294,36 +8282,36 @@ class Prism::ConstantPathWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#5974 + # source://prism//lib/prism/node.rb#5982 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5881 + # source://prism//lib/prism/node.rb#5889 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#5886 + # source://prism//lib/prism/node.rb#5894 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5904 + # source://prism//lib/prism/node.rb#5912 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5899 + # source://prism//lib/prism/node.rb#5907 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node) -> ConstantPathWriteNode # - # source://prism//lib/prism/node.rb#5909 + # source://prism//lib/prism/node.rb#5917 sig do params( node_id: Integer, @@ -8339,13 +8327,13 @@ class Prism::ConstantPathWriteNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#5914 + # source://prism//lib/prism/node.rb#5922 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, target: ConstantPathNode, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#5917 + # source://prism//lib/prism/node.rb#5925 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -8353,7 +8341,7 @@ class Prism::ConstantPathWriteNode < ::Prism::Node # # @yield [target] # - # source://prism//lib/prism/node.rb#5891 + # source://prism//lib/prism/node.rb#5899 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -8361,13 +8349,13 @@ class Prism::ConstantPathWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#5958 + # source://prism//lib/prism/node.rb#5966 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#5953 + # source://prism//lib/prism/node.rb#5961 sig { returns(String) } def operator; end @@ -8376,14 +8364,14 @@ class Prism::ConstantPathWriteNode < ::Prism::Node # ::ABC = 123 # ^ # - # source://prism//lib/prism/node.rb#5934 + # source://prism//lib/prism/node.rb#5942 sig { returns(Prism::Location) } def operator_loc; end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#5942 + # source://prism//lib/prism/node.rb#5950 def save_operator_loc(repository); end # A node representing the constant path being written to. @@ -8394,13 +8382,13 @@ class Prism::ConstantPathWriteNode < ::Prism::Node # ::Foo = :abc # ^^^^^ # - # source://prism//lib/prism/node.rb#5928 + # source://prism//lib/prism/node.rb#5936 sig { returns(Prism::ConstantPathNode) } def target; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#5963 + # source://prism//lib/prism/node.rb#5971 sig { override.returns(Symbol) } def type; end @@ -8409,14 +8397,14 @@ class Prism::ConstantPathWriteNode < ::Prism::Node # FOO::BAR = :abc # ^^^^ # - # source://prism//lib/prism/node.rb#5950 + # source://prism//lib/prism/node.rb#5958 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#5968 + # source://prism//lib/prism/node.rb#5976 def type; end end end @@ -8426,49 +8414,49 @@ end # Foo # ^^^ # -# source://prism//lib/prism/node.rb#5986 +# source://prism//lib/prism/node.rb#5994 class Prism::ConstantReadNode < ::Prism::Node # Initialize a new ConstantReadNode node. # # @return [ConstantReadNode] a new instance of ConstantReadNode # - # source://prism//lib/prism/node.rb#5988 + # source://prism//lib/prism/node.rb#5996 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#6059 + # source://prism//lib/prism/node.rb#6067 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5997 + # source://prism//lib/prism/node.rb#6005 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#6002 + # source://prism//lib/prism/node.rb#6010 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6018 + # source://prism//lib/prism/node.rb#6026 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6013 + # source://prism//lib/prism/node.rb#6021 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> ConstantReadNode # - # source://prism//lib/prism/node.rb#6023 + # source://prism//lib/prism/node.rb#6031 sig do params( node_id: Integer, @@ -8482,19 +8470,19 @@ class Prism::ConstantReadNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#6028 + # source://prism//lib/prism/node.rb#6036 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#6031 + # source://prism//lib/prism/node.rb#6039 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#6007 + # source://prism//lib/prism/node.rb#6015 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -8515,7 +8503,7 @@ class Prism::ConstantReadNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#6043 + # source://prism//lib/prism/node.rb#6051 sig { override.returns(String) } def inspect; end @@ -8525,20 +8513,20 @@ class Prism::ConstantReadNode < ::Prism::Node # # SOME_CONSTANT # name `:SOME_CONSTANT` # - # source://prism//lib/prism/node.rb#6040 + # source://prism//lib/prism/node.rb#6048 sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#6048 + # source://prism//lib/prism/node.rb#6056 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#6053 + # source://prism//lib/prism/node.rb#6061 def type; end end end @@ -8548,49 +8536,49 @@ end # Foo, Bar = baz # ^^^ ^^^ # -# source://prism//lib/prism/node.rb#6069 +# source://prism//lib/prism/node.rb#6077 class Prism::ConstantTargetNode < ::Prism::Node # Initialize a new ConstantTargetNode node. # # @return [ConstantTargetNode] a new instance of ConstantTargetNode # - # source://prism//lib/prism/node.rb#6071 + # source://prism//lib/prism/node.rb#6079 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#6138 + # source://prism//lib/prism/node.rb#6146 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6080 + # source://prism//lib/prism/node.rb#6088 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#6085 + # source://prism//lib/prism/node.rb#6093 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6101 + # source://prism//lib/prism/node.rb#6109 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6096 + # source://prism//lib/prism/node.rb#6104 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> ConstantTargetNode # - # source://prism//lib/prism/node.rb#6106 + # source://prism//lib/prism/node.rb#6114 sig do params( node_id: Integer, @@ -8604,19 +8592,19 @@ class Prism::ConstantTargetNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#6111 + # source://prism//lib/prism/node.rb#6119 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#6114 + # source://prism//lib/prism/node.rb#6122 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#6090 + # source://prism//lib/prism/node.rb#6098 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -8637,26 +8625,26 @@ class Prism::ConstantTargetNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#6122 + # source://prism//lib/prism/node.rb#6130 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#6119 + # source://prism//lib/prism/node.rb#6127 sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#6127 + # source://prism//lib/prism/node.rb#6135 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#6132 + # source://prism//lib/prism/node.rb#6140 def type; end end end @@ -8666,13 +8654,13 @@ end # Foo = 1 # ^^^^^^^ # -# source://prism//lib/prism/node.rb#6148 +# source://prism//lib/prism/node.rb#6156 class Prism::ConstantWriteNode < ::Prism::Node # Initialize a new ConstantWriteNode node. # # @return [ConstantWriteNode] a new instance of ConstantWriteNode # - # source://prism//lib/prism/node.rb#6150 + # source://prism//lib/prism/node.rb#6158 sig do params( source: Prism::Source, @@ -8690,36 +8678,36 @@ class Prism::ConstantWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#6271 + # source://prism//lib/prism/node.rb#6279 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6162 + # source://prism//lib/prism/node.rb#6170 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#6167 + # source://prism//lib/prism/node.rb#6175 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6184 + # source://prism//lib/prism/node.rb#6192 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6179 + # source://prism//lib/prism/node.rb#6187 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#6189 + # source://prism//lib/prism/node.rb#6197 sig do params( node_id: Integer, @@ -8736,13 +8724,13 @@ class Prism::ConstantWriteNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#6194 + # source://prism//lib/prism/node.rb#6202 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#6197 + # source://prism//lib/prism/node.rb#6205 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -8750,7 +8738,7 @@ class Prism::ConstantWriteNode < ::Prism::Node # # @yield [value] # - # source://prism//lib/prism/node.rb#6172 + # source://prism//lib/prism/node.rb#6180 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -8771,7 +8759,7 @@ class Prism::ConstantWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#6255 + # source://prism//lib/prism/node.rb#6263 sig { override.returns(String) } def inspect; end @@ -8781,7 +8769,7 @@ class Prism::ConstantWriteNode < ::Prism::Node # # XYZ = 1 # name `:XYZ` # - # source://prism//lib/prism/node.rb#6206 + # source://prism//lib/prism/node.rb#6214 sig { returns(Symbol) } def name; end @@ -8790,13 +8778,13 @@ class Prism::ConstantWriteNode < ::Prism::Node # FOO = 1 # ^^^ # - # source://prism//lib/prism/node.rb#6212 + # source://prism//lib/prism/node.rb#6220 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#6250 + # source://prism//lib/prism/node.rb#6258 sig { returns(String) } def operator; end @@ -8805,25 +8793,25 @@ class Prism::ConstantWriteNode < ::Prism::Node # FOO = :bar # ^ # - # source://prism//lib/prism/node.rb#6237 + # source://prism//lib/prism/node.rb#6245 sig { returns(Prism::Location) } def operator_loc; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#6220 + # source://prism//lib/prism/node.rb#6228 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#6245 + # source://prism//lib/prism/node.rb#6253 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#6260 + # source://prism//lib/prism/node.rb#6268 sig { override.returns(Symbol) } def type; end @@ -8835,27 +8823,27 @@ class Prism::ConstantWriteNode < ::Prism::Node # MyClass = Class.new # ^^^^^^^^^ # - # source://prism//lib/prism/node.rb#6231 + # source://prism//lib/prism/node.rb#6239 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#6265 + # source://prism//lib/prism/node.rb#6273 def type; end end end # Raised when requested to parse as the currently running Ruby version but Prism has no support for it. # -# source://prism//lib/prism.rb#41 +# source://prism//lib/prism.rb#39 class Prism::CurrentVersionError < ::ArgumentError # Initialize a new exception for the given ruby version string. # # @return [CurrentVersionError] a new instance of CurrentVersionError # - # source://prism//lib/prism.rb#43 + # source://prism//lib/prism.rb#41 def initialize(version); end end @@ -11513,13 +11501,13 @@ end # end # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#6285 +# source://prism//lib/prism/node.rb#6293 class Prism::DefNode < ::Prism::Node # Initialize a new DefNode node. # # @return [DefNode] a new instance of DefNode # - # source://prism//lib/prism/node.rb#6287 + # source://prism//lib/prism/node.rb#6295 sig do params( source: Prism::Source, @@ -11545,42 +11533,42 @@ class Prism::DefNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#6535 + # source://prism//lib/prism/node.rb#6543 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6307 + # source://prism//lib/prism/node.rb#6315 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader body: StatementsNode | BeginNode | nil # - # source://prism//lib/prism/node.rb#6375 + # source://prism//lib/prism/node.rb#6383 sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } def body; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#6312 + # source://prism//lib/prism/node.rb#6320 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6335 + # source://prism//lib/prism/node.rb#6343 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6326 + # source://prism//lib/prism/node.rb#6334 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?receiver: Prism::node?, ?parameters: ParametersNode?, ?body: StatementsNode | BeginNode | nil, ?locals: Array[Symbol], ?def_keyword_loc: Location, ?operator_loc: Location?, ?lparen_loc: Location?, ?rparen_loc: Location?, ?equal_loc: Location?, ?end_keyword_loc: Location?) -> DefNode # - # source://prism//lib/prism/node.rb#6340 + # source://prism//lib/prism/node.rb#6348 sig do params( node_id: Integer, @@ -11605,25 +11593,25 @@ class Prism::DefNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#6345 + # source://prism//lib/prism/node.rb#6353 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, receiver: Prism::node?, parameters: ParametersNode?, body: StatementsNode | BeginNode | nil, locals: Array[Symbol], def_keyword_loc: Location, operator_loc: Location?, lparen_loc: Location?, rparen_loc: Location?, equal_loc: Location?, end_keyword_loc: Location? } # - # source://prism//lib/prism/node.rb#6348 + # source://prism//lib/prism/node.rb#6356 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#6489 + # source://prism//lib/prism/node.rb#6497 sig { returns(String) } def def_keyword; end # attr_reader def_keyword_loc: Location # - # source://prism//lib/prism/node.rb#6381 + # source://prism//lib/prism/node.rb#6389 sig { returns(Prism::Location) } def def_keyword_loc; end @@ -11631,30 +11619,30 @@ class Prism::DefNode < ::Prism::Node # # @yield [receiver] # - # source://prism//lib/prism/node.rb#6317 + # source://prism//lib/prism/node.rb#6325 def each_child_node; end # def end_keyword: () -> String? # - # source://prism//lib/prism/node.rb#6514 + # source://prism//lib/prism/node.rb#6522 sig { returns(T.nilable(String)) } def end_keyword; end # attr_reader end_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#6470 + # source://prism//lib/prism/node.rb#6478 sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end # def equal: () -> String? # - # source://prism//lib/prism/node.rb#6509 + # source://prism//lib/prism/node.rb#6517 sig { returns(T.nilable(String)) } def equal; end # attr_reader equal_loc: Location? # - # source://prism//lib/prism/node.rb#6451 + # source://prism//lib/prism/node.rb#6459 sig { returns(T.nilable(Prism::Location)) } def equal_loc; end @@ -11663,128 +11651,128 @@ class Prism::DefNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#6519 + # source://prism//lib/prism/node.rb#6527 sig { override.returns(String) } def inspect; end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#6378 + # source://prism//lib/prism/node.rb#6386 sig { returns(T::Array[Symbol]) } def locals; end # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#6499 + # source://prism//lib/prism/node.rb#6507 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://prism//lib/prism/node.rb#6413 + # source://prism//lib/prism/node.rb#6421 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#6353 + # source://prism//lib/prism/node.rb#6361 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#6356 + # source://prism//lib/prism/node.rb#6364 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String? # - # source://prism//lib/prism/node.rb#6494 + # source://prism//lib/prism/node.rb#6502 sig { returns(T.nilable(String)) } def operator; end # attr_reader operator_loc: Location? # - # source://prism//lib/prism/node.rb#6394 + # source://prism//lib/prism/node.rb#6402 sig { returns(T.nilable(Prism::Location)) } def operator_loc; end # attr_reader parameters: ParametersNode? # - # source://prism//lib/prism/node.rb#6372 + # source://prism//lib/prism/node.rb#6380 sig { returns(T.nilable(Prism::ParametersNode)) } def parameters; end # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#6369 + # source://prism//lib/prism/node.rb#6377 sig { returns(T.nilable(Prism::Node)) } def receiver; end # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#6504 + # source://prism//lib/prism/node.rb#6512 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://prism//lib/prism/node.rb#6432 + # source://prism//lib/prism/node.rb#6440 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end # Save the def_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#6389 + # source://prism//lib/prism/node.rb#6397 def save_def_keyword_loc(repository); end # Save the end_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#6484 + # source://prism//lib/prism/node.rb#6492 def save_end_keyword_loc(repository); end # Save the equal_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#6465 + # source://prism//lib/prism/node.rb#6473 def save_equal_loc(repository); end # Save the lparen_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#6427 + # source://prism//lib/prism/node.rb#6435 def save_lparen_loc(repository); end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#6364 + # source://prism//lib/prism/node.rb#6372 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#6408 + # source://prism//lib/prism/node.rb#6416 def save_operator_loc(repository); end # Save the rparen_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#6446 + # source://prism//lib/prism/node.rb#6454 def save_rparen_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#6524 + # source://prism//lib/prism/node.rb#6532 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#6529 + # source://prism//lib/prism/node.rb#6537 def type; end end end @@ -11794,13 +11782,13 @@ end # defined?(a) # ^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#6557 +# source://prism//lib/prism/node.rb#6565 class Prism::DefinedNode < ::Prism::Node # Initialize a new DefinedNode node. # # @return [DefinedNode] a new instance of DefinedNode # - # source://prism//lib/prism/node.rb#6559 + # source://prism//lib/prism/node.rb#6567 sig do params( source: Prism::Source, @@ -11818,36 +11806,36 @@ class Prism::DefinedNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#6696 + # source://prism//lib/prism/node.rb#6704 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6571 + # source://prism//lib/prism/node.rb#6579 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#6576 + # source://prism//lib/prism/node.rb#6584 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6593 + # source://prism//lib/prism/node.rb#6601 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6588 + # source://prism//lib/prism/node.rb#6596 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?lparen_loc: Location?, ?value: Prism::node, ?rparen_loc: Location?, ?keyword_loc: Location) -> DefinedNode # - # source://prism//lib/prism/node.rb#6598 + # source://prism//lib/prism/node.rb#6606 sig do params( node_id: Integer, @@ -11864,13 +11852,13 @@ class Prism::DefinedNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#6603 + # source://prism//lib/prism/node.rb#6611 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, lparen_loc: Location?, value: Prism::node, rparen_loc: Location?, keyword_loc: Location } # - # source://prism//lib/prism/node.rb#6606 + # source://prism//lib/prism/node.rb#6614 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -11878,7 +11866,7 @@ class Prism::DefinedNode < ::Prism::Node # # @yield [value] # - # source://prism//lib/prism/node.rb#6581 + # source://prism//lib/prism/node.rb#6589 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -11886,80 +11874,80 @@ class Prism::DefinedNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#6680 + # source://prism//lib/prism/node.rb#6688 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#6675 + # source://prism//lib/prism/node.rb#6683 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#6652 + # source://prism//lib/prism/node.rb#6660 sig { returns(Prism::Location) } def keyword_loc; end # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#6665 + # source://prism//lib/prism/node.rb#6673 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://prism//lib/prism/node.rb#6611 + # source://prism//lib/prism/node.rb#6619 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#6670 + # source://prism//lib/prism/node.rb#6678 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://prism//lib/prism/node.rb#6633 + # source://prism//lib/prism/node.rb#6641 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end # Save the keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#6660 + # source://prism//lib/prism/node.rb#6668 def save_keyword_loc(repository); end # Save the lparen_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#6625 + # source://prism//lib/prism/node.rb#6633 def save_lparen_loc(repository); end # Save the rparen_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#6647 + # source://prism//lib/prism/node.rb#6655 def save_rparen_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#6685 + # source://prism//lib/prism/node.rb#6693 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#6630 + # source://prism//lib/prism/node.rb#6638 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#6690 + # source://prism//lib/prism/node.rb#6698 def type; end end end @@ -14980,13 +14968,13 @@ end # if a then b else c end # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#6709 +# source://prism//lib/prism/node.rb#6717 class Prism::ElseNode < ::Prism::Node # Initialize a new ElseNode node. # # @return [ElseNode] a new instance of ElseNode # - # source://prism//lib/prism/node.rb#6711 + # source://prism//lib/prism/node.rb#6719 sig do params( source: Prism::Source, @@ -15003,36 +14991,36 @@ class Prism::ElseNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#6825 + # source://prism//lib/prism/node.rb#6833 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6722 + # source://prism//lib/prism/node.rb#6730 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#6727 + # source://prism//lib/prism/node.rb#6735 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6746 + # source://prism//lib/prism/node.rb#6754 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6739 + # source://prism//lib/prism/node.rb#6747 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?else_keyword_loc: Location, ?statements: StatementsNode?, ?end_keyword_loc: Location?) -> ElseNode # - # source://prism//lib/prism/node.rb#6751 + # source://prism//lib/prism/node.rb#6759 sig do params( node_id: Integer, @@ -15048,13 +15036,13 @@ class Prism::ElseNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#6756 + # source://prism//lib/prism/node.rb#6764 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, else_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location? } # - # source://prism//lib/prism/node.rb#6759 + # source://prism//lib/prism/node.rb#6767 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -15062,30 +15050,30 @@ class Prism::ElseNode < ::Prism::Node # # @yield [statements] # - # source://prism//lib/prism/node.rb#6732 + # source://prism//lib/prism/node.rb#6740 def each_child_node; end # def else_keyword: () -> String # - # source://prism//lib/prism/node.rb#6799 + # source://prism//lib/prism/node.rb#6807 sig { returns(String) } def else_keyword; end # attr_reader else_keyword_loc: Location # - # source://prism//lib/prism/node.rb#6764 + # source://prism//lib/prism/node.rb#6772 sig { returns(Prism::Location) } def else_keyword_loc; end # def end_keyword: () -> String? # - # source://prism//lib/prism/node.rb#6804 + # source://prism//lib/prism/node.rb#6812 sig { returns(T.nilable(String)) } def end_keyword; end # attr_reader end_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#6780 + # source://prism//lib/prism/node.rb#6788 sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end @@ -15094,38 +15082,38 @@ class Prism::ElseNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#6809 + # source://prism//lib/prism/node.rb#6817 sig { override.returns(String) } def inspect; end # Save the else_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#6772 + # source://prism//lib/prism/node.rb#6780 def save_else_keyword_loc(repository); end # Save the end_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#6794 + # source://prism//lib/prism/node.rb#6802 def save_end_keyword_loc(repository); end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#6777 + # source://prism//lib/prism/node.rb#6785 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#6814 + # source://prism//lib/prism/node.rb#6822 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#6819 + # source://prism//lib/prism/node.rb#6827 def type; end end end @@ -15133,11 +15121,11 @@ end # EmbDocComment objects correspond to comments that are surrounded by =begin # and =end. # -# source://prism//lib/prism/parse_result.rb#549 +# source://prism//lib/prism/parse_result.rb#558 class Prism::EmbDocComment < ::Prism::Comment # Returns a string representation of this comment. # - # source://prism//lib/prism/parse_result.rb#556 + # source://prism//lib/prism/parse_result.rb#565 sig { returns(String) } def inspect; end @@ -15145,7 +15133,7 @@ class Prism::EmbDocComment < ::Prism::Comment # # @return [Boolean] # - # source://prism//lib/prism/parse_result.rb#551 + # source://prism//lib/prism/parse_result.rb#560 sig { override.returns(T::Boolean) } def trailing?; end end @@ -15155,13 +15143,13 @@ end # "foo #{bar}" # ^^^^^^ # -# source://prism//lib/prism/node.rb#6837 +# source://prism//lib/prism/node.rb#6845 class Prism::EmbeddedStatementsNode < ::Prism::Node # Initialize a new EmbeddedStatementsNode node. # # @return [EmbeddedStatementsNode] a new instance of EmbeddedStatementsNode # - # source://prism//lib/prism/node.rb#6839 + # source://prism//lib/prism/node.rb#6847 sig do params( source: Prism::Source, @@ -15178,48 +15166,48 @@ class Prism::EmbeddedStatementsNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#6947 + # source://prism//lib/prism/node.rb#6955 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6850 + # source://prism//lib/prism/node.rb#6858 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#6855 + # source://prism//lib/prism/node.rb#6863 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#6926 + # source://prism//lib/prism/node.rb#6934 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#6908 + # source://prism//lib/prism/node.rb#6916 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6874 + # source://prism//lib/prism/node.rb#6882 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6867 + # source://prism//lib/prism/node.rb#6875 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?statements: StatementsNode?, ?closing_loc: Location) -> EmbeddedStatementsNode # - # source://prism//lib/prism/node.rb#6879 + # source://prism//lib/prism/node.rb#6887 sig do params( node_id: Integer, @@ -15235,13 +15223,13 @@ class Prism::EmbeddedStatementsNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#6884 + # source://prism//lib/prism/node.rb#6892 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, statements: StatementsNode?, closing_loc: Location } # - # source://prism//lib/prism/node.rb#6887 + # source://prism//lib/prism/node.rb#6895 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -15249,7 +15237,7 @@ class Prism::EmbeddedStatementsNode < ::Prism::Node # # @yield [statements] # - # source://prism//lib/prism/node.rb#6860 + # source://prism//lib/prism/node.rb#6868 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -15257,50 +15245,50 @@ class Prism::EmbeddedStatementsNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#6931 + # source://prism//lib/prism/node.rb#6939 sig { override.returns(String) } def inspect; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#6921 + # source://prism//lib/prism/node.rb#6929 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#6892 + # source://prism//lib/prism/node.rb#6900 sig { returns(Prism::Location) } def opening_loc; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#6916 + # source://prism//lib/prism/node.rb#6924 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#6900 + # source://prism//lib/prism/node.rb#6908 def save_opening_loc(repository); end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#6905 + # source://prism//lib/prism/node.rb#6913 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#6936 + # source://prism//lib/prism/node.rb#6944 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#6941 + # source://prism//lib/prism/node.rb#6949 def type; end end end @@ -15310,13 +15298,13 @@ end # "foo #@bar" # ^^^^^ # -# source://prism//lib/prism/node.rb#6959 +# source://prism//lib/prism/node.rb#6967 class Prism::EmbeddedVariableNode < ::Prism::Node # Initialize a new EmbeddedVariableNode node. # # @return [EmbeddedVariableNode] a new instance of EmbeddedVariableNode # - # source://prism//lib/prism/node.rb#6961 + # source://prism//lib/prism/node.rb#6969 sig do params( source: Prism::Source, @@ -15332,36 +15320,36 @@ class Prism::EmbeddedVariableNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#7048 + # source://prism//lib/prism/node.rb#7056 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6971 + # source://prism//lib/prism/node.rb#6979 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#6976 + # source://prism//lib/prism/node.rb#6984 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6993 + # source://prism//lib/prism/node.rb#7001 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6988 + # source://prism//lib/prism/node.rb#6996 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?operator_loc: Location, ?variable: InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode) -> EmbeddedVariableNode # - # source://prism//lib/prism/node.rb#6998 + # source://prism//lib/prism/node.rb#7006 sig do params( node_id: Integer, @@ -15376,13 +15364,13 @@ class Prism::EmbeddedVariableNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#7003 + # source://prism//lib/prism/node.rb#7011 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, operator_loc: Location, variable: InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode } # - # source://prism//lib/prism/node.rb#7006 + # source://prism//lib/prism/node.rb#7014 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -15390,7 +15378,7 @@ class Prism::EmbeddedVariableNode < ::Prism::Node # # @yield [variable] # - # source://prism//lib/prism/node.rb#6981 + # source://prism//lib/prism/node.rb#6989 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -15398,37 +15386,37 @@ class Prism::EmbeddedVariableNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#7032 + # source://prism//lib/prism/node.rb#7040 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#7027 + # source://prism//lib/prism/node.rb#7035 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#7011 + # source://prism//lib/prism/node.rb#7019 sig { returns(Prism::Location) } def operator_loc; end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#7019 + # source://prism//lib/prism/node.rb#7027 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#7037 + # source://prism//lib/prism/node.rb#7045 sig { override.returns(Symbol) } def type; end # attr_reader variable: InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode # - # source://prism//lib/prism/node.rb#7024 + # source://prism//lib/prism/node.rb#7032 sig do returns(T.any(Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)) end @@ -15437,24 +15425,24 @@ class Prism::EmbeddedVariableNode < ::Prism::Node class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#7042 + # source://prism//lib/prism/node.rb#7050 def type; end end end # Flags for nodes that have unescaped content. # -# source://prism//lib/prism/node.rb#19811 +# source://prism//lib/prism/node.rb#19819 module Prism::EncodingFlags; end # internal bytes forced the encoding to binary # -# source://prism//lib/prism/node.rb#19816 +# source://prism//lib/prism/node.rb#19824 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#19813 +# source://prism//lib/prism/node.rb#19821 Prism::EncodingFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) # Represents an `ensure` clause in a `begin` statement. @@ -15466,13 +15454,13 @@ Prism::EncodingFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) # bar # end # -# source://prism//lib/prism/node.rb#7063 +# source://prism//lib/prism/node.rb#7071 class Prism::EnsureNode < ::Prism::Node # Initialize a new EnsureNode node. # # @return [EnsureNode] a new instance of EnsureNode # - # source://prism//lib/prism/node.rb#7065 + # source://prism//lib/prism/node.rb#7073 sig do params( source: Prism::Source, @@ -15489,36 +15477,36 @@ class Prism::EnsureNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#7173 + # source://prism//lib/prism/node.rb#7181 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7076 + # source://prism//lib/prism/node.rb#7084 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#7081 + # source://prism//lib/prism/node.rb#7089 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7100 + # source://prism//lib/prism/node.rb#7108 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7093 + # source://prism//lib/prism/node.rb#7101 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?ensure_keyword_loc: Location, ?statements: StatementsNode?, ?end_keyword_loc: Location) -> EnsureNode # - # source://prism//lib/prism/node.rb#7105 + # source://prism//lib/prism/node.rb#7113 sig do params( node_id: Integer, @@ -15534,13 +15522,13 @@ class Prism::EnsureNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#7110 + # source://prism//lib/prism/node.rb#7118 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, ensure_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location } # - # source://prism//lib/prism/node.rb#7113 + # source://prism//lib/prism/node.rb#7121 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -15548,30 +15536,30 @@ class Prism::EnsureNode < ::Prism::Node # # @yield [statements] # - # source://prism//lib/prism/node.rb#7086 + # source://prism//lib/prism/node.rb#7094 def each_child_node; end # def end_keyword: () -> String # - # source://prism//lib/prism/node.rb#7152 + # source://prism//lib/prism/node.rb#7160 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism//lib/prism/node.rb#7134 + # source://prism//lib/prism/node.rb#7142 sig { returns(Prism::Location) } def end_keyword_loc; end # def ensure_keyword: () -> String # - # source://prism//lib/prism/node.rb#7147 + # source://prism//lib/prism/node.rb#7155 sig { returns(String) } def ensure_keyword; end # attr_reader ensure_keyword_loc: Location # - # source://prism//lib/prism/node.rb#7118 + # source://prism//lib/prism/node.rb#7126 sig { returns(Prism::Location) } def ensure_keyword_loc; end @@ -15580,38 +15568,38 @@ class Prism::EnsureNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#7157 + # source://prism//lib/prism/node.rb#7165 sig { override.returns(String) } def inspect; end # Save the end_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#7142 + # source://prism//lib/prism/node.rb#7150 def save_end_keyword_loc(repository); end # Save the ensure_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#7126 + # source://prism//lib/prism/node.rb#7134 def save_ensure_keyword_loc(repository); end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#7131 + # source://prism//lib/prism/node.rb#7139 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#7162 + # source://prism//lib/prism/node.rb#7170 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#7167 + # source://prism//lib/prism/node.rb#7175 def type; end end end @@ -15621,68 +15609,68 @@ end # false # ^^^^^ # -# source://prism//lib/prism/node.rb#7185 +# source://prism//lib/prism/node.rb#7193 class Prism::FalseNode < ::Prism::Node # Initialize a new FalseNode node. # # @return [FalseNode] a new instance of FalseNode # - # source://prism//lib/prism/node.rb#7187 + # source://prism//lib/prism/node.rb#7195 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#7250 + # source://prism//lib/prism/node.rb#7258 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7195 + # source://prism//lib/prism/node.rb#7203 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#7200 + # source://prism//lib/prism/node.rb#7208 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7216 + # source://prism//lib/prism/node.rb#7224 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7211 + # source://prism//lib/prism/node.rb#7219 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> FalseNode # - # source://prism//lib/prism/node.rb#7221 + # source://prism//lib/prism/node.rb#7229 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[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#7226 + # source://prism//lib/prism/node.rb#7234 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#7229 + # source://prism//lib/prism/node.rb#7237 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#7205 + # source://prism//lib/prism/node.rb#7213 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -15690,20 +15678,20 @@ class Prism::FalseNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#7234 + # source://prism//lib/prism/node.rb#7242 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#7239 + # source://prism//lib/prism/node.rb#7247 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#7244 + # source://prism//lib/prism/node.rb#7252 def type; end end end @@ -15722,13 +15710,13 @@ end # foo => *bar, baz, *qux # ^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#7268 +# source://prism//lib/prism/node.rb#7276 class Prism::FindPatternNode < ::Prism::Node # Initialize a new FindPatternNode node. # # @return [FindPatternNode] a new instance of FindPatternNode # - # source://prism//lib/prism/node.rb#7270 + # source://prism//lib/prism/node.rb#7278 sig do params( source: Prism::Source, @@ -15748,24 +15736,24 @@ class Prism::FindPatternNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#7441 + # source://prism//lib/prism/node.rb#7449 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7284 + # source://prism//lib/prism/node.rb#7292 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#7289 + # source://prism//lib/prism/node.rb#7297 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#7420 + # source://prism//lib/prism/node.rb#7428 sig { returns(T.nilable(String)) } def closing; end @@ -15777,19 +15765,19 @@ class Prism::FindPatternNode < ::Prism::Node # foo in Foo(*bar, baz, *qux) # ^ # - # source://prism//lib/prism/node.rb#7396 + # source://prism//lib/prism/node.rb#7404 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7314 + # source://prism//lib/prism/node.rb#7322 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7304 + # source://prism//lib/prism/node.rb#7312 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end @@ -15798,13 +15786,13 @@ class Prism::FindPatternNode < ::Prism::Node # foo in Foo(*bar, baz, *qux) # ^^^ # - # source://prism//lib/prism/node.rb#7335 + # source://prism//lib/prism/node.rb#7343 sig { returns(T.nilable(T.any(Prism::ConstantPathNode, Prism::ConstantReadNode))) } def constant; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?constant: ConstantPathNode | ConstantReadNode | nil, ?left: SplatNode, ?requireds: Array[Prism::node], ?right: SplatNode | MissingNode, ?opening_loc: Location?, ?closing_loc: Location?) -> FindPatternNode # - # source://prism//lib/prism/node.rb#7319 + # source://prism//lib/prism/node.rb#7327 sig do params( node_id: Integer, @@ -15823,13 +15811,13 @@ class Prism::FindPatternNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#7324 + # source://prism//lib/prism/node.rb#7332 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, constant: ConstantPathNode | ConstantReadNode | nil, left: SplatNode, requireds: Array[Prism::node], right: SplatNode | MissingNode, opening_loc: Location?, closing_loc: Location? } # - # source://prism//lib/prism/node.rb#7327 + # source://prism//lib/prism/node.rb#7335 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -15837,7 +15825,7 @@ class Prism::FindPatternNode < ::Prism::Node # # @yield [constant] # - # source://prism//lib/prism/node.rb#7294 + # source://prism//lib/prism/node.rb#7302 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -15845,7 +15833,7 @@ class Prism::FindPatternNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#7425 + # source://prism//lib/prism/node.rb#7433 sig { override.returns(String) } def inspect; end @@ -15857,13 +15845,13 @@ class Prism::FindPatternNode < ::Prism::Node # foo in Foo(*bar, baz, *qux) # ^^^^ # - # source://prism//lib/prism/node.rb#7344 + # source://prism//lib/prism/node.rb#7352 sig { returns(Prism::SplatNode) } def left; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#7415 + # source://prism//lib/prism/node.rb#7423 sig { returns(T.nilable(String)) } def opening; end @@ -15875,7 +15863,7 @@ class Prism::FindPatternNode < ::Prism::Node # foo in Foo(*bar, baz, *qux) # ^ # - # source://prism//lib/prism/node.rb#7371 + # source://prism//lib/prism/node.rb#7379 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end @@ -15887,7 +15875,7 @@ class Prism::FindPatternNode < ::Prism::Node # foo in Foo(*bar, baz, 1, *qux) # ^^^^^^ # - # source://prism//lib/prism/node.rb#7353 + # source://prism//lib/prism/node.rb#7361 sig { returns(T::Array[Prism::Node]) } def requireds; end @@ -15899,32 +15887,32 @@ class Prism::FindPatternNode < ::Prism::Node # foo in Foo(*bar, baz, *qux) # ^^^^ # - # source://prism//lib/prism/node.rb#7362 + # source://prism//lib/prism/node.rb#7370 sig { returns(T.any(Prism::SplatNode, Prism::MissingNode)) } def right; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#7410 + # source://prism//lib/prism/node.rb#7418 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#7385 + # source://prism//lib/prism/node.rb#7393 def save_opening_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#7430 + # source://prism//lib/prism/node.rb#7438 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#7435 + # source://prism//lib/prism/node.rb#7443 def type; end end end @@ -15934,13 +15922,13 @@ end # baz if foo .. bar # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#7457 +# source://prism//lib/prism/node.rb#7465 class Prism::FlipFlopNode < ::Prism::Node # Initialize a new FlipFlopNode node. # # @return [FlipFlopNode] a new instance of FlipFlopNode # - # source://prism//lib/prism/node.rb#7459 + # source://prism//lib/prism/node.rb#7467 sig do params( source: Prism::Source, @@ -15957,36 +15945,36 @@ class Prism::FlipFlopNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#7559 + # source://prism//lib/prism/node.rb#7567 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7470 + # source://prism//lib/prism/node.rb#7478 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#7475 + # source://prism//lib/prism/node.rb#7483 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7496 + # source://prism//lib/prism/node.rb#7504 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7488 + # source://prism//lib/prism/node.rb#7496 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?left: Prism::node?, ?right: Prism::node?, ?operator_loc: Location) -> FlipFlopNode # - # source://prism//lib/prism/node.rb#7501 + # source://prism//lib/prism/node.rb#7509 sig do params( node_id: Integer, @@ -16002,13 +15990,13 @@ class Prism::FlipFlopNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#7506 + # source://prism//lib/prism/node.rb#7514 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node?, right: Prism::node?, operator_loc: Location } # - # source://prism//lib/prism/node.rb#7509 + # source://prism//lib/prism/node.rb#7517 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -16016,14 +16004,14 @@ class Prism::FlipFlopNode < ::Prism::Node # # @yield [left] # - # source://prism//lib/prism/node.rb#7480 + # source://prism//lib/prism/node.rb#7488 def each_child_node; end # def exclude_end?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#7514 + # source://prism//lib/prism/node.rb#7522 sig { returns(T::Boolean) } def exclude_end?; end @@ -16032,50 +16020,50 @@ class Prism::FlipFlopNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#7543 + # source://prism//lib/prism/node.rb#7551 sig { override.returns(String) } def inspect; end # attr_reader left: Prism::node? # - # source://prism//lib/prism/node.rb#7519 + # source://prism//lib/prism/node.rb#7527 sig { returns(T.nilable(Prism::Node)) } def left; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#7538 + # source://prism//lib/prism/node.rb#7546 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#7525 + # source://prism//lib/prism/node.rb#7533 sig { returns(Prism::Location) } def operator_loc; end # attr_reader right: Prism::node? # - # source://prism//lib/prism/node.rb#7522 + # source://prism//lib/prism/node.rb#7530 sig { returns(T.nilable(Prism::Node)) } def right; end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#7533 + # source://prism//lib/prism/node.rb#7541 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#7548 + # source://prism//lib/prism/node.rb#7556 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#7553 + # source://prism//lib/prism/node.rb#7561 def type; end end end @@ -16085,68 +16073,68 @@ end # 1.0 # ^^^ # -# source://prism//lib/prism/node.rb#7572 +# source://prism//lib/prism/node.rb#7580 class Prism::FloatNode < ::Prism::Node # Initialize a new FloatNode node. # # @return [FloatNode] a new instance of FloatNode # - # source://prism//lib/prism/node.rb#7574 + # source://prism//lib/prism/node.rb#7582 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#7641 + # source://prism//lib/prism/node.rb#7649 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7583 + # source://prism//lib/prism/node.rb#7591 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#7588 + # source://prism//lib/prism/node.rb#7596 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7604 + # source://prism//lib/prism/node.rb#7612 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7599 + # source://prism//lib/prism/node.rb#7607 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Float) -> FloatNode # - # source://prism//lib/prism/node.rb#7609 + # source://prism//lib/prism/node.rb#7617 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[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#7614 + # source://prism//lib/prism/node.rb#7622 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Float } # - # source://prism//lib/prism/node.rb#7617 + # source://prism//lib/prism/node.rb#7625 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#7593 + # source://prism//lib/prism/node.rb#7601 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -16154,26 +16142,26 @@ class Prism::FloatNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#7625 + # source://prism//lib/prism/node.rb#7633 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#7630 + # source://prism//lib/prism/node.rb#7638 sig { override.returns(Symbol) } def type; end # The value of the floating point number as a Float. # - # source://prism//lib/prism/node.rb#7622 + # source://prism//lib/prism/node.rb#7630 sig { returns(Float) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#7635 + # source://prism//lib/prism/node.rb#7643 def type; end end end @@ -16183,13 +16171,13 @@ end # for i in a end # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#7651 +# source://prism//lib/prism/node.rb#7659 class Prism::ForNode < ::Prism::Node # Initialize a new ForNode node. # # @return [ForNode] a new instance of ForNode # - # source://prism//lib/prism/node.rb#7653 + # source://prism//lib/prism/node.rb#7661 sig do params( source: Prism::Source, @@ -16210,18 +16198,18 @@ class Prism::ForNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#7840 + # source://prism//lib/prism/node.rb#7848 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7668 + # source://prism//lib/prism/node.rb#7676 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#7673 + # source://prism//lib/prism/node.rb#7681 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end @@ -16230,25 +16218,25 @@ class Prism::ForNode < ::Prism::Node # for i in a end # ^ # - # source://prism//lib/prism/node.rb#7723 + # source://prism//lib/prism/node.rb#7731 sig { returns(Prism::Node) } def collection; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7696 + # source://prism//lib/prism/node.rb#7704 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7687 + # source://prism//lib/prism/node.rb#7695 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?index: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode, ?collection: Prism::node, ?statements: StatementsNode?, ?for_keyword_loc: Location, ?in_keyword_loc: Location, ?do_keyword_loc: Location?, ?end_keyword_loc: Location) -> ForNode # - # source://prism//lib/prism/node.rb#7701 + # source://prism//lib/prism/node.rb#7709 sig do params( node_id: Integer, @@ -16268,19 +16256,19 @@ class Prism::ForNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#7706 + # source://prism//lib/prism/node.rb#7714 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, index: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode, collection: Prism::node, statements: StatementsNode?, for_keyword_loc: Location, in_keyword_loc: Location, do_keyword_loc: Location?, end_keyword_loc: Location } # - # source://prism//lib/prism/node.rb#7709 + # source://prism//lib/prism/node.rb#7717 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#7814 + # source://prism//lib/prism/node.rb#7822 sig { returns(T.nilable(String)) } def do_keyword; end @@ -16289,7 +16277,7 @@ class Prism::ForNode < ::Prism::Node # for i in a do end # ^^ # - # source://prism//lib/prism/node.rb#7769 + # source://prism//lib/prism/node.rb#7777 sig { returns(T.nilable(Prism::Location)) } def do_keyword_loc; end @@ -16297,12 +16285,12 @@ class Prism::ForNode < ::Prism::Node # # @yield [index] # - # source://prism//lib/prism/node.rb#7678 + # source://prism//lib/prism/node.rb#7686 def each_child_node; end # def end_keyword: () -> String # - # source://prism//lib/prism/node.rb#7819 + # source://prism//lib/prism/node.rb#7827 sig { returns(String) } def end_keyword; end @@ -16311,7 +16299,7 @@ class Prism::ForNode < ::Prism::Node # for i in a end # ^^^ # - # source://prism//lib/prism/node.rb#7791 + # source://prism//lib/prism/node.rb#7799 sig { returns(Prism::Location) } def end_keyword_loc; end @@ -16320,7 +16308,7 @@ class Prism::ForNode < ::Prism::Node # def for_keyword: () -> String # - # source://prism//lib/prism/node.rb#7804 + # source://prism//lib/prism/node.rb#7812 sig { returns(String) } def for_keyword; end @@ -16329,13 +16317,13 @@ class Prism::ForNode < ::Prism::Node # for i in a end # ^^^ # - # source://prism//lib/prism/node.rb#7737 + # source://prism//lib/prism/node.rb#7745 sig { returns(Prism::Location) } def for_keyword_loc; end # def in_keyword: () -> String # - # source://prism//lib/prism/node.rb#7809 + # source://prism//lib/prism/node.rb#7817 sig { returns(String) } def in_keyword; end @@ -16344,7 +16332,7 @@ class Prism::ForNode < ::Prism::Node # for i in a end # ^^ # - # source://prism//lib/prism/node.rb#7753 + # source://prism//lib/prism/node.rb#7761 sig { returns(Prism::Location) } def in_keyword_loc; end @@ -16353,7 +16341,7 @@ class Prism::ForNode < ::Prism::Node # for i in a end # ^ # - # source://prism//lib/prism/node.rb#7717 + # source://prism//lib/prism/node.rb#7725 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 @@ -16361,32 +16349,32 @@ class Prism::ForNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#7824 + # source://prism//lib/prism/node.rb#7832 sig { override.returns(String) } def inspect; end # Save the do_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#7783 + # source://prism//lib/prism/node.rb#7791 def save_do_keyword_loc(repository); end # Save the end_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#7799 + # source://prism//lib/prism/node.rb#7807 def save_end_keyword_loc(repository); end # Save the for_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#7745 + # source://prism//lib/prism/node.rb#7753 def save_for_keyword_loc(repository); end # Save the in_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#7761 + # source://prism//lib/prism/node.rb#7769 def save_in_keyword_loc(repository); end # Represents the body of statements to execute for each iteration of the loop. @@ -16396,20 +16384,20 @@ class Prism::ForNode < ::Prism::Node # ^^^^^^ # end # - # source://prism//lib/prism/node.rb#7731 + # source://prism//lib/prism/node.rb#7739 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#7829 + # source://prism//lib/prism/node.rb#7837 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#7834 + # source://prism//lib/prism/node.rb#7842 def type; end end end @@ -16421,68 +16409,68 @@ end # ^^^ # end # -# source://prism//lib/prism/node.rb#7858 +# source://prism//lib/prism/node.rb#7866 class Prism::ForwardingArgumentsNode < ::Prism::Node # Initialize a new ForwardingArgumentsNode node. # # @return [ForwardingArgumentsNode] a new instance of ForwardingArgumentsNode # - # source://prism//lib/prism/node.rb#7860 + # source://prism//lib/prism/node.rb#7868 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#7923 + # source://prism//lib/prism/node.rb#7931 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7868 + # source://prism//lib/prism/node.rb#7876 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#7873 + # source://prism//lib/prism/node.rb#7881 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7889 + # source://prism//lib/prism/node.rb#7897 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7884 + # source://prism//lib/prism/node.rb#7892 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ForwardingArgumentsNode # - # source://prism//lib/prism/node.rb#7894 + # source://prism//lib/prism/node.rb#7902 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[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#7899 + # source://prism//lib/prism/node.rb#7907 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#7902 + # source://prism//lib/prism/node.rb#7910 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#7878 + # source://prism//lib/prism/node.rb#7886 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -16490,20 +16478,20 @@ class Prism::ForwardingArgumentsNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#7907 + # source://prism//lib/prism/node.rb#7915 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#7912 + # source://prism//lib/prism/node.rb#7920 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#7917 + # source://prism//lib/prism/node.rb#7925 def type; end end end @@ -16514,68 +16502,68 @@ end # ^^^ # end # -# source://prism//lib/prism/node.rb#7933 +# source://prism//lib/prism/node.rb#7941 class Prism::ForwardingParameterNode < ::Prism::Node # Initialize a new ForwardingParameterNode node. # # @return [ForwardingParameterNode] a new instance of ForwardingParameterNode # - # source://prism//lib/prism/node.rb#7935 + # source://prism//lib/prism/node.rb#7943 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#7998 + # source://prism//lib/prism/node.rb#8006 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7943 + # source://prism//lib/prism/node.rb#7951 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#7948 + # source://prism//lib/prism/node.rb#7956 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7964 + # source://prism//lib/prism/node.rb#7972 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7959 + # source://prism//lib/prism/node.rb#7967 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ForwardingParameterNode # - # source://prism//lib/prism/node.rb#7969 + # source://prism//lib/prism/node.rb#7977 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[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#7974 + # source://prism//lib/prism/node.rb#7982 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#7977 + # source://prism//lib/prism/node.rb#7985 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#7953 + # source://prism//lib/prism/node.rb#7961 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -16583,20 +16571,20 @@ class Prism::ForwardingParameterNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#7982 + # source://prism//lib/prism/node.rb#7990 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#7987 + # source://prism//lib/prism/node.rb#7995 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#7992 + # source://prism//lib/prism/node.rb#8000 def type; end end end @@ -16611,13 +16599,13 @@ end # # If it has any other arguments, it would be a `SuperNode` instead. # -# source://prism//lib/prism/node.rb#8012 +# source://prism//lib/prism/node.rb#8020 class Prism::ForwardingSuperNode < ::Prism::Node # Initialize a new ForwardingSuperNode node. # # @return [ForwardingSuperNode] a new instance of ForwardingSuperNode # - # source://prism//lib/prism/node.rb#8014 + # source://prism//lib/prism/node.rb#8022 sig do params( source: Prism::Source, @@ -16632,42 +16620,42 @@ class Prism::ForwardingSuperNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#8084 + # source://prism//lib/prism/node.rb#8092 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8023 + # source://prism//lib/prism/node.rb#8031 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # All other arguments are forwarded as normal, except the original block is replaced with the new block. # - # source://prism//lib/prism/node.rb#8065 + # source://prism//lib/prism/node.rb#8073 sig { returns(T.nilable(Prism::BlockNode)) } def block; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#8028 + # source://prism//lib/prism/node.rb#8036 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8047 + # 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#8040 + # source://prism//lib/prism/node.rb#8048 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?block: BlockNode?) -> ForwardingSuperNode # - # source://prism//lib/prism/node.rb#8052 + # source://prism//lib/prism/node.rb#8060 sig do params( node_id: Integer, @@ -16681,13 +16669,13 @@ class Prism::ForwardingSuperNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#8057 + # source://prism//lib/prism/node.rb#8065 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, block: BlockNode? } # - # source://prism//lib/prism/node.rb#8060 + # 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 @@ -16695,7 +16683,7 @@ class Prism::ForwardingSuperNode < ::Prism::Node # # @yield [block] # - # source://prism//lib/prism/node.rb#8033 + # source://prism//lib/prism/node.rb#8041 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -16703,20 +16691,20 @@ class Prism::ForwardingSuperNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#8068 + # source://prism//lib/prism/node.rb#8076 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#8073 + # source://prism//lib/prism/node.rb#8081 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#8078 + # source://prism//lib/prism/node.rb#8086 def type; end end end @@ -16726,13 +16714,13 @@ end # $target &&= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#8094 +# source://prism//lib/prism/node.rb#8102 class Prism::GlobalVariableAndWriteNode < ::Prism::Node # Initialize a new GlobalVariableAndWriteNode node. # # @return [GlobalVariableAndWriteNode] a new instance of GlobalVariableAndWriteNode # - # source://prism//lib/prism/node.rb#8096 + # source://prism//lib/prism/node.rb#8104 sig do params( source: Prism::Source, @@ -16750,36 +16738,36 @@ class Prism::GlobalVariableAndWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#8201 + # source://prism//lib/prism/node.rb#8209 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8108 + # source://prism//lib/prism/node.rb#8116 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#8113 + # source://prism//lib/prism/node.rb#8121 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8130 + # source://prism//lib/prism/node.rb#8138 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8125 + # source://prism//lib/prism/node.rb#8133 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> GlobalVariableAndWriteNode # - # source://prism//lib/prism/node.rb#8135 + # source://prism//lib/prism/node.rb#8143 sig do params( node_id: Integer, @@ -16796,13 +16784,13 @@ class Prism::GlobalVariableAndWriteNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#8140 + # source://prism//lib/prism/node.rb#8148 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#8143 + # source://prism//lib/prism/node.rb#8151 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -16813,7 +16801,7 @@ class Prism::GlobalVariableAndWriteNode < ::Prism::Node # # @yield [value] # - # source://prism//lib/prism/node.rb#8118 + # source://prism//lib/prism/node.rb#8126 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -16821,62 +16809,62 @@ class Prism::GlobalVariableAndWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#8185 + # source://prism//lib/prism/node.rb#8193 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#8148 + # source://prism//lib/prism/node.rb#8156 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#8151 + # source://prism//lib/prism/node.rb#8159 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#8180 + # source://prism//lib/prism/node.rb#8188 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#8164 + # source://prism//lib/prism/node.rb#8172 sig { returns(Prism::Location) } def operator_loc; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#8159 + # source://prism//lib/prism/node.rb#8167 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#8172 + # source://prism//lib/prism/node.rb#8180 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#8190 + # source://prism//lib/prism/node.rb#8198 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#8177 + # source://prism//lib/prism/node.rb#8185 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#8195 + # source://prism//lib/prism/node.rb#8203 def type; end end end @@ -16886,13 +16874,13 @@ end # $target += value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#8214 +# source://prism//lib/prism/node.rb#8222 class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node # Initialize a new GlobalVariableOperatorWriteNode node. # # @return [GlobalVariableOperatorWriteNode] a new instance of GlobalVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#8216 + # source://prism//lib/prism/node.rb#8224 sig do params( source: Prism::Source, @@ -16911,48 +16899,48 @@ class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#8320 + # source://prism//lib/prism/node.rb#8328 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8229 + # source://prism//lib/prism/node.rb#8237 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader binary_operator: Symbol # - # source://prism//lib/prism/node.rb#8301 + # source://prism//lib/prism/node.rb#8309 sig { returns(Symbol) } def binary_operator; end # attr_reader binary_operator_loc: Location # - # source://prism//lib/prism/node.rb#8285 + # source://prism//lib/prism/node.rb#8293 sig { returns(Prism::Location) } def binary_operator_loc; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#8234 + # source://prism//lib/prism/node.rb#8242 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8251 + # source://prism//lib/prism/node.rb#8259 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8246 + # source://prism//lib/prism/node.rb#8254 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol) -> GlobalVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#8256 + # source://prism//lib/prism/node.rb#8264 sig do params( node_id: Integer, @@ -16970,13 +16958,13 @@ class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#8261 + # source://prism//lib/prism/node.rb#8269 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol } # - # source://prism//lib/prism/node.rb#8264 + # source://prism//lib/prism/node.rb#8272 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -16987,7 +16975,7 @@ class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node # # @yield [value] # - # source://prism//lib/prism/node.rb#8239 + # source://prism//lib/prism/node.rb#8247 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -16995,19 +16983,19 @@ class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#8304 + # source://prism//lib/prism/node.rb#8312 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#8269 + # source://prism//lib/prism/node.rb#8277 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#8272 + # source://prism//lib/prism/node.rb#8280 sig { returns(Prism::Location) } def name_loc; end @@ -17026,31 +17014,31 @@ class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node # Save the binary_operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#8293 + # source://prism//lib/prism/node.rb#8301 def save_binary_operator_loc(repository); end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#8280 + # source://prism//lib/prism/node.rb#8288 def save_name_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#8309 + # source://prism//lib/prism/node.rb#8317 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#8298 + # source://prism//lib/prism/node.rb#8306 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#8314 + # source://prism//lib/prism/node.rb#8322 def type; end end end @@ -17060,13 +17048,13 @@ end # $target ||= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#8334 +# source://prism//lib/prism/node.rb#8342 class Prism::GlobalVariableOrWriteNode < ::Prism::Node # Initialize a new GlobalVariableOrWriteNode node. # # @return [GlobalVariableOrWriteNode] a new instance of GlobalVariableOrWriteNode # - # source://prism//lib/prism/node.rb#8336 + # source://prism//lib/prism/node.rb#8344 sig do params( source: Prism::Source, @@ -17084,36 +17072,36 @@ class Prism::GlobalVariableOrWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#8441 + # source://prism//lib/prism/node.rb#8449 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8348 + # source://prism//lib/prism/node.rb#8356 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#8353 + # source://prism//lib/prism/node.rb#8361 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8370 + # source://prism//lib/prism/node.rb#8378 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8365 + # source://prism//lib/prism/node.rb#8373 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> GlobalVariableOrWriteNode # - # source://prism//lib/prism/node.rb#8375 + # source://prism//lib/prism/node.rb#8383 sig do params( node_id: Integer, @@ -17130,13 +17118,13 @@ class Prism::GlobalVariableOrWriteNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#8380 + # source://prism//lib/prism/node.rb#8388 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#8383 + # source://prism//lib/prism/node.rb#8391 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -17147,7 +17135,7 @@ class Prism::GlobalVariableOrWriteNode < ::Prism::Node # # @yield [value] # - # source://prism//lib/prism/node.rb#8358 + # source://prism//lib/prism/node.rb#8366 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -17155,62 +17143,62 @@ class Prism::GlobalVariableOrWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#8425 + # source://prism//lib/prism/node.rb#8433 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#8388 + # source://prism//lib/prism/node.rb#8396 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#8391 + # source://prism//lib/prism/node.rb#8399 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#8420 + # source://prism//lib/prism/node.rb#8428 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#8404 + # source://prism//lib/prism/node.rb#8412 sig { returns(Prism::Location) } def operator_loc; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#8399 + # source://prism//lib/prism/node.rb#8407 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#8412 + # source://prism//lib/prism/node.rb#8420 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#8430 + # source://prism//lib/prism/node.rb#8438 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#8417 + # source://prism//lib/prism/node.rb#8425 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#8435 + # source://prism//lib/prism/node.rb#8443 def type; end end end @@ -17220,49 +17208,49 @@ end # $foo # ^^^^ # -# source://prism//lib/prism/node.rb#8454 +# source://prism//lib/prism/node.rb#8462 class Prism::GlobalVariableReadNode < ::Prism::Node # Initialize a new GlobalVariableReadNode node. # # @return [GlobalVariableReadNode] a new instance of GlobalVariableReadNode # - # source://prism//lib/prism/node.rb#8456 + # source://prism//lib/prism/node.rb#8464 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#8527 + # source://prism//lib/prism/node.rb#8535 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8465 + # source://prism//lib/prism/node.rb#8473 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#8470 + # source://prism//lib/prism/node.rb#8478 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8486 + # source://prism//lib/prism/node.rb#8494 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8481 + # source://prism//lib/prism/node.rb#8489 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> GlobalVariableReadNode # - # source://prism//lib/prism/node.rb#8491 + # source://prism//lib/prism/node.rb#8499 sig do params( node_id: Integer, @@ -17276,19 +17264,19 @@ class Prism::GlobalVariableReadNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#8496 + # source://prism//lib/prism/node.rb#8504 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#8499 + # source://prism//lib/prism/node.rb#8507 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#8475 + # source://prism//lib/prism/node.rb#8483 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -17296,7 +17284,7 @@ class Prism::GlobalVariableReadNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#8511 + # source://prism//lib/prism/node.rb#8519 sig { override.returns(String) } def inspect; end @@ -17306,20 +17294,20 @@ class Prism::GlobalVariableReadNode < ::Prism::Node # # $_Test # name `:$_Test` # - # source://prism//lib/prism/node.rb#8508 + # source://prism//lib/prism/node.rb#8516 sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#8516 + # source://prism//lib/prism/node.rb#8524 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#8521 + # source://prism//lib/prism/node.rb#8529 def type; end end end @@ -17329,49 +17317,49 @@ end # $foo, $bar = baz # ^^^^ ^^^^ # -# source://prism//lib/prism/node.rb#8537 +# source://prism//lib/prism/node.rb#8545 class Prism::GlobalVariableTargetNode < ::Prism::Node # Initialize a new GlobalVariableTargetNode node. # # @return [GlobalVariableTargetNode] a new instance of GlobalVariableTargetNode # - # source://prism//lib/prism/node.rb#8539 + # source://prism//lib/prism/node.rb#8547 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#8606 + # source://prism//lib/prism/node.rb#8614 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8548 + # source://prism//lib/prism/node.rb#8556 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#8553 + # source://prism//lib/prism/node.rb#8561 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8569 + # source://prism//lib/prism/node.rb#8577 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8564 + # source://prism//lib/prism/node.rb#8572 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> GlobalVariableTargetNode # - # source://prism//lib/prism/node.rb#8574 + # source://prism//lib/prism/node.rb#8582 sig do params( node_id: Integer, @@ -17385,19 +17373,19 @@ class Prism::GlobalVariableTargetNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#8579 + # source://prism//lib/prism/node.rb#8587 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#8582 + # source://prism//lib/prism/node.rb#8590 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#8558 + # source://prism//lib/prism/node.rb#8566 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -17405,26 +17393,26 @@ class Prism::GlobalVariableTargetNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#8590 + # source://prism//lib/prism/node.rb#8598 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#8587 + # source://prism//lib/prism/node.rb#8595 sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#8595 + # source://prism//lib/prism/node.rb#8603 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#8600 + # source://prism//lib/prism/node.rb#8608 def type; end end end @@ -17434,13 +17422,13 @@ end # $foo = 1 # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#8616 +# source://prism//lib/prism/node.rb#8624 class Prism::GlobalVariableWriteNode < ::Prism::Node # Initialize a new GlobalVariableWriteNode node. # # @return [GlobalVariableWriteNode] a new instance of GlobalVariableWriteNode # - # source://prism//lib/prism/node.rb#8618 + # source://prism//lib/prism/node.rb#8626 sig do params( source: Prism::Source, @@ -17458,36 +17446,36 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#8739 + # source://prism//lib/prism/node.rb#8747 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8630 + # source://prism//lib/prism/node.rb#8638 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#8635 + # source://prism//lib/prism/node.rb#8643 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8652 + # source://prism//lib/prism/node.rb#8660 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8647 + # source://prism//lib/prism/node.rb#8655 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location) -> GlobalVariableWriteNode # - # source://prism//lib/prism/node.rb#8657 + # source://prism//lib/prism/node.rb#8665 sig do params( node_id: Integer, @@ -17504,13 +17492,13 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#8662 + # source://prism//lib/prism/node.rb#8670 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#8665 + # source://prism//lib/prism/node.rb#8673 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -17518,7 +17506,7 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # # @yield [value] # - # source://prism//lib/prism/node.rb#8640 + # source://prism//lib/prism/node.rb#8648 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -17526,7 +17514,7 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#8723 + # source://prism//lib/prism/node.rb#8731 sig { override.returns(String) } def inspect; end @@ -17536,7 +17524,7 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # # $_Test = 123 # name `:$_Test` # - # source://prism//lib/prism/node.rb#8674 + # source://prism//lib/prism/node.rb#8682 sig { returns(Symbol) } def name; end @@ -17545,13 +17533,13 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # $foo = :bar # ^^^^ # - # source://prism//lib/prism/node.rb#8680 + # source://prism//lib/prism/node.rb#8688 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#8718 + # source://prism//lib/prism/node.rb#8726 sig { returns(String) } def operator; end @@ -17560,25 +17548,25 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # $foo = :bar # ^ # - # source://prism//lib/prism/node.rb#8705 + # source://prism//lib/prism/node.rb#8713 sig { returns(Prism::Location) } def operator_loc; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#8688 + # source://prism//lib/prism/node.rb#8696 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#8713 + # source://prism//lib/prism/node.rb#8721 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#8728 + # source://prism//lib/prism/node.rb#8736 sig { override.returns(Symbol) } def type; end @@ -17590,14 +17578,14 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # $-xyz = 123 # ^^^ # - # source://prism//lib/prism/node.rb#8699 + # source://prism//lib/prism/node.rb#8707 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#8733 + # source://prism//lib/prism/node.rb#8741 def type; end end end @@ -17607,13 +17595,13 @@ end # { a => b } # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#8752 +# source://prism//lib/prism/node.rb#8760 class Prism::HashNode < ::Prism::Node # Initialize a new HashNode node. # # @return [HashNode] a new instance of HashNode # - # source://prism//lib/prism/node.rb#8754 + # source://prism//lib/prism/node.rb#8762 sig do params( source: Prism::Source, @@ -17630,24 +17618,24 @@ class Prism::HashNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#8872 + # source://prism//lib/prism/node.rb#8880 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8765 + # source://prism//lib/prism/node.rb#8773 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#8770 + # source://prism//lib/prism/node.rb#8778 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#8851 + # source://prism//lib/prism/node.rb#8859 sig { returns(String) } def closing; end @@ -17656,25 +17644,25 @@ class Prism::HashNode < ::Prism::Node # { a => b } # ^ # - # source://prism//lib/prism/node.rb#8833 + # source://prism//lib/prism/node.rb#8841 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8787 + # source://prism//lib/prism/node.rb#8795 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8782 + # source://prism//lib/prism/node.rb#8790 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?elements: Array[AssocNode | AssocSplatNode], ?closing_loc: Location) -> HashNode # - # source://prism//lib/prism/node.rb#8792 + # source://prism//lib/prism/node.rb#8800 sig do params( node_id: Integer, @@ -17690,19 +17678,19 @@ class Prism::HashNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#8797 + # source://prism//lib/prism/node.rb#8805 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, elements: Array[AssocNode | AssocSplatNode], closing_loc: Location } # - # source://prism//lib/prism/node.rb#8800 + # source://prism//lib/prism/node.rb#8808 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#8775 + # source://prism//lib/prism/node.rb#8783 def each_child_node; end # The elements of the hash. These can be either `AssocNode`s or `AssocSplatNode`s. @@ -17713,7 +17701,7 @@ class Prism::HashNode < ::Prism::Node # { **foo } # ^^^^^ # - # source://prism//lib/prism/node.rb#8827 + # source://prism//lib/prism/node.rb#8835 sig { returns(T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)]) } def elements; end @@ -17722,13 +17710,13 @@ class Prism::HashNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#8856 + # source://prism//lib/prism/node.rb#8864 sig { override.returns(String) } def inspect; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#8846 + # source://prism//lib/prism/node.rb#8854 sig { returns(String) } def opening; end @@ -17737,32 +17725,32 @@ class Prism::HashNode < ::Prism::Node # { a => b } # ^ # - # source://prism//lib/prism/node.rb#8808 + # source://prism//lib/prism/node.rb#8816 sig { returns(Prism::Location) } def opening_loc; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#8841 + # source://prism//lib/prism/node.rb#8849 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#8816 + # source://prism//lib/prism/node.rb#8824 def save_opening_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#8861 + # source://prism//lib/prism/node.rb#8869 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#8866 + # source://prism//lib/prism/node.rb#8874 def type; end end end @@ -17781,13 +17769,13 @@ end # foo in { a: 1, b: 2 } # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#8894 +# source://prism//lib/prism/node.rb#8902 class Prism::HashPatternNode < ::Prism::Node # Initialize a new HashPatternNode node. # # @return [HashPatternNode] a new instance of HashPatternNode # - # source://prism//lib/prism/node.rb#8896 + # source://prism//lib/prism/node.rb#8904 sig do params( source: Prism::Source, @@ -17806,24 +17794,24 @@ class Prism::HashPatternNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#9058 + # source://prism//lib/prism/node.rb#9066 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8909 + # source://prism//lib/prism/node.rb#8917 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#8914 + # source://prism//lib/prism/node.rb#8922 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#9037 + # source://prism//lib/prism/node.rb#9045 sig { returns(T.nilable(String)) } def closing; end @@ -17835,19 +17823,19 @@ class Prism::HashPatternNode < ::Prism::Node # foo => Bar[a: 1] # ^ # - # source://prism//lib/prism/node.rb#9013 + # source://prism//lib/prism/node.rb#9021 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8937 + # source://prism//lib/prism/node.rb#8945 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8928 + # source://prism//lib/prism/node.rb#8936 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end @@ -17859,13 +17847,13 @@ class Prism::HashPatternNode < ::Prism::Node # foo => Bar::Baz[a: 1, b: 2] # ^^^^^^^^ # - # source://prism//lib/prism/node.rb#8961 + # source://prism//lib/prism/node.rb#8969 sig { returns(T.nilable(T.any(Prism::ConstantPathNode, Prism::ConstantReadNode))) } def constant; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?constant: ConstantPathNode | ConstantReadNode | nil, ?elements: Array[AssocNode], ?rest: AssocSplatNode | NoKeywordsParameterNode | nil, ?opening_loc: Location?, ?closing_loc: Location?) -> HashPatternNode # - # source://prism//lib/prism/node.rb#8942 + # source://prism//lib/prism/node.rb#8950 sig do params( node_id: Integer, @@ -17883,13 +17871,13 @@ class Prism::HashPatternNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#8947 + # source://prism//lib/prism/node.rb#8955 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, constant: ConstantPathNode | ConstantReadNode | nil, elements: Array[AssocNode], rest: AssocSplatNode | NoKeywordsParameterNode | nil, opening_loc: Location?, closing_loc: Location? } # - # source://prism//lib/prism/node.rb#8950 + # source://prism//lib/prism/node.rb#8958 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -17897,7 +17885,7 @@ class Prism::HashPatternNode < ::Prism::Node # # @yield [constant] # - # source://prism//lib/prism/node.rb#8919 + # source://prism//lib/prism/node.rb#8927 def each_child_node; end # Represents the explicit named hash keys and values. @@ -17905,7 +17893,7 @@ class Prism::HashPatternNode < ::Prism::Node # foo => { a: 1, b:, ** } # ^^^^^^^^ # - # source://prism//lib/prism/node.rb#8967 + # source://prism//lib/prism/node.rb#8975 sig { returns(T::Array[Prism::AssocNode]) } def elements; end @@ -17914,13 +17902,13 @@ class Prism::HashPatternNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#9042 + # source://prism//lib/prism/node.rb#9050 sig { override.returns(String) } def inspect; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#9032 + # source://prism//lib/prism/node.rb#9040 sig { returns(T.nilable(String)) } def opening; end @@ -17932,7 +17920,7 @@ class Prism::HashPatternNode < ::Prism::Node # foo => Bar[a: 1] # ^ # - # source://prism//lib/prism/node.rb#8988 + # source://prism//lib/prism/node.rb#8996 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end @@ -17947,32 +17935,32 @@ class Prism::HashPatternNode < ::Prism::Node # foo => { a: 1, b:, **nil } # ^^^^^ # - # source://prism//lib/prism/node.rb#8979 + # source://prism//lib/prism/node.rb#8987 sig { returns(T.nilable(T.any(Prism::AssocSplatNode, Prism::NoKeywordsParameterNode))) } def rest; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#9027 + # source://prism//lib/prism/node.rb#9035 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#9002 + # source://prism//lib/prism/node.rb#9010 def save_opening_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#9047 + # source://prism//lib/prism/node.rb#9055 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#9052 + # source://prism//lib/prism/node.rb#9060 def type; end end end @@ -17998,13 +17986,13 @@ end # foo ? bar : baz # ^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#9079 +# source://prism//lib/prism/node.rb#9087 class Prism::IfNode < ::Prism::Node # Initialize a new IfNode node. # # @return [IfNode] a new instance of IfNode # - # source://prism//lib/prism/node.rb#9081 + # source://prism//lib/prism/node.rb#9089 sig do params( source: Prism::Source, @@ -18024,30 +18012,30 @@ class Prism::IfNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#9284 + # source://prism//lib/prism/node.rb#9292 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9095 + # source://prism//lib/prism/node.rb#9103 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#9100 + # source://prism//lib/prism/node.rb#9108 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9123 + # source://prism//lib/prism/node.rb#9131 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#9114 + # source://prism//lib/prism/node.rb#9122 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end @@ -18059,7 +18047,7 @@ class Prism::IfNode < ::Prism::Node # 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#9128 + # source://prism//lib/prism/node.rb#9136 sig do params( node_id: Integer, @@ -18078,13 +18066,13 @@ class Prism::IfNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#9133 + # source://prism//lib/prism/node.rb#9141 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, if_keyword_loc: Location?, predicate: Prism::node, then_keyword_loc: Location?, statements: StatementsNode?, subsequent: ElseNode | IfNode | nil, end_keyword_loc: Location? } # - # source://prism//lib/prism/node.rb#9136 + # source://prism//lib/prism/node.rb#9144 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -18092,12 +18080,12 @@ class Prism::IfNode < ::Prism::Node # # @yield [predicate] # - # source://prism//lib/prism/node.rb#9105 + # source://prism//lib/prism/node.rb#9113 def each_child_node; end # def end_keyword: () -> String? # - # source://prism//lib/prism/node.rb#9263 + # source://prism//lib/prism/node.rb#9271 sig { returns(T.nilable(String)) } def end_keyword; end @@ -18108,7 +18096,7 @@ class Prism::IfNode < ::Prism::Node # end # ^^^ # - # source://prism//lib/prism/node.rb#9234 + # source://prism//lib/prism/node.rb#9242 sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end @@ -18117,7 +18105,7 @@ class Prism::IfNode < ::Prism::Node # def if_keyword: () -> String? # - # source://prism//lib/prism/node.rb#9253 + # source://prism//lib/prism/node.rb#9261 sig { returns(T.nilable(String)) } def if_keyword; end @@ -18128,13 +18116,13 @@ 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#9146 + # source://prism//lib/prism/node.rb#9154 sig { returns(T.nilable(Prism::Location)) } def if_keyword_loc; end # def inspect -> String # - # source://prism//lib/prism/node.rb#9268 + # source://prism//lib/prism/node.rb#9276 sig { override.returns(String) } def inspect; end @@ -18154,26 +18142,26 @@ class Prism::IfNode < ::Prism::Node # foo ? bar : baz # ^^^ # - # source://prism//lib/prism/node.rb#9176 + # source://prism//lib/prism/node.rb#9184 sig { returns(Prism::Node) } def predicate; end # Save the end_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#9248 + # source://prism//lib/prism/node.rb#9256 def save_end_keyword_loc(repository); end # Save the if_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#9160 + # source://prism//lib/prism/node.rb#9168 def save_if_keyword_loc(repository); end # Save the then_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#9199 + # source://prism//lib/prism/node.rb#9207 def save_then_keyword_loc(repository); end # Represents the body of statements that will be executed when the predicate is evaluated as truthy. Will be `nil` when no body is provided. @@ -18185,7 +18173,7 @@ class Prism::IfNode < ::Prism::Node # ^^^ # end # - # source://prism//lib/prism/node.rb#9211 + # source://prism//lib/prism/node.rb#9219 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end @@ -18203,13 +18191,13 @@ class Prism::IfNode < ::Prism::Node # if foo then bar else baz end # ^^^^^^^^^^^^ # - # source://prism//lib/prism/node.rb#9226 + # source://prism//lib/prism/node.rb#9234 sig { returns(T.nilable(T.any(Prism::ElseNode, Prism::IfNode))) } def subsequent; end # def then_keyword: () -> String? # - # source://prism//lib/prism/node.rb#9258 + # source://prism//lib/prism/node.rb#9266 sig { returns(T.nilable(String)) } def then_keyword; end @@ -18221,20 +18209,20 @@ class Prism::IfNode < ::Prism::Node # a ? b : c # ^ # - # source://prism//lib/prism/node.rb#9185 + # source://prism//lib/prism/node.rb#9193 sig { returns(T.nilable(Prism::Location)) } def then_keyword_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#9273 + # source://prism//lib/prism/node.rb#9281 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#9278 + # source://prism//lib/prism/node.rb#9286 def type; end end end @@ -18244,13 +18232,13 @@ end # 1.0i # ^^^^ # -# source://prism//lib/prism/node.rb#9299 +# source://prism//lib/prism/node.rb#9307 class Prism::ImaginaryNode < ::Prism::Node # Initialize a new ImaginaryNode node. # # @return [ImaginaryNode] a new instance of ImaginaryNode # - # source://prism//lib/prism/node.rb#9301 + # source://prism//lib/prism/node.rb#9309 sig do params( source: Prism::Source, @@ -18265,36 +18253,36 @@ class Prism::ImaginaryNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#9369 + # source://prism//lib/prism/node.rb#9377 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9310 + # source://prism//lib/prism/node.rb#9318 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#9315 + # source://prism//lib/prism/node.rb#9323 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9332 + # source://prism//lib/prism/node.rb#9340 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#9327 + # source://prism//lib/prism/node.rb#9335 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?numeric: FloatNode | IntegerNode | RationalNode) -> ImaginaryNode # - # source://prism//lib/prism/node.rb#9337 + # source://prism//lib/prism/node.rb#9345 sig do params( node_id: Integer, @@ -18308,13 +18296,13 @@ class Prism::ImaginaryNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#9342 + # source://prism//lib/prism/node.rb#9350 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, numeric: FloatNode | IntegerNode | RationalNode } # - # source://prism//lib/prism/node.rb#9345 + # source://prism//lib/prism/node.rb#9353 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -18322,7 +18310,7 @@ class Prism::ImaginaryNode < ::Prism::Node # # @yield [numeric] # - # source://prism//lib/prism/node.rb#9320 + # source://prism//lib/prism/node.rb#9328 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -18330,19 +18318,19 @@ class Prism::ImaginaryNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#9353 + # source://prism//lib/prism/node.rb#9361 sig { override.returns(String) } def inspect; end # attr_reader numeric: FloatNode | IntegerNode | RationalNode # - # source://prism//lib/prism/node.rb#9350 + # source://prism//lib/prism/node.rb#9358 sig { returns(T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode)) } def numeric; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#9358 + # source://prism//lib/prism/node.rb#9366 sig { override.returns(Symbol) } def type; end @@ -18355,7 +18343,7 @@ class Prism::ImaginaryNode < ::Prism::Node class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#9363 + # source://prism//lib/prism/node.rb#9371 def type; end end end @@ -18371,13 +18359,13 @@ end # foo in { bar: } # ^^^^ # -# source://prism//lib/prism/node.rb#9385 +# source://prism//lib/prism/node.rb#9393 class Prism::ImplicitNode < ::Prism::Node # Initialize a new ImplicitNode node. # # @return [ImplicitNode] a new instance of ImplicitNode # - # source://prism//lib/prism/node.rb#9387 + # source://prism//lib/prism/node.rb#9395 sig do params( source: Prism::Source, @@ -18392,36 +18380,36 @@ class Prism::ImplicitNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#9455 + # source://prism//lib/prism/node.rb#9463 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9396 + # source://prism//lib/prism/node.rb#9404 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#9401 + # source://prism//lib/prism/node.rb#9409 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9418 + # source://prism//lib/prism/node.rb#9426 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#9413 + # source://prism//lib/prism/node.rb#9421 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: LocalVariableReadNode | CallNode | ConstantReadNode | LocalVariableTargetNode) -> ImplicitNode # - # source://prism//lib/prism/node.rb#9423 + # source://prism//lib/prism/node.rb#9431 sig do params( node_id: Integer, @@ -18435,13 +18423,13 @@ class Prism::ImplicitNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#9428 + # source://prism//lib/prism/node.rb#9436 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: LocalVariableReadNode | CallNode | ConstantReadNode | LocalVariableTargetNode } # - # source://prism//lib/prism/node.rb#9431 + # source://prism//lib/prism/node.rb#9439 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -18449,7 +18437,7 @@ class Prism::ImplicitNode < ::Prism::Node # # @yield [value] # - # source://prism//lib/prism/node.rb#9406 + # source://prism//lib/prism/node.rb#9414 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -18457,19 +18445,19 @@ class Prism::ImplicitNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#9439 + # source://prism//lib/prism/node.rb#9447 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#9444 + # source://prism//lib/prism/node.rb#9452 sig { override.returns(Symbol) } def type; end # attr_reader value: LocalVariableReadNode | CallNode | ConstantReadNode | LocalVariableTargetNode # - # source://prism//lib/prism/node.rb#9436 + # source://prism//lib/prism/node.rb#9444 sig do returns(T.any(Prism::LocalVariableReadNode, Prism::CallNode, Prism::ConstantReadNode, Prism::LocalVariableTargetNode)) end @@ -18478,7 +18466,7 @@ class Prism::ImplicitNode < ::Prism::Node class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#9449 + # source://prism//lib/prism/node.rb#9457 def type; end end end @@ -18497,68 +18485,68 @@ end # foo, = bar # ^ # -# source://prism//lib/prism/node.rb#9474 +# source://prism//lib/prism/node.rb#9482 class Prism::ImplicitRestNode < ::Prism::Node # Initialize a new ImplicitRestNode node. # # @return [ImplicitRestNode] a new instance of ImplicitRestNode # - # source://prism//lib/prism/node.rb#9476 + # source://prism//lib/prism/node.rb#9484 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#9539 + # source://prism//lib/prism/node.rb#9547 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9484 + # source://prism//lib/prism/node.rb#9492 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#9489 + # source://prism//lib/prism/node.rb#9497 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9505 + # source://prism//lib/prism/node.rb#9513 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#9500 + # source://prism//lib/prism/node.rb#9508 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ImplicitRestNode # - # source://prism//lib/prism/node.rb#9510 + # source://prism//lib/prism/node.rb#9518 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[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#9515 + # source://prism//lib/prism/node.rb#9523 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#9518 + # source://prism//lib/prism/node.rb#9526 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#9494 + # source://prism//lib/prism/node.rb#9502 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -18566,20 +18554,20 @@ class Prism::ImplicitRestNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#9523 + # source://prism//lib/prism/node.rb#9531 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#9528 + # source://prism//lib/prism/node.rb#9536 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#9533 + # source://prism//lib/prism/node.rb#9541 def type; end end end @@ -18589,13 +18577,13 @@ end # case a; in b then c end # ^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#9548 +# source://prism//lib/prism/node.rb#9556 class Prism::InNode < ::Prism::Node # Initialize a new InNode node. # # @return [InNode] a new instance of InNode # - # source://prism//lib/prism/node.rb#9550 + # source://prism//lib/prism/node.rb#9558 sig do params( source: Prism::Source, @@ -18613,36 +18601,36 @@ class Prism::InNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#9670 + # source://prism//lib/prism/node.rb#9678 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9562 + # source://prism//lib/prism/node.rb#9570 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#9567 + # source://prism//lib/prism/node.rb#9575 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9588 + # source://prism//lib/prism/node.rb#9596 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#9580 + # source://prism//lib/prism/node.rb#9588 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?pattern: Prism::node, ?statements: StatementsNode?, ?in_loc: Location, ?then_loc: Location?) -> InNode # - # source://prism//lib/prism/node.rb#9593 + # source://prism//lib/prism/node.rb#9601 sig do params( node_id: Integer, @@ -18659,13 +18647,13 @@ class Prism::InNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#9598 + # source://prism//lib/prism/node.rb#9606 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, pattern: Prism::node, statements: StatementsNode?, in_loc: Location, then_loc: Location? } # - # source://prism//lib/prism/node.rb#9601 + # source://prism//lib/prism/node.rb#9609 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -18673,7 +18661,7 @@ class Prism::InNode < ::Prism::Node # # @yield [pattern] # - # source://prism//lib/prism/node.rb#9572 + # source://prism//lib/prism/node.rb#9580 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -18681,68 +18669,68 @@ class Prism::InNode < ::Prism::Node # def in: () -> String # - # source://prism//lib/prism/node.rb#9644 + # source://prism//lib/prism/node.rb#9652 sig { returns(String) } def in; end # attr_reader in_loc: Location # - # source://prism//lib/prism/node.rb#9612 + # source://prism//lib/prism/node.rb#9620 sig { returns(Prism::Location) } def in_loc; end # def inspect -> String # - # source://prism//lib/prism/node.rb#9654 + # source://prism//lib/prism/node.rb#9662 sig { override.returns(String) } def inspect; end # attr_reader pattern: Prism::node # - # source://prism//lib/prism/node.rb#9606 + # source://prism//lib/prism/node.rb#9614 sig { returns(Prism::Node) } def pattern; end # Save the in_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#9620 + # source://prism//lib/prism/node.rb#9628 def save_in_loc(repository); end # Save the then_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#9639 + # source://prism//lib/prism/node.rb#9647 def save_then_loc(repository); end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#9609 + # source://prism//lib/prism/node.rb#9617 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # def then: () -> String? # - # source://prism//lib/prism/node.rb#9649 + # source://prism//lib/prism/node.rb#9657 sig { returns(T.nilable(String)) } def then; end # attr_reader then_loc: Location? # - # source://prism//lib/prism/node.rb#9625 + # source://prism//lib/prism/node.rb#9633 sig { returns(T.nilable(Prism::Location)) } def then_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#9659 + # source://prism//lib/prism/node.rb#9667 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#9664 + # source://prism//lib/prism/node.rb#9672 def type; end end end @@ -18752,13 +18740,13 @@ end # foo.bar[baz] &&= value # ^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#9683 +# source://prism//lib/prism/node.rb#9691 class Prism::IndexAndWriteNode < ::Prism::Node # Initialize a new IndexAndWriteNode node. # # @return [IndexAndWriteNode] a new instance of IndexAndWriteNode # - # source://prism//lib/prism/node.rb#9685 + # source://prism//lib/prism/node.rb#9693 sig do params( source: Prism::Source, @@ -18780,18 +18768,18 @@ class Prism::IndexAndWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#9875 + # source://prism//lib/prism/node.rb#9883 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9701 + # source://prism//lib/prism/node.rb#9709 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#9804 + # source://prism//lib/prism/node.rb#9812 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end @@ -18799,61 +18787,61 @@ class Prism::IndexAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9759 + # source://prism//lib/prism/node.rb#9767 sig { returns(T::Boolean) } def attribute_write?; end # attr_reader block: BlockArgumentNode? # - # source://prism//lib/prism/node.rb#9820 + # source://prism//lib/prism/node.rb#9828 sig { returns(T.nilable(Prism::BlockArgumentNode)) } def block; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#9839 + # source://prism//lib/prism/node.rb#9847 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism//lib/prism/node.rb#9772 + # source://prism//lib/prism/node.rb#9780 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#9706 + # source://prism//lib/prism/node.rb#9714 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#9849 + # source://prism//lib/prism/node.rb#9857 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#9807 + # source://prism//lib/prism/node.rb#9815 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9731 + # source://prism//lib/prism/node.rb#9739 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#9721 + # source://prism//lib/prism/node.rb#9729 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: BlockArgumentNode?, ?operator_loc: Location, ?value: Prism::node) -> IndexAndWriteNode # - # source://prism//lib/prism/node.rb#9736 + # source://prism//lib/prism/node.rb#9744 sig do params( node_id: Integer, @@ -18874,13 +18862,13 @@ class Prism::IndexAndWriteNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#9741 + # source://prism//lib/prism/node.rb#9749 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: BlockArgumentNode?, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#9744 + # source://prism//lib/prism/node.rb#9752 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -18888,7 +18876,7 @@ class Prism::IndexAndWriteNode < ::Prism::Node # # @yield [receiver] # - # source://prism//lib/prism/node.rb#9711 + # source://prism//lib/prism/node.rb#9719 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -18898,43 +18886,43 @@ class Prism::IndexAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9764 + # source://prism//lib/prism/node.rb#9772 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#9859 + # source://prism//lib/prism/node.rb#9867 sig { override.returns(String) } def inspect; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#9844 + # source://prism//lib/prism/node.rb#9852 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#9791 + # source://prism//lib/prism/node.rb#9799 sig { returns(Prism::Location) } def opening_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#9854 + # source://prism//lib/prism/node.rb#9862 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#9823 + # source://prism//lib/prism/node.rb#9831 sig { returns(Prism::Location) } def operator_loc; end # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#9769 + # source://prism//lib/prism/node.rb#9777 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -18942,43 +18930,43 @@ class Prism::IndexAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9749 + # source://prism//lib/prism/node.rb#9757 sig { returns(T::Boolean) } def safe_navigation?; end # Save the call_operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#9786 + # source://prism//lib/prism/node.rb#9794 def save_call_operator_loc(repository); end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#9815 + # source://prism//lib/prism/node.rb#9823 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#9799 + # source://prism//lib/prism/node.rb#9807 def save_opening_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#9831 + # source://prism//lib/prism/node.rb#9839 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#9864 + # source://prism//lib/prism/node.rb#9872 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#9836 + # source://prism//lib/prism/node.rb#9844 sig { returns(Prism::Node) } def value; end @@ -18986,14 +18974,14 @@ class Prism::IndexAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9754 + # source://prism//lib/prism/node.rb#9762 sig { returns(T::Boolean) } def variable_call?; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#9869 + # source://prism//lib/prism/node.rb#9877 def type; end end end @@ -19003,13 +18991,13 @@ end # foo.bar[baz] += value # ^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#9893 +# source://prism//lib/prism/node.rb#9901 class Prism::IndexOperatorWriteNode < ::Prism::Node # Initialize a new IndexOperatorWriteNode node. # # @return [IndexOperatorWriteNode] a new instance of IndexOperatorWriteNode # - # source://prism//lib/prism/node.rb#9895 + # source://prism//lib/prism/node.rb#9903 sig do params( source: Prism::Source, @@ -19032,18 +19020,18 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#10084 + # source://prism//lib/prism/node.rb#10092 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9912 + # source://prism//lib/prism/node.rb#9920 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#10015 + # source://prism//lib/prism/node.rb#10023 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end @@ -19051,73 +19039,73 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9970 + # source://prism//lib/prism/node.rb#9978 sig { returns(T::Boolean) } def attribute_write?; end # attr_reader binary_operator: Symbol # - # source://prism//lib/prism/node.rb#10034 + # source://prism//lib/prism/node.rb#10042 sig { returns(Symbol) } def binary_operator; end # attr_reader binary_operator_loc: Location # - # source://prism//lib/prism/node.rb#10037 + # source://prism//lib/prism/node.rb#10045 sig { returns(Prism::Location) } def binary_operator_loc; end # attr_reader block: BlockArgumentNode? # - # source://prism//lib/prism/node.rb#10031 + # source://prism//lib/prism/node.rb#10039 sig { returns(T.nilable(Prism::BlockArgumentNode)) } def block; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#10053 + # source://prism//lib/prism/node.rb#10061 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism//lib/prism/node.rb#9983 + # source://prism//lib/prism/node.rb#9991 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#9917 + # source://prism//lib/prism/node.rb#9925 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#10063 + # source://prism//lib/prism/node.rb#10071 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#10018 + # source://prism//lib/prism/node.rb#10026 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9942 + # source://prism//lib/prism/node.rb#9950 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#9932 + # source://prism//lib/prism/node.rb#9940 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: BlockArgumentNode?, ?binary_operator: Symbol, ?binary_operator_loc: Location, ?value: Prism::node) -> IndexOperatorWriteNode # - # source://prism//lib/prism/node.rb#9947 + # source://prism//lib/prism/node.rb#9955 sig do params( node_id: Integer, @@ -19139,13 +19127,13 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#9952 + # source://prism//lib/prism/node.rb#9960 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: BlockArgumentNode?, binary_operator: Symbol, binary_operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#9955 + # source://prism//lib/prism/node.rb#9963 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -19153,7 +19141,7 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node # # @yield [receiver] # - # source://prism//lib/prism/node.rb#9922 + # source://prism//lib/prism/node.rb#9930 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -19163,25 +19151,25 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9975 + # source://prism//lib/prism/node.rb#9983 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#10068 + # source://prism//lib/prism/node.rb#10076 sig { override.returns(String) } def inspect; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#10058 + # source://prism//lib/prism/node.rb#10066 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#10002 + # source://prism//lib/prism/node.rb#10010 sig { returns(Prism::Location) } def opening_loc; end @@ -19199,7 +19187,7 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#9980 + # source://prism//lib/prism/node.rb#9988 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -19207,43 +19195,43 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9960 + # source://prism//lib/prism/node.rb#9968 sig { returns(T::Boolean) } def safe_navigation?; end # Save the binary_operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#10045 + # source://prism//lib/prism/node.rb#10053 def save_binary_operator_loc(repository); end # Save the call_operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#9997 + # source://prism//lib/prism/node.rb#10005 def save_call_operator_loc(repository); end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#10026 + # source://prism//lib/prism/node.rb#10034 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#10010 + # source://prism//lib/prism/node.rb#10018 def save_opening_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#10073 + # source://prism//lib/prism/node.rb#10081 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#10050 + # source://prism//lib/prism/node.rb#10058 sig { returns(Prism::Node) } def value; end @@ -19251,14 +19239,14 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9965 + # source://prism//lib/prism/node.rb#9973 sig { returns(T::Boolean) } def variable_call?; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#10078 + # source://prism//lib/prism/node.rb#10086 def type; end end end @@ -19268,13 +19256,13 @@ end # foo.bar[baz] ||= value # ^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#10103 +# source://prism//lib/prism/node.rb#10111 class Prism::IndexOrWriteNode < ::Prism::Node # Initialize a new IndexOrWriteNode node. # # @return [IndexOrWriteNode] a new instance of IndexOrWriteNode # - # source://prism//lib/prism/node.rb#10105 + # source://prism//lib/prism/node.rb#10113 sig do params( source: Prism::Source, @@ -19296,18 +19284,18 @@ class Prism::IndexOrWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#10295 + # source://prism//lib/prism/node.rb#10303 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10121 + # source://prism//lib/prism/node.rb#10129 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#10224 + # source://prism//lib/prism/node.rb#10232 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end @@ -19315,61 +19303,61 @@ class Prism::IndexOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10179 + # source://prism//lib/prism/node.rb#10187 sig { returns(T::Boolean) } def attribute_write?; end # attr_reader block: BlockArgumentNode? # - # source://prism//lib/prism/node.rb#10240 + # source://prism//lib/prism/node.rb#10248 sig { returns(T.nilable(Prism::BlockArgumentNode)) } def block; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#10259 + # source://prism//lib/prism/node.rb#10267 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism//lib/prism/node.rb#10192 + # source://prism//lib/prism/node.rb#10200 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#10126 + # source://prism//lib/prism/node.rb#10134 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#10269 + # source://prism//lib/prism/node.rb#10277 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#10227 + # source://prism//lib/prism/node.rb#10235 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10151 + # source://prism//lib/prism/node.rb#10159 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#10141 + # source://prism//lib/prism/node.rb#10149 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: BlockArgumentNode?, ?operator_loc: Location, ?value: Prism::node) -> IndexOrWriteNode # - # source://prism//lib/prism/node.rb#10156 + # source://prism//lib/prism/node.rb#10164 sig do params( node_id: Integer, @@ -19390,13 +19378,13 @@ class Prism::IndexOrWriteNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#10161 + # source://prism//lib/prism/node.rb#10169 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: BlockArgumentNode?, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#10164 + # source://prism//lib/prism/node.rb#10172 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -19404,7 +19392,7 @@ class Prism::IndexOrWriteNode < ::Prism::Node # # @yield [receiver] # - # source://prism//lib/prism/node.rb#10131 + # source://prism//lib/prism/node.rb#10139 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -19414,43 +19402,43 @@ class Prism::IndexOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10184 + # source://prism//lib/prism/node.rb#10192 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#10279 + # source://prism//lib/prism/node.rb#10287 sig { override.returns(String) } def inspect; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#10264 + # source://prism//lib/prism/node.rb#10272 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#10211 + # source://prism//lib/prism/node.rb#10219 sig { returns(Prism::Location) } def opening_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#10274 + # source://prism//lib/prism/node.rb#10282 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#10243 + # source://prism//lib/prism/node.rb#10251 sig { returns(Prism::Location) } def operator_loc; end # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#10189 + # source://prism//lib/prism/node.rb#10197 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -19458,43 +19446,43 @@ class Prism::IndexOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10169 + # source://prism//lib/prism/node.rb#10177 sig { returns(T::Boolean) } def safe_navigation?; end # Save the call_operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#10206 + # source://prism//lib/prism/node.rb#10214 def save_call_operator_loc(repository); end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#10235 + # source://prism//lib/prism/node.rb#10243 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#10219 + # source://prism//lib/prism/node.rb#10227 def save_opening_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#10251 + # source://prism//lib/prism/node.rb#10259 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#10284 + # source://prism//lib/prism/node.rb#10292 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#10256 + # source://prism//lib/prism/node.rb#10264 sig { returns(Prism::Node) } def value; end @@ -19502,14 +19490,14 @@ class Prism::IndexOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10174 + # source://prism//lib/prism/node.rb#10182 sig { returns(T::Boolean) } def variable_call?; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#10289 + # source://prism//lib/prism/node.rb#10297 def type; end end end @@ -19527,13 +19515,13 @@ end # for foo[bar] in baz do end # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#10321 +# source://prism//lib/prism/node.rb#10329 class Prism::IndexTargetNode < ::Prism::Node # Initialize a new IndexTargetNode node. # # @return [IndexTargetNode] a new instance of IndexTargetNode # - # source://prism//lib/prism/node.rb#10323 + # source://prism//lib/prism/node.rb#10331 sig do params( source: Prism::Source, @@ -19552,18 +19540,18 @@ class Prism::IndexTargetNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#10463 + # source://prism//lib/prism/node.rb#10471 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10336 + # source://prism//lib/prism/node.rb#10344 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#10418 + # source://prism//lib/prism/node.rb#10426 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end @@ -19571,49 +19559,49 @@ class Prism::IndexTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10392 + # source://prism//lib/prism/node.rb#10400 sig { returns(T::Boolean) } def attribute_write?; end # attr_reader block: BlockArgumentNode? # - # source://prism//lib/prism/node.rb#10434 + # source://prism//lib/prism/node.rb#10442 sig { returns(T.nilable(Prism::BlockArgumentNode)) } def block; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#10341 + # source://prism//lib/prism/node.rb#10349 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#10442 + # source://prism//lib/prism/node.rb#10450 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#10421 + # source://prism//lib/prism/node.rb#10429 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10364 + # source://prism//lib/prism/node.rb#10372 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#10355 + # source://prism//lib/prism/node.rb#10363 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: BlockArgumentNode?) -> IndexTargetNode # - # source://prism//lib/prism/node.rb#10369 + # source://prism//lib/prism/node.rb#10377 sig do params( node_id: Integer, @@ -19631,13 +19619,13 @@ class Prism::IndexTargetNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#10374 + # source://prism//lib/prism/node.rb#10382 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: BlockArgumentNode? } # - # source://prism//lib/prism/node.rb#10377 + # source://prism//lib/prism/node.rb#10385 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -19645,7 +19633,7 @@ class Prism::IndexTargetNode < ::Prism::Node # # @yield [receiver] # - # source://prism//lib/prism/node.rb#10346 + # source://prism//lib/prism/node.rb#10354 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -19655,31 +19643,31 @@ class Prism::IndexTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10397 + # source://prism//lib/prism/node.rb#10405 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#10447 + # source://prism//lib/prism/node.rb#10455 sig { override.returns(String) } def inspect; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#10437 + # source://prism//lib/prism/node.rb#10445 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#10405 + # source://prism//lib/prism/node.rb#10413 sig { returns(Prism::Location) } def opening_loc; end # attr_reader receiver: Prism::node # - # source://prism//lib/prism/node.rb#10402 + # source://prism//lib/prism/node.rb#10410 sig { returns(Prism::Node) } def receiver; end @@ -19687,25 +19675,25 @@ class Prism::IndexTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10382 + # source://prism//lib/prism/node.rb#10390 sig { returns(T::Boolean) } def safe_navigation?; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#10429 + # source://prism//lib/prism/node.rb#10437 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#10413 + # source://prism//lib/prism/node.rb#10421 def save_opening_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#10452 + # source://prism//lib/prism/node.rb#10460 sig { override.returns(Symbol) } def type; end @@ -19713,14 +19701,14 @@ class Prism::IndexTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10387 + # source://prism//lib/prism/node.rb#10395 sig { returns(T::Boolean) } def variable_call?; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#10457 + # source://prism//lib/prism/node.rb#10465 def type; end end end @@ -19728,11 +19716,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#534 +# source://prism//lib/prism/parse_result.rb#543 class Prism::InlineComment < ::Prism::Comment # Returns a string representation of this comment. # - # source://prism//lib/prism/parse_result.rb#542 + # source://prism//lib/prism/parse_result.rb#551 sig { returns(String) } def inspect; end @@ -19741,7 +19729,7 @@ class Prism::InlineComment < ::Prism::Comment # # @return [Boolean] # - # source://prism//lib/prism/parse_result.rb#537 + # source://prism//lib/prism/parse_result.rb#546 sig { override.returns(T::Boolean) } def trailing?; end end @@ -20573,13 +20561,13 @@ end # @target &&= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#10478 +# source://prism//lib/prism/node.rb#10486 class Prism::InstanceVariableAndWriteNode < ::Prism::Node # Initialize a new InstanceVariableAndWriteNode node. # # @return [InstanceVariableAndWriteNode] a new instance of InstanceVariableAndWriteNode # - # source://prism//lib/prism/node.rb#10480 + # source://prism//lib/prism/node.rb#10488 sig do params( source: Prism::Source, @@ -20597,36 +20585,36 @@ class Prism::InstanceVariableAndWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#10585 + # source://prism//lib/prism/node.rb#10593 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10492 + # source://prism//lib/prism/node.rb#10500 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#10497 + # source://prism//lib/prism/node.rb#10505 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10514 + # source://prism//lib/prism/node.rb#10522 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#10509 + # source://prism//lib/prism/node.rb#10517 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> InstanceVariableAndWriteNode # - # source://prism//lib/prism/node.rb#10519 + # source://prism//lib/prism/node.rb#10527 sig do params( node_id: Integer, @@ -20643,13 +20631,13 @@ class Prism::InstanceVariableAndWriteNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#10524 + # source://prism//lib/prism/node.rb#10532 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#10527 + # source://prism//lib/prism/node.rb#10535 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -20660,7 +20648,7 @@ class Prism::InstanceVariableAndWriteNode < ::Prism::Node # # @yield [value] # - # source://prism//lib/prism/node.rb#10502 + # source://prism//lib/prism/node.rb#10510 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -20668,62 +20656,62 @@ class Prism::InstanceVariableAndWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#10569 + # source://prism//lib/prism/node.rb#10577 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#10532 + # source://prism//lib/prism/node.rb#10540 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#10535 + # source://prism//lib/prism/node.rb#10543 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#10564 + # source://prism//lib/prism/node.rb#10572 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#10548 + # source://prism//lib/prism/node.rb#10556 sig { returns(Prism::Location) } def operator_loc; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#10543 + # source://prism//lib/prism/node.rb#10551 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#10556 + # source://prism//lib/prism/node.rb#10564 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#10574 + # source://prism//lib/prism/node.rb#10582 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#10561 + # source://prism//lib/prism/node.rb#10569 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#10579 + # source://prism//lib/prism/node.rb#10587 def type; end end end @@ -20733,13 +20721,13 @@ end # @target += value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#10598 +# source://prism//lib/prism/node.rb#10606 class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node # Initialize a new InstanceVariableOperatorWriteNode node. # # @return [InstanceVariableOperatorWriteNode] a new instance of InstanceVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#10600 + # source://prism//lib/prism/node.rb#10608 sig do params( source: Prism::Source, @@ -20758,48 +20746,48 @@ class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#10704 + # source://prism//lib/prism/node.rb#10712 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10613 + # source://prism//lib/prism/node.rb#10621 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader binary_operator: Symbol # - # source://prism//lib/prism/node.rb#10685 + # source://prism//lib/prism/node.rb#10693 sig { returns(Symbol) } def binary_operator; end # attr_reader binary_operator_loc: Location # - # source://prism//lib/prism/node.rb#10669 + # source://prism//lib/prism/node.rb#10677 sig { returns(Prism::Location) } def binary_operator_loc; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#10618 + # source://prism//lib/prism/node.rb#10626 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10635 + # source://prism//lib/prism/node.rb#10643 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#10630 + # source://prism//lib/prism/node.rb#10638 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol) -> InstanceVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#10640 + # source://prism//lib/prism/node.rb#10648 sig do params( node_id: Integer, @@ -20817,13 +20805,13 @@ class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#10645 + # source://prism//lib/prism/node.rb#10653 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol } # - # source://prism//lib/prism/node.rb#10648 + # source://prism//lib/prism/node.rb#10656 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -20834,7 +20822,7 @@ class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node # # @yield [value] # - # source://prism//lib/prism/node.rb#10623 + # source://prism//lib/prism/node.rb#10631 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -20842,19 +20830,19 @@ class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#10688 + # source://prism//lib/prism/node.rb#10696 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#10653 + # source://prism//lib/prism/node.rb#10661 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#10656 + # source://prism//lib/prism/node.rb#10664 sig { returns(Prism::Location) } def name_loc; end @@ -20873,31 +20861,31 @@ class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node # Save the binary_operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#10677 + # source://prism//lib/prism/node.rb#10685 def save_binary_operator_loc(repository); end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#10664 + # source://prism//lib/prism/node.rb#10672 def save_name_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#10693 + # source://prism//lib/prism/node.rb#10701 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#10682 + # source://prism//lib/prism/node.rb#10690 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#10698 + # source://prism//lib/prism/node.rb#10706 def type; end end end @@ -20907,13 +20895,13 @@ end # @target ||= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#10718 +# source://prism//lib/prism/node.rb#10726 class Prism::InstanceVariableOrWriteNode < ::Prism::Node # Initialize a new InstanceVariableOrWriteNode node. # # @return [InstanceVariableOrWriteNode] a new instance of InstanceVariableOrWriteNode # - # source://prism//lib/prism/node.rb#10720 + # source://prism//lib/prism/node.rb#10728 sig do params( source: Prism::Source, @@ -20931,36 +20919,36 @@ class Prism::InstanceVariableOrWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#10825 + # source://prism//lib/prism/node.rb#10833 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10732 + # source://prism//lib/prism/node.rb#10740 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#10737 + # source://prism//lib/prism/node.rb#10745 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10754 + # source://prism//lib/prism/node.rb#10762 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#10749 + # source://prism//lib/prism/node.rb#10757 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> InstanceVariableOrWriteNode # - # source://prism//lib/prism/node.rb#10759 + # source://prism//lib/prism/node.rb#10767 sig do params( node_id: Integer, @@ -20977,13 +20965,13 @@ class Prism::InstanceVariableOrWriteNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#10764 + # source://prism//lib/prism/node.rb#10772 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#10767 + # source://prism//lib/prism/node.rb#10775 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -20994,7 +20982,7 @@ class Prism::InstanceVariableOrWriteNode < ::Prism::Node # # @yield [value] # - # source://prism//lib/prism/node.rb#10742 + # source://prism//lib/prism/node.rb#10750 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -21002,62 +20990,62 @@ class Prism::InstanceVariableOrWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#10809 + # source://prism//lib/prism/node.rb#10817 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#10772 + # source://prism//lib/prism/node.rb#10780 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#10775 + # source://prism//lib/prism/node.rb#10783 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#10804 + # source://prism//lib/prism/node.rb#10812 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#10788 + # source://prism//lib/prism/node.rb#10796 sig { returns(Prism::Location) } def operator_loc; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#10783 + # source://prism//lib/prism/node.rb#10791 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#10796 + # source://prism//lib/prism/node.rb#10804 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#10814 + # source://prism//lib/prism/node.rb#10822 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#10801 + # source://prism//lib/prism/node.rb#10809 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#10819 + # source://prism//lib/prism/node.rb#10827 def type; end end end @@ -21067,49 +21055,49 @@ end # @foo # ^^^^ # -# source://prism//lib/prism/node.rb#10838 +# source://prism//lib/prism/node.rb#10846 class Prism::InstanceVariableReadNode < ::Prism::Node # Initialize a new InstanceVariableReadNode node. # # @return [InstanceVariableReadNode] a new instance of InstanceVariableReadNode # - # source://prism//lib/prism/node.rb#10840 + # source://prism//lib/prism/node.rb#10848 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#10911 + # source://prism//lib/prism/node.rb#10919 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10849 + # source://prism//lib/prism/node.rb#10857 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#10854 + # source://prism//lib/prism/node.rb#10862 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10870 + # source://prism//lib/prism/node.rb#10878 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#10865 + # source://prism//lib/prism/node.rb#10873 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> InstanceVariableReadNode # - # source://prism//lib/prism/node.rb#10875 + # source://prism//lib/prism/node.rb#10883 sig do params( node_id: Integer, @@ -21123,19 +21111,19 @@ class Prism::InstanceVariableReadNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#10880 + # source://prism//lib/prism/node.rb#10888 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#10883 + # source://prism//lib/prism/node.rb#10891 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#10859 + # source://prism//lib/prism/node.rb#10867 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -21143,7 +21131,7 @@ class Prism::InstanceVariableReadNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#10895 + # source://prism//lib/prism/node.rb#10903 sig { override.returns(String) } def inspect; end @@ -21153,20 +21141,20 @@ class Prism::InstanceVariableReadNode < ::Prism::Node # # @_test # name `:@_test` # - # source://prism//lib/prism/node.rb#10892 + # source://prism//lib/prism/node.rb#10900 sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#10900 + # source://prism//lib/prism/node.rb#10908 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#10905 + # source://prism//lib/prism/node.rb#10913 def type; end end end @@ -21176,49 +21164,49 @@ end # @foo, @bar = baz # ^^^^ ^^^^ # -# source://prism//lib/prism/node.rb#10921 +# source://prism//lib/prism/node.rb#10929 class Prism::InstanceVariableTargetNode < ::Prism::Node # Initialize a new InstanceVariableTargetNode node. # # @return [InstanceVariableTargetNode] a new instance of InstanceVariableTargetNode # - # source://prism//lib/prism/node.rb#10923 + # source://prism//lib/prism/node.rb#10931 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#10990 + # source://prism//lib/prism/node.rb#10998 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10932 + # source://prism//lib/prism/node.rb#10940 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#10937 + # source://prism//lib/prism/node.rb#10945 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10953 + # source://prism//lib/prism/node.rb#10961 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#10948 + # source://prism//lib/prism/node.rb#10956 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> InstanceVariableTargetNode # - # source://prism//lib/prism/node.rb#10958 + # source://prism//lib/prism/node.rb#10966 sig do params( node_id: Integer, @@ -21232,19 +21220,19 @@ class Prism::InstanceVariableTargetNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#10963 + # source://prism//lib/prism/node.rb#10971 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#10966 + # source://prism//lib/prism/node.rb#10974 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#10942 + # source://prism//lib/prism/node.rb#10950 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -21252,26 +21240,26 @@ class Prism::InstanceVariableTargetNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#10974 + # source://prism//lib/prism/node.rb#10982 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#10971 + # source://prism//lib/prism/node.rb#10979 sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#10979 + # source://prism//lib/prism/node.rb#10987 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#10984 + # source://prism//lib/prism/node.rb#10992 def type; end end end @@ -21281,13 +21269,13 @@ end # @foo = 1 # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#11000 +# source://prism//lib/prism/node.rb#11008 class Prism::InstanceVariableWriteNode < ::Prism::Node # Initialize a new InstanceVariableWriteNode node. # # @return [InstanceVariableWriteNode] a new instance of InstanceVariableWriteNode # - # source://prism//lib/prism/node.rb#11002 + # source://prism//lib/prism/node.rb#11010 sig do params( source: Prism::Source, @@ -21305,36 +21293,36 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#11123 + # source://prism//lib/prism/node.rb#11131 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11014 + # source://prism//lib/prism/node.rb#11022 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#11019 + # source://prism//lib/prism/node.rb#11027 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11036 + # source://prism//lib/prism/node.rb#11044 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11031 + # source://prism//lib/prism/node.rb#11039 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location) -> InstanceVariableWriteNode # - # source://prism//lib/prism/node.rb#11041 + # source://prism//lib/prism/node.rb#11049 sig do params( node_id: Integer, @@ -21351,13 +21339,13 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#11046 + # source://prism//lib/prism/node.rb#11054 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location } # - # source://prism//lib/prism/node.rb#11049 + # source://prism//lib/prism/node.rb#11057 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -21365,7 +21353,7 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # # @yield [value] # - # source://prism//lib/prism/node.rb#11024 + # source://prism//lib/prism/node.rb#11032 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -21373,7 +21361,7 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#11107 + # source://prism//lib/prism/node.rb#11115 sig { override.returns(String) } def inspect; end @@ -21383,7 +21371,7 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # # @_foo = "bar" # name `@_foo` # - # source://prism//lib/prism/node.rb#11058 + # source://prism//lib/prism/node.rb#11066 sig { returns(Symbol) } def name; end @@ -21392,13 +21380,13 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # @_x = 1 # ^^^ # - # source://prism//lib/prism/node.rb#11064 + # source://prism//lib/prism/node.rb#11072 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#11102 + # source://prism//lib/prism/node.rb#11110 sig { returns(String) } def operator; end @@ -21407,25 +21395,25 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # @x = y # ^ # - # source://prism//lib/prism/node.rb#11089 + # source://prism//lib/prism/node.rb#11097 sig { returns(Prism::Location) } def operator_loc; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#11072 + # source://prism//lib/prism/node.rb#11080 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#11097 + # source://prism//lib/prism/node.rb#11105 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#11112 + # source://prism//lib/prism/node.rb#11120 sig { override.returns(Symbol) } def type; end @@ -21437,41 +21425,41 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # @_x = 1234 # ^^^^ # - # source://prism//lib/prism/node.rb#11083 + # source://prism//lib/prism/node.rb#11091 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#11117 + # source://prism//lib/prism/node.rb#11125 def type; end end end # Flags for integer nodes that correspond to the base of the integer. # -# source://prism//lib/prism/node.rb#19820 +# source://prism//lib/prism/node.rb#19828 module Prism::IntegerBaseFlags; end # 0b prefix # -# source://prism//lib/prism/node.rb#19822 +# source://prism//lib/prism/node.rb#19830 Prism::IntegerBaseFlags::BINARY = T.let(T.unsafe(nil), Integer) # 0d or no prefix # -# source://prism//lib/prism/node.rb#19825 +# source://prism//lib/prism/node.rb#19833 Prism::IntegerBaseFlags::DECIMAL = T.let(T.unsafe(nil), Integer) # 0x prefix # -# source://prism//lib/prism/node.rb#19831 +# source://prism//lib/prism/node.rb#19839 Prism::IntegerBaseFlags::HEXADECIMAL = T.let(T.unsafe(nil), Integer) # 0o or 0 prefix # -# source://prism//lib/prism/node.rb#19828 +# source://prism//lib/prism/node.rb#19836 Prism::IntegerBaseFlags::OCTAL = T.let(T.unsafe(nil), Integer) # Represents an integer number literal. @@ -21479,13 +21467,13 @@ Prism::IntegerBaseFlags::OCTAL = T.let(T.unsafe(nil), Integer) # 1 # ^ # -# source://prism//lib/prism/node.rb#11136 +# source://prism//lib/prism/node.rb#11144 class Prism::IntegerNode < ::Prism::Node # Initialize a new IntegerNode node. # # @return [IntegerNode] a new instance of IntegerNode # - # source://prism//lib/prism/node.rb#11138 + # source://prism//lib/prism/node.rb#11146 sig do params( source: Prism::Source, @@ -21500,12 +21488,12 @@ class Prism::IntegerNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#11225 + # source://prism//lib/prism/node.rb#11233 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11147 + # source://prism//lib/prism/node.rb#11155 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -21513,31 +21501,31 @@ class Prism::IntegerNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11186 + # source://prism//lib/prism/node.rb#11194 sig { returns(T::Boolean) } def binary?; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#11152 + # source://prism//lib/prism/node.rb#11160 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11168 + # source://prism//lib/prism/node.rb#11176 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11163 + # source://prism//lib/prism/node.rb#11171 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Integer) -> IntegerNode # - # source://prism//lib/prism/node.rb#11173 + # source://prism//lib/prism/node.rb#11181 sig do params( node_id: Integer, @@ -21552,26 +21540,26 @@ class Prism::IntegerNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11191 + # source://prism//lib/prism/node.rb#11199 sig { returns(T::Boolean) } def decimal?; end # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#11178 + # source://prism//lib/prism/node.rb#11186 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Integer } # - # source://prism//lib/prism/node.rb#11181 + # source://prism//lib/prism/node.rb#11189 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#11157 + # source://prism//lib/prism/node.rb#11165 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -21581,13 +21569,13 @@ class Prism::IntegerNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11201 + # source://prism//lib/prism/node.rb#11209 sig { returns(T::Boolean) } def hexadecimal?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#11209 + # source://prism//lib/prism/node.rb#11217 sig { override.returns(String) } def inspect; end @@ -21595,26 +21583,26 @@ class Prism::IntegerNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11196 + # source://prism//lib/prism/node.rb#11204 sig { returns(T::Boolean) } def octal?; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#11214 + # source://prism//lib/prism/node.rb#11222 sig { override.returns(Symbol) } def type; end # The value of the integer literal as a number. # - # source://prism//lib/prism/node.rb#11206 + # source://prism//lib/prism/node.rb#11214 sig { returns(Integer) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#11219 + # source://prism//lib/prism/node.rb#11227 def type; end end end @@ -21624,7 +21612,7 @@ end # if /foo #{bar} baz/ then end # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#11236 +# source://prism//lib/prism/node.rb#11244 class Prism::InterpolatedMatchLastLineNode < ::Prism::Node include ::Prism::RegularExpressionOptions @@ -21632,7 +21620,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [InterpolatedMatchLastLineNode] a new instance of InterpolatedMatchLastLineNode # - # source://prism//lib/prism/node.rb#11238 + # source://prism//lib/prism/node.rb#11246 sig do params( source: Prism::Source, @@ -21649,12 +21637,12 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#11399 + # source://prism//lib/prism/node.rb#11407 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11249 + # source://prism//lib/prism/node.rb#11257 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -21662,43 +21650,43 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11314 + # source://prism//lib/prism/node.rb#11322 sig { returns(T::Boolean) } def ascii_8bit?; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#11254 + # source://prism//lib/prism/node.rb#11262 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#11378 + # source://prism//lib/prism/node.rb#11386 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#11360 + # source://prism//lib/prism/node.rb#11368 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11271 + # source://prism//lib/prism/node.rb#11279 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11266 + # source://prism//lib/prism/node.rb#11274 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location) -> InterpolatedMatchLastLineNode # - # source://prism//lib/prism/node.rb#11276 + # source://prism//lib/prism/node.rb#11284 sig do params( node_id: Integer, @@ -21714,26 +21702,26 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#11281 + # source://prism//lib/prism/node.rb#11289 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location } # - # source://prism//lib/prism/node.rb#11284 + # source://prism//lib/prism/node.rb#11292 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#11259 + # source://prism//lib/prism/node.rb#11267 def each_child_node; end # def euc_jp?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11309 + # source://prism//lib/prism/node.rb#11317 sig { returns(T::Boolean) } def euc_jp?; end @@ -21741,7 +21729,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11294 + # source://prism//lib/prism/node.rb#11302 sig { returns(T::Boolean) } def extended?; end @@ -21752,7 +21740,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11334 + # source://prism//lib/prism/node.rb#11342 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -21760,7 +21748,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11339 + # source://prism//lib/prism/node.rb#11347 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end @@ -21768,7 +21756,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11329 + # source://prism//lib/prism/node.rb#11337 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -21776,13 +21764,13 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11289 + # source://prism//lib/prism/node.rb#11297 sig { returns(T::Boolean) } def ignore_case?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#11383 + # source://prism//lib/prism/node.rb#11391 sig { override.returns(String) } def inspect; end @@ -21790,7 +21778,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11299 + # source://prism//lib/prism/node.rb#11307 sig { returns(T::Boolean) } def multi_line?; end @@ -21801,19 +21789,19 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11304 + # source://prism//lib/prism/node.rb#11312 sig { returns(T::Boolean) } def once?; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#11373 + # source://prism//lib/prism/node.rb#11381 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#11344 + # source://prism//lib/prism/node.rb#11352 sig { returns(Prism::Location) } def opening_loc; end @@ -21822,25 +21810,25 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] # - # source://prism//lib/prism/node.rb#11357 + # source://prism//lib/prism/node.rb#11365 sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } def parts; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#11368 + # source://prism//lib/prism/node.rb#11376 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#11352 + # source://prism//lib/prism/node.rb#11360 def save_opening_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#11388 + # source://prism//lib/prism/node.rb#11396 sig { override.returns(Symbol) } def type; end @@ -21848,7 +21836,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11324 + # source://prism//lib/prism/node.rb#11332 sig { returns(T::Boolean) } def utf_8?; end @@ -21856,14 +21844,14 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11319 + # source://prism//lib/prism/node.rb#11327 sig { returns(T::Boolean) } def windows_31j?; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#11393 + # source://prism//lib/prism/node.rb#11401 def type; end end end @@ -21873,7 +21861,7 @@ end # /foo #{bar} baz/ # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#11413 +# source://prism//lib/prism/node.rb#11421 class Prism::InterpolatedRegularExpressionNode < ::Prism::Node include ::Prism::RegularExpressionOptions @@ -21881,7 +21869,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [InterpolatedRegularExpressionNode] a new instance of InterpolatedRegularExpressionNode # - # source://prism//lib/prism/node.rb#11415 + # source://prism//lib/prism/node.rb#11423 sig do params( source: Prism::Source, @@ -21898,12 +21886,12 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#11576 + # source://prism//lib/prism/node.rb#11584 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11426 + # source://prism//lib/prism/node.rb#11434 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -21911,43 +21899,43 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11491 + # source://prism//lib/prism/node.rb#11499 sig { returns(T::Boolean) } def ascii_8bit?; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#11431 + # source://prism//lib/prism/node.rb#11439 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#11555 + # source://prism//lib/prism/node.rb#11563 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#11537 + # source://prism//lib/prism/node.rb#11545 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11448 + # source://prism//lib/prism/node.rb#11456 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11443 + # source://prism//lib/prism/node.rb#11451 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location) -> InterpolatedRegularExpressionNode # - # source://prism//lib/prism/node.rb#11453 + # source://prism//lib/prism/node.rb#11461 sig do params( node_id: Integer, @@ -21963,26 +21951,26 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#11458 + # source://prism//lib/prism/node.rb#11466 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location } # - # source://prism//lib/prism/node.rb#11461 + # source://prism//lib/prism/node.rb#11469 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#11436 + # source://prism//lib/prism/node.rb#11444 def each_child_node; end # def euc_jp?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11486 + # source://prism//lib/prism/node.rb#11494 sig { returns(T::Boolean) } def euc_jp?; end @@ -21990,7 +21978,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11471 + # source://prism//lib/prism/node.rb#11479 sig { returns(T::Boolean) } def extended?; end @@ -22001,7 +21989,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11511 + # source://prism//lib/prism/node.rb#11519 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -22009,7 +21997,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11516 + # source://prism//lib/prism/node.rb#11524 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end @@ -22017,7 +22005,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11506 + # source://prism//lib/prism/node.rb#11514 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -22025,13 +22013,13 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11466 + # source://prism//lib/prism/node.rb#11474 sig { returns(T::Boolean) } def ignore_case?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#11560 + # source://prism//lib/prism/node.rb#11568 sig { override.returns(String) } def inspect; end @@ -22039,7 +22027,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11476 + # source://prism//lib/prism/node.rb#11484 sig { returns(T::Boolean) } def multi_line?; end @@ -22050,19 +22038,19 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11481 + # source://prism//lib/prism/node.rb#11489 sig { returns(T::Boolean) } def once?; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#11550 + # source://prism//lib/prism/node.rb#11558 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#11521 + # source://prism//lib/prism/node.rb#11529 sig { returns(Prism::Location) } def opening_loc; end @@ -22071,25 +22059,25 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] # - # source://prism//lib/prism/node.rb#11534 + # source://prism//lib/prism/node.rb#11542 sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } def parts; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#11545 + # source://prism//lib/prism/node.rb#11553 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#11529 + # source://prism//lib/prism/node.rb#11537 def save_opening_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#11565 + # source://prism//lib/prism/node.rb#11573 sig { override.returns(Symbol) } def type; end @@ -22097,7 +22085,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11501 + # source://prism//lib/prism/node.rb#11509 sig { returns(T::Boolean) } def utf_8?; end @@ -22105,14 +22093,14 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11496 + # source://prism//lib/prism/node.rb#11504 sig { returns(T::Boolean) } def windows_31j?; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#11570 + # source://prism//lib/prism/node.rb#11578 def type; end end end @@ -22122,7 +22110,7 @@ end # "foo #{bar} baz" # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#11590 +# source://prism//lib/prism/node.rb#11598 class Prism::InterpolatedStringNode < ::Prism::Node include ::Prism::HeredocQuery @@ -22130,7 +22118,7 @@ class Prism::InterpolatedStringNode < ::Prism::Node # # @return [InterpolatedStringNode] a new instance of InterpolatedStringNode # - # source://prism//lib/prism/node.rb#11592 + # source://prism//lib/prism/node.rb#11600 sig do params( source: Prism::Source, @@ -22147,48 +22135,48 @@ class Prism::InterpolatedStringNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#11720 + # source://prism//lib/prism/node.rb#11728 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11603 + # source://prism//lib/prism/node.rb#11611 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#11608 + # source://prism//lib/prism/node.rb#11616 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#11699 + # source://prism//lib/prism/node.rb#11707 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#11675 + # source://prism//lib/prism/node.rb#11683 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11625 + # source://prism//lib/prism/node.rb#11633 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11620 + # source://prism//lib/prism/node.rb#11628 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location?, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode | XStringNode | InterpolatedXStringNode | SymbolNode | InterpolatedSymbolNode], ?closing_loc: Location?) -> InterpolatedStringNode # - # source://prism//lib/prism/node.rb#11630 + # source://prism//lib/prism/node.rb#11638 sig do params( node_id: Integer, @@ -22204,19 +22192,19 @@ class Prism::InterpolatedStringNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#11635 + # source://prism//lib/prism/node.rb#11643 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location?, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode | XStringNode | InterpolatedXStringNode | SymbolNode | InterpolatedSymbolNode], closing_loc: Location? } # - # source://prism//lib/prism/node.rb#11638 + # source://prism//lib/prism/node.rb#11646 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#11613 + # source://prism//lib/prism/node.rb#11621 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -22226,7 +22214,7 @@ class Prism::InterpolatedStringNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11643 + # source://prism//lib/prism/node.rb#11651 sig { returns(T::Boolean) } def frozen?; end @@ -22235,7 +22223,7 @@ class Prism::InterpolatedStringNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#11704 + # source://prism//lib/prism/node.rb#11712 sig { override.returns(String) } def inspect; end @@ -22243,7 +22231,7 @@ class Prism::InterpolatedStringNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11648 + # source://prism//lib/prism/node.rb#11656 sig { returns(T::Boolean) } def mutable?; end @@ -22252,19 +22240,19 @@ class Prism::InterpolatedStringNode < ::Prism::Node # def opening: () -> String? # - # source://prism//lib/prism/node.rb#11694 + # source://prism//lib/prism/node.rb#11702 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#11653 + # source://prism//lib/prism/node.rb#11661 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode | XStringNode | InterpolatedXStringNode | SymbolNode | InterpolatedSymbolNode] # - # source://prism//lib/prism/node.rb#11672 + # source://prism//lib/prism/node.rb#11680 sig do returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode, Prism::InterpolatedStringNode, Prism::XStringNode, Prism::InterpolatedXStringNode, Prism::SymbolNode, Prism::InterpolatedSymbolNode)]) end @@ -22273,38 +22261,38 @@ class Prism::InterpolatedStringNode < ::Prism::Node # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#11689 + # source://prism//lib/prism/node.rb#11697 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#11667 + # source://prism//lib/prism/node.rb#11675 def save_opening_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#11709 + # source://prism//lib/prism/node.rb#11717 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#11714 + # source://prism//lib/prism/node.rb#11722 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#19835 +# source://prism//lib/prism/node.rb#19843 module Prism::InterpolatedStringNodeFlags; end -# source://prism//lib/prism/node.rb#19837 +# source://prism//lib/prism/node.rb#19845 Prism::InterpolatedStringNodeFlags::FROZEN = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/node.rb#19840 +# source://prism//lib/prism/node.rb#19848 Prism::InterpolatedStringNodeFlags::MUTABLE = T.let(T.unsafe(nil), Integer) # Represents a symbol literal that contains interpolation. @@ -22312,13 +22300,13 @@ Prism::InterpolatedStringNodeFlags::MUTABLE = T.let(T.unsafe(nil), Integer) # :"foo #{bar} baz" # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#11734 +# source://prism//lib/prism/node.rb#11742 class Prism::InterpolatedSymbolNode < ::Prism::Node # Initialize a new InterpolatedSymbolNode node. # # @return [InterpolatedSymbolNode] a new instance of InterpolatedSymbolNode # - # source://prism//lib/prism/node.rb#11736 + # source://prism//lib/prism/node.rb#11744 sig do params( source: Prism::Source, @@ -22335,48 +22323,48 @@ class Prism::InterpolatedSymbolNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#11854 + # source://prism//lib/prism/node.rb#11862 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11747 + # source://prism//lib/prism/node.rb#11755 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#11752 + # source://prism//lib/prism/node.rb#11760 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#11833 + # source://prism//lib/prism/node.rb#11841 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#11809 + # source://prism//lib/prism/node.rb#11817 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11769 + # source://prism//lib/prism/node.rb#11777 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11764 + # source://prism//lib/prism/node.rb#11772 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location?, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location?) -> InterpolatedSymbolNode # - # source://prism//lib/prism/node.rb#11774 + # source://prism//lib/prism/node.rb#11782 sig do params( node_id: Integer, @@ -22392,19 +22380,19 @@ class Prism::InterpolatedSymbolNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#11779 + # source://prism//lib/prism/node.rb#11787 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location?, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location? } # - # source://prism//lib/prism/node.rb#11782 + # source://prism//lib/prism/node.rb#11790 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#11757 + # source://prism//lib/prism/node.rb#11765 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -22412,7 +22400,7 @@ class Prism::InterpolatedSymbolNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#11838 + # source://prism//lib/prism/node.rb#11846 sig { override.returns(String) } def inspect; end @@ -22421,44 +22409,44 @@ class Prism::InterpolatedSymbolNode < ::Prism::Node # def opening: () -> String? # - # source://prism//lib/prism/node.rb#11828 + # source://prism//lib/prism/node.rb#11836 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#11787 + # source://prism//lib/prism/node.rb#11795 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] # - # source://prism//lib/prism/node.rb#11806 + # source://prism//lib/prism/node.rb#11814 sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } def parts; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#11823 + # source://prism//lib/prism/node.rb#11831 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#11801 + # source://prism//lib/prism/node.rb#11809 def save_opening_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#11843 + # source://prism//lib/prism/node.rb#11851 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#11848 + # source://prism//lib/prism/node.rb#11856 def type; end end end @@ -22468,7 +22456,7 @@ end # `foo #{bar} baz` # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#11867 +# source://prism//lib/prism/node.rb#11875 class Prism::InterpolatedXStringNode < ::Prism::Node include ::Prism::HeredocQuery @@ -22476,7 +22464,7 @@ class Prism::InterpolatedXStringNode < ::Prism::Node # # @return [InterpolatedXStringNode] a new instance of InterpolatedXStringNode # - # source://prism//lib/prism/node.rb#11869 + # source://prism//lib/prism/node.rb#11877 sig do params( source: Prism::Source, @@ -22493,48 +22481,48 @@ class Prism::InterpolatedXStringNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#11975 + # source://prism//lib/prism/node.rb#11983 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11880 + # source://prism//lib/prism/node.rb#11888 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#11885 + # source://prism//lib/prism/node.rb#11893 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#11954 + # source://prism//lib/prism/node.rb#11962 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#11936 + # source://prism//lib/prism/node.rb#11944 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11902 + # source://prism//lib/prism/node.rb#11910 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11897 + # source://prism//lib/prism/node.rb#11905 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location) -> InterpolatedXStringNode # - # source://prism//lib/prism/node.rb#11907 + # source://prism//lib/prism/node.rb#11915 sig do params( node_id: Integer, @@ -22550,19 +22538,19 @@ class Prism::InterpolatedXStringNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#11912 + # source://prism//lib/prism/node.rb#11920 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location } # - # source://prism//lib/prism/node.rb#11915 + # source://prism//lib/prism/node.rb#11923 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#11890 + # source://prism//lib/prism/node.rb#11898 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -22573,7 +22561,7 @@ class Prism::InterpolatedXStringNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#11959 + # source://prism//lib/prism/node.rb#11967 sig { override.returns(String) } def inspect; end @@ -22582,44 +22570,44 @@ class Prism::InterpolatedXStringNode < ::Prism::Node # def opening: () -> String # - # source://prism//lib/prism/node.rb#11949 + # source://prism//lib/prism/node.rb#11957 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#11920 + # source://prism//lib/prism/node.rb#11928 sig { returns(Prism::Location) } def opening_loc; end # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] # - # source://prism//lib/prism/node.rb#11933 + # source://prism//lib/prism/node.rb#11941 sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } def parts; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#11944 + # source://prism//lib/prism/node.rb#11952 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#11928 + # source://prism//lib/prism/node.rb#11936 def save_opening_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#11964 + # source://prism//lib/prism/node.rb#11972 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#11969 + # source://prism//lib/prism/node.rb#11977 def type; end end end @@ -22629,68 +22617,68 @@ end # -> { it } # ^^ # -# source://prism//lib/prism/node.rb#11988 +# source://prism//lib/prism/node.rb#11996 class Prism::ItLocalVariableReadNode < ::Prism::Node # Initialize a new ItLocalVariableReadNode node. # # @return [ItLocalVariableReadNode] a new instance of ItLocalVariableReadNode # - # source://prism//lib/prism/node.rb#11990 + # source://prism//lib/prism/node.rb#11998 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#12053 + # source://prism//lib/prism/node.rb#12061 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11998 + # source://prism//lib/prism/node.rb#12006 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#12003 + # source://prism//lib/prism/node.rb#12011 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12019 + # source://prism//lib/prism/node.rb#12027 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12014 + # source://prism//lib/prism/node.rb#12022 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ItLocalVariableReadNode # - # source://prism//lib/prism/node.rb#12024 + # source://prism//lib/prism/node.rb#12032 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[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#12029 + # source://prism//lib/prism/node.rb#12037 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#12032 + # source://prism//lib/prism/node.rb#12040 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#12008 + # source://prism//lib/prism/node.rb#12016 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -22698,20 +22686,20 @@ class Prism::ItLocalVariableReadNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#12037 + # source://prism//lib/prism/node.rb#12045 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#12042 + # source://prism//lib/prism/node.rb#12050 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#12047 + # source://prism//lib/prism/node.rb#12055 def type; end end end @@ -22721,68 +22709,68 @@ end # -> { it + it } # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#12062 +# source://prism//lib/prism/node.rb#12070 class Prism::ItParametersNode < ::Prism::Node # Initialize a new ItParametersNode node. # # @return [ItParametersNode] a new instance of ItParametersNode # - # source://prism//lib/prism/node.rb#12064 + # source://prism//lib/prism/node.rb#12072 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#12127 + # source://prism//lib/prism/node.rb#12135 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12072 + # source://prism//lib/prism/node.rb#12080 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#12077 + # source://prism//lib/prism/node.rb#12085 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12093 + # source://prism//lib/prism/node.rb#12101 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12088 + # source://prism//lib/prism/node.rb#12096 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ItParametersNode # - # source://prism//lib/prism/node.rb#12098 + # source://prism//lib/prism/node.rb#12106 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[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#12103 + # source://prism//lib/prism/node.rb#12111 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#12106 + # source://prism//lib/prism/node.rb#12114 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#12082 + # source://prism//lib/prism/node.rb#12090 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -22790,20 +22778,20 @@ class Prism::ItParametersNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#12111 + # source://prism//lib/prism/node.rb#12119 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#12116 + # source://prism//lib/prism/node.rb#12124 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#12121 + # source://prism//lib/prism/node.rb#12129 def type; end end end @@ -22813,13 +22801,13 @@ end # foo(a: b) # ^^^^ # -# source://prism//lib/prism/node.rb#12136 +# source://prism//lib/prism/node.rb#12144 class Prism::KeywordHashNode < ::Prism::Node # Initialize a new KeywordHashNode node. # # @return [KeywordHashNode] a new instance of KeywordHashNode # - # source://prism//lib/prism/node.rb#12138 + # source://prism//lib/prism/node.rb#12146 sig do params( source: Prism::Source, @@ -22834,36 +22822,36 @@ class Prism::KeywordHashNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#12211 + # source://prism//lib/prism/node.rb#12219 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12147 + # source://prism//lib/prism/node.rb#12155 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#12152 + # source://prism//lib/prism/node.rb#12160 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12169 + # source://prism//lib/prism/node.rb#12177 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12164 + # source://prism//lib/prism/node.rb#12172 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?elements: Array[AssocNode | AssocSplatNode]) -> KeywordHashNode # - # source://prism//lib/prism/node.rb#12174 + # source://prism//lib/prism/node.rb#12182 sig do params( node_id: Integer, @@ -22877,24 +22865,24 @@ class Prism::KeywordHashNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#12179 + # source://prism//lib/prism/node.rb#12187 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, elements: Array[AssocNode | AssocSplatNode] } # - # source://prism//lib/prism/node.rb#12182 + # source://prism//lib/prism/node.rb#12190 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#12157 + # source://prism//lib/prism/node.rb#12165 def each_child_node; end # attr_reader elements: Array[AssocNode | AssocSplatNode] # - # source://prism//lib/prism/node.rb#12192 + # source://prism//lib/prism/node.rb#12200 sig { returns(T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)]) } def elements; end @@ -22903,7 +22891,7 @@ class Prism::KeywordHashNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#12195 + # source://prism//lib/prism/node.rb#12203 sig { override.returns(String) } def inspect; end @@ -22911,32 +22899,32 @@ class Prism::KeywordHashNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12187 + # source://prism//lib/prism/node.rb#12195 sig { returns(T::Boolean) } def symbol_keys?; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#12200 + # source://prism//lib/prism/node.rb#12208 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#12205 + # source://prism//lib/prism/node.rb#12213 def type; end end end # Flags for keyword hash nodes. # -# source://prism//lib/prism/node.rb#19844 +# source://prism//lib/prism/node.rb#19852 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#19846 +# source://prism//lib/prism/node.rb#19854 Prism::KeywordHashNodeFlags::SYMBOL_KEYS = T.let(T.unsafe(nil), Integer) # Represents a keyword rest parameter to a method, block, or lambda definition. @@ -22945,13 +22933,13 @@ Prism::KeywordHashNodeFlags::SYMBOL_KEYS = T.let(T.unsafe(nil), Integer) # ^^^ # end # -# source://prism//lib/prism/node.rb#12224 +# source://prism//lib/prism/node.rb#12232 class Prism::KeywordRestParameterNode < ::Prism::Node # Initialize a new KeywordRestParameterNode node. # # @return [KeywordRestParameterNode] a new instance of KeywordRestParameterNode # - # source://prism//lib/prism/node.rb#12226 + # source://prism//lib/prism/node.rb#12234 sig do params( source: Prism::Source, @@ -22968,36 +22956,36 @@ class Prism::KeywordRestParameterNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#12337 + # source://prism//lib/prism/node.rb#12345 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12237 + # source://prism//lib/prism/node.rb#12245 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#12242 + # source://prism//lib/prism/node.rb#12250 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12258 + # source://prism//lib/prism/node.rb#12266 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12253 + # source://prism//lib/prism/node.rb#12261 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol?, ?name_loc: Location?, ?operator_loc: Location) -> KeywordRestParameterNode # - # source://prism//lib/prism/node.rb#12263 + # source://prism//lib/prism/node.rb#12271 sig do params( node_id: Integer, @@ -23013,19 +23001,19 @@ class Prism::KeywordRestParameterNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#12268 + # source://prism//lib/prism/node.rb#12276 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol?, name_loc: Location?, operator_loc: Location } # - # source://prism//lib/prism/node.rb#12271 + # source://prism//lib/prism/node.rb#12279 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#12247 + # source://prism//lib/prism/node.rb#12255 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -23033,31 +23021,31 @@ class Prism::KeywordRestParameterNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#12321 + # source://prism//lib/prism/node.rb#12329 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol? # - # source://prism//lib/prism/node.rb#12281 + # source://prism//lib/prism/node.rb#12289 sig { returns(T.nilable(Symbol)) } def name; end # attr_reader name_loc: Location? # - # source://prism//lib/prism/node.rb#12284 + # source://prism//lib/prism/node.rb#12292 sig { returns(T.nilable(Prism::Location)) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#12316 + # source://prism//lib/prism/node.rb#12324 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#12303 + # source://prism//lib/prism/node.rb#12311 sig { returns(Prism::Location) } def operator_loc; end @@ -23065,32 +23053,32 @@ class Prism::KeywordRestParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12276 + # source://prism//lib/prism/node.rb#12284 sig { returns(T::Boolean) } def repeated_parameter?; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#12298 + # source://prism//lib/prism/node.rb#12306 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#12311 + # source://prism//lib/prism/node.rb#12319 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#12326 + # source://prism//lib/prism/node.rb#12334 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#12331 + # source://prism//lib/prism/node.rb#12339 def type; end end end @@ -23100,13 +23088,13 @@ end # ->(value) { value * 2 } # ^^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#12350 +# source://prism//lib/prism/node.rb#12358 class Prism::LambdaNode < ::Prism::Node # Initialize a new LambdaNode node. # # @return [LambdaNode] a new instance of LambdaNode # - # source://prism//lib/prism/node.rb#12352 + # source://prism//lib/prism/node.rb#12360 sig do params( source: Prism::Source, @@ -23126,54 +23114,54 @@ class Prism::LambdaNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#12489 + # source://prism//lib/prism/node.rb#12497 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12366 + # source://prism//lib/prism/node.rb#12374 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader body: StatementsNode | BeginNode | nil # - # source://prism//lib/prism/node.rb#12455 + # source://prism//lib/prism/node.rb#12463 sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } def body; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#12371 + # source://prism//lib/prism/node.rb#12379 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#12468 + # source://prism//lib/prism/node.rb#12476 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#12439 + # source://prism//lib/prism/node.rb#12447 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12392 + # source://prism//lib/prism/node.rb#12400 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12384 + # source://prism//lib/prism/node.rb#12392 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?operator_loc: Location, ?opening_loc: Location, ?closing_loc: Location, ?parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil, ?body: StatementsNode | BeginNode | nil) -> LambdaNode # - # source://prism//lib/prism/node.rb#12397 + # source://prism//lib/prism/node.rb#12405 sig do params( node_id: Integer, @@ -23192,13 +23180,13 @@ class Prism::LambdaNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#12402 + # source://prism//lib/prism/node.rb#12410 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { 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#12405 + # source://prism//lib/prism/node.rb#12413 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -23206,7 +23194,7 @@ class Prism::LambdaNode < ::Prism::Node # # @yield [parameters] # - # source://prism//lib/prism/node.rb#12376 + # source://prism//lib/prism/node.rb#12384 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -23214,74 +23202,74 @@ class Prism::LambdaNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#12473 + # source://prism//lib/prism/node.rb#12481 sig { override.returns(String) } def inspect; end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#12410 + # source://prism//lib/prism/node.rb#12418 sig { returns(T::Array[Symbol]) } def locals; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#12463 + # source://prism//lib/prism/node.rb#12471 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#12426 + # source://prism//lib/prism/node.rb#12434 sig { returns(Prism::Location) } def opening_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#12458 + # source://prism//lib/prism/node.rb#12466 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#12413 + # source://prism//lib/prism/node.rb#12421 sig { returns(Prism::Location) } def operator_loc; end # attr_reader parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil # - # source://prism//lib/prism/node.rb#12452 + # source://prism//lib/prism/node.rb#12460 sig { returns(T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode))) } def parameters; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#12447 + # source://prism//lib/prism/node.rb#12455 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#12434 + # source://prism//lib/prism/node.rb#12442 def save_opening_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#12421 + # source://prism//lib/prism/node.rb#12429 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#12478 + # source://prism//lib/prism/node.rb#12486 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#12483 + # source://prism//lib/prism/node.rb#12491 def type; end end end @@ -23292,53 +23280,42 @@ end # generally lines up. However, there are a few cases that require special # handling. # -# source://prism//lib/prism/lex_compat.rb#12 +# source://prism//lib/prism/lex_compat.rb#10 class Prism::LexCompat # @return [LexCompat] a new instance of LexCompat # - # source://prism//lib/prism/lex_compat.rb#624 - def initialize(source, **options); end + # source://prism//lib/prism/lex_compat.rb#586 + def initialize(code, **options); end + + # source://prism//lib/prism/lex_compat.rb#828 + def add_on_sp_tokens(tokens, source, data_loc, bom, eof_token); end # Returns the value of attribute options. # - # source://prism//lib/prism/lex_compat.rb#622 + # source://prism//lib/prism/lex_compat.rb#584 def options; end - # source://prism//lib/prism/lex_compat.rb#629 + # source://prism//lib/prism/lex_compat.rb#591 def result; end - - # Returns the value of attribute source. - # - # source://prism//lib/prism/lex_compat.rb#622 - def source; end end # In previous versions of Ruby, Ripper wouldn't flush the bom before the # first token, so we had to have a hack in place to account for that. # -# source://prism//lib/prism/lex_compat.rb#619 +# source://prism//lib/prism/lex_compat.rb#581 Prism::LexCompat::BOM_FLUSHED = T.let(T.unsafe(nil), TrueClass) -# Ripper doesn't include the rest of the token in the event, so we need to -# trim it down to just the content on the first line when comparing. -# -# source://prism//lib/prism/lex_compat.rb#230 -class Prism::LexCompat::EndContentToken < ::Prism::LexCompat::Token - # source://prism//lib/prism/lex_compat.rb#231 - def ==(other); end -end - # A heredoc in this case is a list of tokens that belong to the body of the # heredoc that should be appended onto the list of tokens when the heredoc # closes. # -# source://prism//lib/prism/lex_compat.rb#291 +# source://prism//lib/prism/lex_compat.rb#253 module Prism::LexCompat::Heredoc class << self # Here we will split between the two types of heredocs and return the # object that will store their tokens. # - # source://prism//lib/prism/lex_compat.rb#603 + # source://prism//lib/prism/lex_compat.rb#565 def build(opening); end end end @@ -23347,23 +23324,23 @@ end # that need to be split on "\\\n" to mimic Ripper's behavior. We also need # to keep track of the state that the heredoc was opened in. # -# source://prism//lib/prism/lex_compat.rb#315 +# source://prism//lib/prism/lex_compat.rb#277 class Prism::LexCompat::Heredoc::DashHeredoc # @return [DashHeredoc] a new instance of DashHeredoc # - # source://prism//lib/prism/lex_compat.rb#318 + # source://prism//lib/prism/lex_compat.rb#280 def initialize(split); end - # source://prism//lib/prism/lex_compat.rb#323 + # source://prism//lib/prism/lex_compat.rb#285 def <<(token); end - # source://prism//lib/prism/lex_compat.rb#316 + # source://prism//lib/prism/lex_compat.rb#278 def split; end - # source://prism//lib/prism/lex_compat.rb#327 + # source://prism//lib/prism/lex_compat.rb#289 def to_a; end - # source://prism//lib/prism/lex_compat.rb#316 + # source://prism//lib/prism/lex_compat.rb#278 def tokens; end end @@ -23378,45 +23355,45 @@ end # some extra manipulation on the tokens to make them match Ripper's # output by mirroring the dedent logic that Ripper uses. # -# source://prism//lib/prism/lex_compat.rb#374 +# source://prism//lib/prism/lex_compat.rb#336 class Prism::LexCompat::Heredoc::DedentingHeredoc # @return [DedentingHeredoc] a new instance of DedentingHeredoc # - # source://prism//lib/prism/lex_compat.rb#379 + # source://prism//lib/prism/lex_compat.rb#341 def initialize; end # As tokens are coming in, we track the minimum amount of common leading # whitespace on plain string content tokens. This allows us to later # remove that amount of whitespace from the beginning of each line. # - # source://prism//lib/prism/lex_compat.rb#390 + # source://prism//lib/prism/lex_compat.rb#352 def <<(token); end # Returns the value of attribute dedent. # - # source://prism//lib/prism/lex_compat.rb#377 + # source://prism//lib/prism/lex_compat.rb#339 def dedent; end # Returns the value of attribute dedent_next. # - # source://prism//lib/prism/lex_compat.rb#377 + # source://prism//lib/prism/lex_compat.rb#339 def dedent_next; end # Returns the value of attribute embexpr_balance. # - # source://prism//lib/prism/lex_compat.rb#377 + # source://prism//lib/prism/lex_compat.rb#339 def embexpr_balance; end - # source://prism//lib/prism/lex_compat.rb#427 + # source://prism//lib/prism/lex_compat.rb#389 def to_a; end # Returns the value of attribute tokens. # - # source://prism//lib/prism/lex_compat.rb#377 + # source://prism//lib/prism/lex_compat.rb#339 def tokens; end end -# source://prism//lib/prism/lex_compat.rb#375 +# source://prism//lib/prism/lex_compat.rb#337 Prism::LexCompat::Heredoc::DedentingHeredoc::TAB_WIDTH = T.let(T.unsafe(nil), Integer) # Heredocs that are no dash or tilde heredocs are just a list of tokens. @@ -23424,64 +23401,29 @@ Prism::LexCompat::Heredoc::DedentingHeredoc::TAB_WIDTH = T.let(T.unsafe(nil), In # order back into the token stream and set the state of the last token to # the state that the heredoc was opened in. # -# source://prism//lib/prism/lex_compat.rb#296 +# source://prism//lib/prism/lex_compat.rb#258 class Prism::LexCompat::Heredoc::PlainHeredoc # @return [PlainHeredoc] a new instance of PlainHeredoc # - # source://prism//lib/prism/lex_compat.rb#299 + # source://prism//lib/prism/lex_compat.rb#261 def initialize; end - # source://prism//lib/prism/lex_compat.rb#303 + # source://prism//lib/prism/lex_compat.rb#265 def <<(token); end - # source://prism//lib/prism/lex_compat.rb#307 + # source://prism//lib/prism/lex_compat.rb#269 def to_a; end - # source://prism//lib/prism/lex_compat.rb#297 + # source://prism//lib/prism/lex_compat.rb#259 def tokens; end end -# Ident tokens for the most part are exactly the same, except sometimes we -# know an ident is a local when ripper doesn't (when they are introduced -# through named captures in regular expressions). In that case we don't -# compare the state. -# -# source://prism//lib/prism/lex_compat.rb#248 -class Prism::LexCompat::IdentToken < ::Prism::LexCompat::Token - # source://prism//lib/prism/lex_compat.rb#249 - def ==(other); end -end - # Tokens where state should be ignored -# used for :on_comment, :on_heredoc_end, :on_embexpr_end +# used for :on_sp, :on_comment, :on_heredoc_end, :on_embexpr_end # -# source://prism//lib/prism/lex_compat.rb#238 +# source://prism//lib/prism/lex_compat.rb#244 class Prism::LexCompat::IgnoreStateToken < ::Prism::LexCompat::Token - # source://prism//lib/prism/lex_compat.rb#239 - def ==(other); end -end - -# Ignored newlines can occasionally have a LABEL state attached to them, so -# we compare the state differently here. -# -# source://prism//lib/prism/lex_compat.rb#259 -class Prism::LexCompat::IgnoredNewlineToken < ::Prism::LexCompat::Token - # source://prism//lib/prism/lex_compat.rb#260 - def ==(other); end -end - -# If we have an identifier that follows a method name like: -# -# def foo bar -# -# then Ripper will mark bar as END|LABEL if there is a local in a parent -# scope named bar because it hasn't pushed the local table yet. We do this -# more accurately, so we need to allow comparing against both END and -# END|LABEL. -# -# source://prism//lib/prism/lex_compat.rb#279 -class Prism::LexCompat::ParamToken < ::Prism::LexCompat::Token - # source://prism//lib/prism/lex_compat.rb#280 + # source://prism//lib/prism/lex_compat.rb#245 def ==(other); end end @@ -23489,28 +23431,28 @@ end # many-to-one mapping because we split up our token types, whereas Ripper # tends to group them. # -# source://prism//lib/prism/lex_compat.rb#33 +# source://prism//lib/prism/lex_compat.rb#31 Prism::LexCompat::RIPPER = T.let(T.unsafe(nil), Hash) # A result class specialized for holding tokens produced by the lexer. # -# source://prism//lib/prism/lex_compat.rb#14 +# source://prism//lib/prism/lex_compat.rb#12 class Prism::LexCompat::Result < ::Prism::Result # Create a new lex compat result object with the given values. # # @return [Result] a new instance of Result # - # source://prism//lib/prism/lex_compat.rb#19 + # source://prism//lib/prism/lex_compat.rb#17 def initialize(value, comments, magic_comments, data_loc, errors, warnings, source); end # Implement the hash pattern matching interface for Result. # - # source://prism//lib/prism/lex_compat.rb#25 + # source://prism//lib/prism/lex_compat.rb#23 def deconstruct_keys(keys); end # The list of tokens that were produced by the lexer. # - # source://prism//lib/prism/lex_compat.rb#16 + # source://prism//lib/prism/lex_compat.rb#14 def value; end end @@ -23518,38 +23460,60 @@ end # However, we add a couple of convenience methods onto them to make them a # little easier to work with. We delegate all other methods to the array. # -# source://prism//lib/prism/lex_compat.rb#204 -class Prism::LexCompat::Token < ::SimpleDelegator +# source://prism//lib/prism/lex_compat.rb#202 +class Prism::LexCompat::Token < ::BasicObject + # Create a new token object with the given ripper-compatible array. + # + # @return [Token] a new instance of Token + # + # source://prism//lib/prism/lex_compat.rb#204 + def initialize(array); end + + # We want to pretend that this is just an Array. + # + # source://prism//lib/prism/lex_compat.rb#229 + def ==(other); end + # The type of the token. # - # source://prism//lib/prism/lex_compat.rb#213 + # source://prism//lib/prism/lex_compat.rb#214 def event; end # The location of the token in the source. # - # source://prism//lib/prism/lex_compat.rb#208 + # source://prism//lib/prism/lex_compat.rb#209 def location; end + # source://prism//lib/prism/lex_compat.rb#237 + def method_missing(name, *_arg1, **_arg2, &_arg3); end + # The state of the lexer when this token was produced. # - # source://prism//lib/prism/lex_compat.rb#223 + # source://prism//lib/prism/lex_compat.rb#224 def state; end # The slice of the source that this token represents. # - # source://prism//lib/prism/lex_compat.rb#218 + # source://prism//lib/prism/lex_compat.rb#219 def value; end + + private + + # @return [Boolean] + # + # source://prism//lib/prism/lex_compat.rb#233 + def respond_to_missing?(name, include_private = T.unsafe(nil)); end end # This is a result specific to the `lex` and `lex_file` methods. # -# source://prism//lib/prism/parse_result.rb#769 +# source://prism//lib/prism/parse_result.rb#778 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#774 + # source://prism//lib/prism/parse_result.rb#783 sig do params( value: T::Array[T.untyped], @@ -23565,51 +23529,29 @@ class Prism::LexResult < ::Prism::Result # Implement the hash pattern matching interface for LexResult. # - # source://prism//lib/prism/parse_result.rb#780 + # source://prism//lib/prism/parse_result.rb#789 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#771 + # source://prism//lib/prism/parse_result.rb#780 sig { returns(T::Array[T.untyped]) } def value; end end -# This is a class that wraps the Ripper lexer to produce almost exactly the -# same tokens. -# -# source://prism//lib/prism/lex_ripper.rb#9 -class Prism::LexRipper - # @return [LexRipper] a new instance of LexRipper - # - # source://prism//lib/prism/lex_ripper.rb#12 - def initialize(source); end - - # source://prism//lib/prism/lex_ripper.rb#16 - def result; end - - # source://prism//lib/prism/lex_ripper.rb#10 - def source; end - - private - - # source://prism//lib/prism/lex_ripper.rb#50 - def lex(source); end -end - # Represents the use of the `&&=` operator for assignment to a local variable. # # target &&= value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#12505 +# source://prism//lib/prism/node.rb#12513 class Prism::LocalVariableAndWriteNode < ::Prism::Node # Initialize a new LocalVariableAndWriteNode node. # # @return [LocalVariableAndWriteNode] a new instance of LocalVariableAndWriteNode # - # source://prism//lib/prism/node.rb#12507 + # source://prism//lib/prism/node.rb#12515 sig do params( source: Prism::Source, @@ -23628,36 +23570,36 @@ class Prism::LocalVariableAndWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#12616 + # source://prism//lib/prism/node.rb#12624 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12520 + # source://prism//lib/prism/node.rb#12528 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#12525 + # source://prism//lib/prism/node.rb#12533 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12542 + # source://prism//lib/prism/node.rb#12550 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12537 + # source://prism//lib/prism/node.rb#12545 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?depth: Integer) -> LocalVariableAndWriteNode # - # source://prism//lib/prism/node.rb#12547 + # source://prism//lib/prism/node.rb#12555 sig do params( node_id: Integer, @@ -23675,19 +23617,19 @@ class Prism::LocalVariableAndWriteNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#12552 + # source://prism//lib/prism/node.rb#12560 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name_loc: Location, operator_loc: Location, value: Prism::node, name: Symbol, depth: Integer } # - # source://prism//lib/prism/node.rb#12555 + # source://prism//lib/prism/node.rb#12563 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#12592 + # source://prism//lib/prism/node.rb#12600 sig { returns(Integer) } def depth; end @@ -23698,7 +23640,7 @@ class Prism::LocalVariableAndWriteNode < ::Prism::Node # # @yield [value] # - # source://prism//lib/prism/node.rb#12530 + # source://prism//lib/prism/node.rb#12538 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -23706,62 +23648,62 @@ class Prism::LocalVariableAndWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#12600 + # source://prism//lib/prism/node.rb#12608 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#12589 + # source://prism//lib/prism/node.rb#12597 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#12560 + # source://prism//lib/prism/node.rb#12568 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#12595 + # source://prism//lib/prism/node.rb#12603 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#12573 + # source://prism//lib/prism/node.rb#12581 sig { returns(Prism::Location) } def operator_loc; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#12568 + # source://prism//lib/prism/node.rb#12576 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#12581 + # source://prism//lib/prism/node.rb#12589 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#12605 + # source://prism//lib/prism/node.rb#12613 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#12586 + # source://prism//lib/prism/node.rb#12594 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#12610 + # source://prism//lib/prism/node.rb#12618 def type; end end end @@ -23771,13 +23713,13 @@ end # target += value # ^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#12630 +# source://prism//lib/prism/node.rb#12638 class Prism::LocalVariableOperatorWriteNode < ::Prism::Node # Initialize a new LocalVariableOperatorWriteNode node. # # @return [LocalVariableOperatorWriteNode] a new instance of LocalVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#12632 + # source://prism//lib/prism/node.rb#12640 sig do params( source: Prism::Source, @@ -23797,48 +23739,48 @@ class Prism::LocalVariableOperatorWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#12740 + # source://prism//lib/prism/node.rb#12748 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12646 + # source://prism//lib/prism/node.rb#12654 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader binary_operator: Symbol # - # source://prism//lib/prism/node.rb#12718 + # source://prism//lib/prism/node.rb#12726 sig { returns(Symbol) } def binary_operator; end # attr_reader binary_operator_loc: Location # - # source://prism//lib/prism/node.rb#12699 + # source://prism//lib/prism/node.rb#12707 sig { returns(Prism::Location) } def binary_operator_loc; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#12651 + # source://prism//lib/prism/node.rb#12659 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12668 + # source://prism//lib/prism/node.rb#12676 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12663 + # source://prism//lib/prism/node.rb#12671 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?binary_operator: Symbol, ?depth: Integer) -> LocalVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#12673 + # source://prism//lib/prism/node.rb#12681 sig do params( node_id: Integer, @@ -23857,19 +23799,19 @@ class Prism::LocalVariableOperatorWriteNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#12678 + # source://prism//lib/prism/node.rb#12686 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name_loc: Location, binary_operator_loc: Location, value: Prism::node, name: Symbol, binary_operator: Symbol, depth: Integer } # - # source://prism//lib/prism/node.rb#12681 + # source://prism//lib/prism/node.rb#12689 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#12721 + # source://prism//lib/prism/node.rb#12729 sig { returns(Integer) } def depth; end @@ -23880,7 +23822,7 @@ class Prism::LocalVariableOperatorWriteNode < ::Prism::Node # # @yield [value] # - # source://prism//lib/prism/node.rb#12656 + # source://prism//lib/prism/node.rb#12664 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -23888,19 +23830,19 @@ class Prism::LocalVariableOperatorWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#12724 + # source://prism//lib/prism/node.rb#12732 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#12715 + # source://prism//lib/prism/node.rb#12723 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#12686 + # source://prism//lib/prism/node.rb#12694 sig { returns(Prism::Location) } def name_loc; end @@ -23919,31 +23861,31 @@ class Prism::LocalVariableOperatorWriteNode < ::Prism::Node # Save the binary_operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#12707 + # source://prism//lib/prism/node.rb#12715 def save_binary_operator_loc(repository); end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#12694 + # source://prism//lib/prism/node.rb#12702 def save_name_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#12729 + # source://prism//lib/prism/node.rb#12737 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#12712 + # source://prism//lib/prism/node.rb#12720 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#12734 + # source://prism//lib/prism/node.rb#12742 def type; end end end @@ -23953,13 +23895,13 @@ end # target ||= value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#12755 +# source://prism//lib/prism/node.rb#12763 class Prism::LocalVariableOrWriteNode < ::Prism::Node # Initialize a new LocalVariableOrWriteNode node. # # @return [LocalVariableOrWriteNode] a new instance of LocalVariableOrWriteNode # - # source://prism//lib/prism/node.rb#12757 + # source://prism//lib/prism/node.rb#12765 sig do params( source: Prism::Source, @@ -23978,36 +23920,36 @@ class Prism::LocalVariableOrWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#12866 + # source://prism//lib/prism/node.rb#12874 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12770 + # source://prism//lib/prism/node.rb#12778 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#12775 + # source://prism//lib/prism/node.rb#12783 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12792 + # source://prism//lib/prism/node.rb#12800 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12787 + # source://prism//lib/prism/node.rb#12795 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?depth: Integer) -> LocalVariableOrWriteNode # - # source://prism//lib/prism/node.rb#12797 + # source://prism//lib/prism/node.rb#12805 sig do params( node_id: Integer, @@ -24025,19 +23967,19 @@ class Prism::LocalVariableOrWriteNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#12802 + # source://prism//lib/prism/node.rb#12810 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name_loc: Location, operator_loc: Location, value: Prism::node, name: Symbol, depth: Integer } # - # source://prism//lib/prism/node.rb#12805 + # source://prism//lib/prism/node.rb#12813 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#12842 + # source://prism//lib/prism/node.rb#12850 sig { returns(Integer) } def depth; end @@ -24048,7 +23990,7 @@ class Prism::LocalVariableOrWriteNode < ::Prism::Node # # @yield [value] # - # source://prism//lib/prism/node.rb#12780 + # source://prism//lib/prism/node.rb#12788 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -24056,62 +23998,62 @@ class Prism::LocalVariableOrWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#12850 + # source://prism//lib/prism/node.rb#12858 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#12839 + # source://prism//lib/prism/node.rb#12847 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#12810 + # source://prism//lib/prism/node.rb#12818 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#12845 + # source://prism//lib/prism/node.rb#12853 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#12823 + # source://prism//lib/prism/node.rb#12831 sig { returns(Prism::Location) } def operator_loc; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#12818 + # source://prism//lib/prism/node.rb#12826 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#12831 + # source://prism//lib/prism/node.rb#12839 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#12855 + # source://prism//lib/prism/node.rb#12863 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#12836 + # source://prism//lib/prism/node.rb#12844 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#12860 + # source://prism//lib/prism/node.rb#12868 def type; end end end @@ -24121,13 +24063,13 @@ end # foo # ^^^ # -# source://prism//lib/prism/node.rb#12880 +# source://prism//lib/prism/node.rb#12888 class Prism::LocalVariableReadNode < ::Prism::Node # Initialize a new LocalVariableReadNode node. # # @return [LocalVariableReadNode] a new instance of LocalVariableReadNode # - # source://prism//lib/prism/node.rb#12882 + # source://prism//lib/prism/node.rb#12890 sig do params( source: Prism::Source, @@ -24143,36 +24085,36 @@ class Prism::LocalVariableReadNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#12967 + # source://prism//lib/prism/node.rb#12975 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12892 + # source://prism//lib/prism/node.rb#12900 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#12897 + # source://prism//lib/prism/node.rb#12905 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12913 + # source://prism//lib/prism/node.rb#12921 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12908 + # source://prism//lib/prism/node.rb#12916 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?depth: Integer) -> LocalVariableReadNode # - # source://prism//lib/prism/node.rb#12918 + # source://prism//lib/prism/node.rb#12926 sig do params( node_id: Integer, @@ -24187,13 +24129,13 @@ class Prism::LocalVariableReadNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#12923 + # source://prism//lib/prism/node.rb#12931 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, depth: Integer } # - # source://prism//lib/prism/node.rb#12926 + # source://prism//lib/prism/node.rb#12934 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -24205,13 +24147,13 @@ 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#12948 + # source://prism//lib/prism/node.rb#12956 sig { returns(Integer) } def depth; end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#12902 + # source://prism//lib/prism/node.rb#12910 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -24219,7 +24161,7 @@ class Prism::LocalVariableReadNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#12951 + # source://prism//lib/prism/node.rb#12959 sig { override.returns(String) } def inspect; end @@ -24233,20 +24175,20 @@ class Prism::LocalVariableReadNode < ::Prism::Node # # _1 # name `:_1` # - # source://prism//lib/prism/node.rb#12939 + # source://prism//lib/prism/node.rb#12947 sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#12956 + # source://prism//lib/prism/node.rb#12964 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#12961 + # source://prism//lib/prism/node.rb#12969 def type; end end end @@ -24259,13 +24201,13 @@ end # foo => baz # ^^^ # -# source://prism//lib/prism/node.rb#12981 +# source://prism//lib/prism/node.rb#12989 class Prism::LocalVariableTargetNode < ::Prism::Node # Initialize a new LocalVariableTargetNode node. # # @return [LocalVariableTargetNode] a new instance of LocalVariableTargetNode # - # source://prism//lib/prism/node.rb#12983 + # source://prism//lib/prism/node.rb#12991 sig do params( source: Prism::Source, @@ -24281,36 +24223,36 @@ class Prism::LocalVariableTargetNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#13054 + # source://prism//lib/prism/node.rb#13062 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12993 + # source://prism//lib/prism/node.rb#13001 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#12998 + # source://prism//lib/prism/node.rb#13006 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13014 + # source://prism//lib/prism/node.rb#13022 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13009 + # source://prism//lib/prism/node.rb#13017 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?depth: Integer) -> LocalVariableTargetNode # - # source://prism//lib/prism/node.rb#13019 + # source://prism//lib/prism/node.rb#13027 sig do params( node_id: Integer, @@ -24325,25 +24267,25 @@ class Prism::LocalVariableTargetNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#13024 + # source://prism//lib/prism/node.rb#13032 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, depth: Integer } # - # source://prism//lib/prism/node.rb#13027 + # source://prism//lib/prism/node.rb#13035 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#13035 + # source://prism//lib/prism/node.rb#13043 sig { returns(Integer) } def depth; end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#13003 + # source://prism//lib/prism/node.rb#13011 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -24351,26 +24293,26 @@ class Prism::LocalVariableTargetNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#13038 + # source://prism//lib/prism/node.rb#13046 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#13032 + # source://prism//lib/prism/node.rb#13040 sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#13043 + # source://prism//lib/prism/node.rb#13051 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#13048 + # source://prism//lib/prism/node.rb#13056 def type; end end end @@ -24380,13 +24322,13 @@ end # foo = 1 # ^^^^^^^ # -# source://prism//lib/prism/node.rb#13065 +# source://prism//lib/prism/node.rb#13073 class Prism::LocalVariableWriteNode < ::Prism::Node # Initialize a new LocalVariableWriteNode node. # # @return [LocalVariableWriteNode] a new instance of LocalVariableWriteNode # - # source://prism//lib/prism/node.rb#13067 + # source://prism//lib/prism/node.rb#13075 sig do params( source: Prism::Source, @@ -24405,36 +24347,36 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#13202 + # source://prism//lib/prism/node.rb#13210 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13080 + # source://prism//lib/prism/node.rb#13088 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#13085 + # source://prism//lib/prism/node.rb#13093 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13102 + # source://prism//lib/prism/node.rb#13110 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13097 + # source://prism//lib/prism/node.rb#13105 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?depth: Integer, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location) -> LocalVariableWriteNode # - # source://prism//lib/prism/node.rb#13107 + # source://prism//lib/prism/node.rb#13115 sig do params( node_id: Integer, @@ -24452,13 +24394,13 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#13112 + # source://prism//lib/prism/node.rb#13120 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, depth: Integer, name_loc: Location, value: Prism::node, operator_loc: Location } # - # source://prism//lib/prism/node.rb#13115 + # source://prism//lib/prism/node.rb#13123 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -24470,7 +24412,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#13133 + # source://prism//lib/prism/node.rb#13141 sig { returns(Integer) } def depth; end @@ -24478,7 +24420,7 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # # @yield [value] # - # source://prism//lib/prism/node.rb#13090 + # source://prism//lib/prism/node.rb#13098 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -24486,7 +24428,7 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#13186 + # source://prism//lib/prism/node.rb#13194 sig { override.returns(String) } def inspect; end @@ -24496,7 +24438,7 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # # abc = 123 # name `:abc` # - # source://prism//lib/prism/node.rb#13124 + # source://prism//lib/prism/node.rb#13132 sig { returns(Symbol) } def name; end @@ -24505,13 +24447,13 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # foo = :bar # ^^^ # - # source://prism//lib/prism/node.rb#13139 + # source://prism//lib/prism/node.rb#13147 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#13181 + # source://prism//lib/prism/node.rb#13189 sig { returns(String) } def operator; end @@ -24520,25 +24462,25 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # x = :y # ^ # - # source://prism//lib/prism/node.rb#13168 + # source://prism//lib/prism/node.rb#13176 sig { returns(Prism::Location) } def operator_loc; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#13147 + # source://prism//lib/prism/node.rb#13155 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#13176 + # source://prism//lib/prism/node.rb#13184 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#13191 + # source://prism//lib/prism/node.rb#13199 sig { override.returns(Symbol) } def type; end @@ -24554,34 +24496,34 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # # foo = foo # - # source://prism//lib/prism/node.rb#13162 + # source://prism//lib/prism/node.rb#13170 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#13196 + # source://prism//lib/prism/node.rb#13204 def type; end end end # This represents a location in the source. # -# source://prism//lib/prism/parse_result.rb#278 +# source://prism//lib/prism/parse_result.rb#287 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#293 + # source://prism//lib/prism/parse_result.rb#302 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#481 + # source://prism//lib/prism/parse_result.rb#490 sig { params(other: T.untyped).returns(T::Boolean) } def ==(other); end @@ -24589,14 +24531,14 @@ 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#500 + # source://prism//lib/prism/parse_result.rb#509 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#466 + # source://prism//lib/prism/parse_result.rb#475 sig do params( cache: T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer)) @@ -24607,7 +24549,7 @@ class Prism::Location # 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#402 + # source://prism//lib/prism/parse_result.rb#411 sig do params( cache: T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer)) @@ -24618,7 +24560,7 @@ class Prism::Location # The start column in code units using the given cache to fetch or calculate # the value. # - # source://prism//lib/prism/parse_result.rb#442 + # source://prism//lib/prism/parse_result.rb#451 sig do params( cache: T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer)) @@ -24629,7 +24571,7 @@ class Prism::Location # 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#380 + # source://prism//lib/prism/parse_result.rb#389 sig do params( cache: T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer)) @@ -24639,78 +24581,78 @@ class Prism::Location # Returns a new location that is the result of chopping off the last byte. # - # source://prism//lib/prism/parse_result.rb#339 + # source://prism//lib/prism/parse_result.rb#348 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#329 + # source://prism//lib/prism/parse_result.rb#338 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#334 + # source://prism//lib/prism/parse_result.rb#343 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#471 + # source://prism//lib/prism/parse_result.rb#480 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#454 + # source://prism//lib/prism/parse_result.rb#463 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#391 + # source://prism//lib/prism/parse_result.rb#400 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#460 + # source://prism//lib/prism/parse_result.rb#469 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#396 + # source://prism//lib/prism/parse_result.rb#405 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#448 + # source://prism//lib/prism/parse_result.rb#457 sig { returns(Integer) } def end_column; end # The line number where this location ends. # - # source://prism//lib/prism/parse_result.rb#418 + # source://prism//lib/prism/parse_result.rb#427 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#385 + # source://prism//lib/prism/parse_result.rb#394 sig { returns(Integer) } def end_offset; end # Returns a string representation of this location. # - # source://prism//lib/prism/parse_result.rb#344 + # source://prism//lib/prism/parse_result.rb#353 sig { returns(String) } def inspect; end @@ -24718,38 +24660,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#490 + # source://prism//lib/prism/parse_result.rb#499 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#312 + # source://prism//lib/prism/parse_result.rb#321 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#307 + # source://prism//lib/prism/parse_result.rb#316 sig { returns(T::Array[Prism::Comment]) } def leading_comments; end # The length of this location in bytes. # - # source://prism//lib/prism/parse_result.rb#289 + # source://prism//lib/prism/parse_result.rb#298 sig { returns(Integer) } def length; end # Implement the pretty print interface for Location. # - # source://prism//lib/prism/parse_result.rb#476 + # source://prism//lib/prism/parse_result.rb#485 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#354 + # source://prism//lib/prism/parse_result.rb#363 sig { returns(String) } def slice; end @@ -24757,78 +24699,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#361 + # source://prism//lib/prism/parse_result.rb#370 def slice_lines; end # Returns all of the lines of the source code associated with this location. # - # source://prism//lib/prism/parse_result.rb#349 + # source://prism//lib/prism/parse_result.rb#358 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#430 + # source://prism//lib/prism/parse_result.rb#439 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#369 + # source://prism//lib/prism/parse_result.rb#378 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#436 + # source://prism//lib/prism/parse_result.rb#445 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#374 + # source://prism//lib/prism/parse_result.rb#383 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#424 + # source://prism//lib/prism/parse_result.rb#433 sig { returns(Integer) } def start_column; end # The line number where this location starts. # - # source://prism//lib/prism/parse_result.rb#407 + # source://prism//lib/prism/parse_result.rb#416 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#412 + # source://prism//lib/prism/parse_result.rb#421 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#286 + # source://prism//lib/prism/parse_result.rb#295 sig { returns(Integer) } def start_offset; end # Attach a comment to the trailing comments of this location. # - # source://prism//lib/prism/parse_result.rb#323 + # source://prism//lib/prism/parse_result.rb#332 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#318 + # source://prism//lib/prism/parse_result.rb#327 sig { returns(T::Array[Prism::Comment]) } def trailing_comments; end @@ -24837,66 +24779,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#281 + # source://prism//lib/prism/parse_result.rb#290 sig { returns(Prism::Source) } def source; end end # Flags for while and until loop nodes. # -# source://prism//lib/prism/node.rb#19850 +# source://prism//lib/prism/node.rb#19858 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#19852 +# source://prism//lib/prism/node.rb#19860 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#562 +# source://prism//lib/prism/parse_result.rb#571 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#570 + # source://prism//lib/prism/parse_result.rb#579 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#586 + # source://prism//lib/prism/parse_result.rb#595 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#591 + # source://prism//lib/prism/parse_result.rb#600 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#576 + # source://prism//lib/prism/parse_result.rb#585 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#564 + # source://prism//lib/prism/parse_result.rb#573 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#581 + # source://prism//lib/prism/parse_result.rb#590 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#567 + # source://prism//lib/prism/parse_result.rb#576 sig { returns(Prism::Location) } def value_loc; end end @@ -24906,7 +24848,7 @@ end # if /foo/i then end # ^^^^^^ # -# source://prism//lib/prism/node.rb#13216 +# source://prism//lib/prism/node.rb#13224 class Prism::MatchLastLineNode < ::Prism::Node include ::Prism::RegularExpressionOptions @@ -24914,7 +24856,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [MatchLastLineNode] a new instance of MatchLastLineNode # - # source://prism//lib/prism/node.rb#13218 + # source://prism//lib/prism/node.rb#13226 sig do params( source: Prism::Source, @@ -24932,12 +24874,12 @@ class Prism::MatchLastLineNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#13397 + # source://prism//lib/prism/node.rb#13405 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13230 + # source://prism//lib/prism/node.rb#13238 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -24945,55 +24887,55 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#13294 + # source://prism//lib/prism/node.rb#13302 sig { returns(T::Boolean) } def ascii_8bit?; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#13235 + # source://prism//lib/prism/node.rb#13243 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#13376 + # source://prism//lib/prism/node.rb#13384 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#13350 + # source://prism//lib/prism/node.rb#13358 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13251 + # source://prism//lib/prism/node.rb#13259 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13246 + # source://prism//lib/prism/node.rb#13254 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def content: () -> String # - # source://prism//lib/prism/node.rb#13371 + # source://prism//lib/prism/node.rb#13379 sig { returns(String) } def content; end # attr_reader content_loc: Location # - # source://prism//lib/prism/node.rb#13337 + # source://prism//lib/prism/node.rb#13345 sig { returns(Prism::Location) } def content_loc; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String) -> MatchLastLineNode # - # source://prism//lib/prism/node.rb#13256 + # source://prism//lib/prism/node.rb#13264 sig do params( node_id: Integer, @@ -25010,26 +24952,26 @@ class Prism::MatchLastLineNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#13261 + # source://prism//lib/prism/node.rb#13269 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String } # - # source://prism//lib/prism/node.rb#13264 + # source://prism//lib/prism/node.rb#13272 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#13240 + # source://prism//lib/prism/node.rb#13248 def each_child_node; end # def euc_jp?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#13289 + # source://prism//lib/prism/node.rb#13297 sig { returns(T::Boolean) } def euc_jp?; end @@ -25037,7 +24979,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#13274 + # source://prism//lib/prism/node.rb#13282 sig { returns(T::Boolean) } def extended?; end @@ -25048,7 +24990,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#13314 + # source://prism//lib/prism/node.rb#13322 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -25056,7 +24998,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#13319 + # source://prism//lib/prism/node.rb#13327 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end @@ -25064,7 +25006,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#13309 + # source://prism//lib/prism/node.rb#13317 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -25072,13 +25014,13 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#13269 + # source://prism//lib/prism/node.rb#13277 sig { returns(T::Boolean) } def ignore_case?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#13381 + # source://prism//lib/prism/node.rb#13389 sig { override.returns(String) } def inspect; end @@ -25086,7 +25028,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#13279 + # source://prism//lib/prism/node.rb#13287 sig { returns(T::Boolean) } def multi_line?; end @@ -25094,19 +25036,19 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#13284 + # source://prism//lib/prism/node.rb#13292 sig { returns(T::Boolean) } def once?; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#13366 + # source://prism//lib/prism/node.rb#13374 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#13324 + # source://prism//lib/prism/node.rb#13332 sig { returns(Prism::Location) } def opening_loc; end @@ -25116,30 +25058,30 @@ class Prism::MatchLastLineNode < ::Prism::Node # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#13358 + # source://prism//lib/prism/node.rb#13366 def save_closing_loc(repository); end # Save the content_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#13345 + # source://prism//lib/prism/node.rb#13353 def save_content_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#13332 + # source://prism//lib/prism/node.rb#13340 def save_opening_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#13386 + # source://prism//lib/prism/node.rb#13394 sig { override.returns(Symbol) } def type; end # attr_reader unescaped: String # - # source://prism//lib/prism/node.rb#13363 + # source://prism//lib/prism/node.rb#13371 sig { returns(String) } def unescaped; end @@ -25147,7 +25089,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#13304 + # source://prism//lib/prism/node.rb#13312 sig { returns(T::Boolean) } def utf_8?; end @@ -25155,14 +25097,14 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#13299 + # source://prism//lib/prism/node.rb#13307 sig { returns(T::Boolean) } def windows_31j?; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#13391 + # source://prism//lib/prism/node.rb#13399 def type; end end end @@ -25172,13 +25114,13 @@ end # foo in bar # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#13411 +# source://prism//lib/prism/node.rb#13419 class Prism::MatchPredicateNode < ::Prism::Node # Initialize a new MatchPredicateNode node. # # @return [MatchPredicateNode] a new instance of MatchPredicateNode # - # source://prism//lib/prism/node.rb#13413 + # source://prism//lib/prism/node.rb#13421 sig do params( source: Prism::Source, @@ -25195,36 +25137,36 @@ class Prism::MatchPredicateNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#13505 + # source://prism//lib/prism/node.rb#13513 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13424 + # source://prism//lib/prism/node.rb#13432 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#13429 + # source://prism//lib/prism/node.rb#13437 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13447 + # source://prism//lib/prism/node.rb#13455 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13442 + # source://prism//lib/prism/node.rb#13450 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Prism::node, ?pattern: Prism::node, ?operator_loc: Location) -> MatchPredicateNode # - # source://prism//lib/prism/node.rb#13452 + # source://prism//lib/prism/node.rb#13460 sig do params( node_id: Integer, @@ -25240,13 +25182,13 @@ class Prism::MatchPredicateNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#13457 + # source://prism//lib/prism/node.rb#13465 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Prism::node, pattern: Prism::node, operator_loc: Location } # - # source://prism//lib/prism/node.rb#13460 + # source://prism//lib/prism/node.rb#13468 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -25254,7 +25196,7 @@ class Prism::MatchPredicateNode < ::Prism::Node # # @yield [value] # - # source://prism//lib/prism/node.rb#13434 + # source://prism//lib/prism/node.rb#13442 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -25262,50 +25204,50 @@ class Prism::MatchPredicateNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#13489 + # source://prism//lib/prism/node.rb#13497 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#13484 + # source://prism//lib/prism/node.rb#13492 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#13471 + # source://prism//lib/prism/node.rb#13479 sig { returns(Prism::Location) } def operator_loc; end # attr_reader pattern: Prism::node # - # source://prism//lib/prism/node.rb#13468 + # source://prism//lib/prism/node.rb#13476 sig { returns(Prism::Node) } def pattern; end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#13479 + # source://prism//lib/prism/node.rb#13487 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#13494 + # source://prism//lib/prism/node.rb#13502 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#13465 + # source://prism//lib/prism/node.rb#13473 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#13499 + # source://prism//lib/prism/node.rb#13507 def type; end end end @@ -25315,13 +25257,13 @@ end # foo => bar # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#13517 +# source://prism//lib/prism/node.rb#13525 class Prism::MatchRequiredNode < ::Prism::Node # Initialize a new MatchRequiredNode node. # # @return [MatchRequiredNode] a new instance of MatchRequiredNode # - # source://prism//lib/prism/node.rb#13519 + # source://prism//lib/prism/node.rb#13527 sig do params( source: Prism::Source, @@ -25338,36 +25280,36 @@ class Prism::MatchRequiredNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#13659 + # source://prism//lib/prism/node.rb#13667 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13530 + # source://prism//lib/prism/node.rb#13538 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#13535 + # source://prism//lib/prism/node.rb#13543 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13553 + # source://prism//lib/prism/node.rb#13561 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13548 + # source://prism//lib/prism/node.rb#13556 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Prism::node, ?pattern: Prism::node, ?operator_loc: Location) -> MatchRequiredNode # - # source://prism//lib/prism/node.rb#13558 + # source://prism//lib/prism/node.rb#13566 sig do params( node_id: Integer, @@ -25383,13 +25325,13 @@ class Prism::MatchRequiredNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#13563 + # source://prism//lib/prism/node.rb#13571 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Prism::node, pattern: Prism::node, operator_loc: Location } # - # source://prism//lib/prism/node.rb#13566 + # source://prism//lib/prism/node.rb#13574 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -25397,7 +25339,7 @@ class Prism::MatchRequiredNode < ::Prism::Node # # @yield [value] # - # source://prism//lib/prism/node.rb#13540 + # source://prism//lib/prism/node.rb#13548 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -25405,13 +25347,13 @@ class Prism::MatchRequiredNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#13643 + # source://prism//lib/prism/node.rb#13651 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#13638 + # source://prism//lib/prism/node.rb#13646 sig { returns(String) } def operator; end @@ -25420,7 +25362,7 @@ class Prism::MatchRequiredNode < ::Prism::Node # foo => bar # ^^ # - # source://prism//lib/prism/node.rb#13625 + # source://prism//lib/prism/node.rb#13633 sig { returns(Prism::Location) } def operator_loc; end @@ -25468,19 +25410,19 @@ class Prism::MatchRequiredNode < ::Prism::Node # # foo => CONST # - # source://prism//lib/prism/node.rb#13619 + # source://prism//lib/prism/node.rb#13627 sig { returns(Prism::Node) } def pattern; end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#13633 + # source://prism//lib/prism/node.rb#13641 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#13648 + # source://prism//lib/prism/node.rb#13656 sig { override.returns(Symbol) } def type; end @@ -25489,14 +25431,14 @@ class Prism::MatchRequiredNode < ::Prism::Node # foo => bar # ^^^ # - # source://prism//lib/prism/node.rb#13574 + # source://prism//lib/prism/node.rb#13582 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#13653 + # source://prism//lib/prism/node.rb#13661 def type; end end end @@ -25506,13 +25448,13 @@ end # /(?bar)/ =~ baz # ^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#13671 +# source://prism//lib/prism/node.rb#13679 class Prism::MatchWriteNode < ::Prism::Node # Initialize a new MatchWriteNode node. # # @return [MatchWriteNode] a new instance of MatchWriteNode # - # source://prism//lib/prism/node.rb#13673 + # source://prism//lib/prism/node.rb#13681 sig do params( source: Prism::Source, @@ -25528,42 +25470,42 @@ class Prism::MatchWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#13746 + # source://prism//lib/prism/node.rb#13754 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13683 + # source://prism//lib/prism/node.rb#13691 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader call: CallNode # - # source://prism//lib/prism/node.rb#13724 + # source://prism//lib/prism/node.rb#13732 sig { returns(Prism::CallNode) } def call; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#13688 + # source://prism//lib/prism/node.rb#13696 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13706 + # source://prism//lib/prism/node.rb#13714 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13701 + # source://prism//lib/prism/node.rb#13709 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?call: CallNode, ?targets: Array[LocalVariableTargetNode]) -> MatchWriteNode # - # source://prism//lib/prism/node.rb#13711 + # source://prism//lib/prism/node.rb#13719 sig do params( node_id: Integer, @@ -25578,13 +25520,13 @@ class Prism::MatchWriteNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#13716 + # source://prism//lib/prism/node.rb#13724 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, call: CallNode, targets: Array[LocalVariableTargetNode] } # - # source://prism//lib/prism/node.rb#13719 + # source://prism//lib/prism/node.rb#13727 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -25592,7 +25534,7 @@ class Prism::MatchWriteNode < ::Prism::Node # # @yield [call] # - # source://prism//lib/prism/node.rb#13693 + # source://prism//lib/prism/node.rb#13701 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -25600,94 +25542,94 @@ class Prism::MatchWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#13730 + # source://prism//lib/prism/node.rb#13738 sig { override.returns(String) } def inspect; end # attr_reader targets: Array[LocalVariableTargetNode] # - # source://prism//lib/prism/node.rb#13727 + # source://prism//lib/prism/node.rb#13735 sig { returns(T::Array[Prism::LocalVariableTargetNode]) } def targets; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#13735 + # source://prism//lib/prism/node.rb#13743 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#13740 + # source://prism//lib/prism/node.rb#13748 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#13755 +# source://prism//lib/prism/node.rb#13763 class Prism::MissingNode < ::Prism::Node # Initialize a new MissingNode node. # # @return [MissingNode] a new instance of MissingNode # - # source://prism//lib/prism/node.rb#13757 + # source://prism//lib/prism/node.rb#13765 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#13820 + # source://prism//lib/prism/node.rb#13828 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13765 + # source://prism//lib/prism/node.rb#13773 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#13770 + # source://prism//lib/prism/node.rb#13778 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13786 + # source://prism//lib/prism/node.rb#13794 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13781 + # source://prism//lib/prism/node.rb#13789 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> MissingNode # - # source://prism//lib/prism/node.rb#13791 + # source://prism//lib/prism/node.rb#13799 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[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#13796 + # source://prism//lib/prism/node.rb#13804 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#13799 + # source://prism//lib/prism/node.rb#13807 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#13775 + # source://prism//lib/prism/node.rb#13783 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -25695,20 +25637,20 @@ class Prism::MissingNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#13804 + # source://prism//lib/prism/node.rb#13812 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#13809 + # source://prism//lib/prism/node.rb#13817 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#13814 + # source://prism//lib/prism/node.rb#13822 def type; end end end @@ -25718,13 +25660,13 @@ end # module Foo end # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#13829 +# source://prism//lib/prism/node.rb#13837 class Prism::ModuleNode < ::Prism::Node # Initialize a new ModuleNode node. # # @return [ModuleNode] a new instance of ModuleNode # - # source://prism//lib/prism/node.rb#13831 + # source://prism//lib/prism/node.rb#13839 sig do params( source: Prism::Source, @@ -25744,48 +25686,48 @@ class Prism::ModuleNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#13953 + # source://prism//lib/prism/node.rb#13961 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13845 + # source://prism//lib/prism/node.rb#13853 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader body: StatementsNode | BeginNode | nil # - # source://prism//lib/prism/node.rb#13908 + # source://prism//lib/prism/node.rb#13916 sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } def body; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#13850 + # source://prism//lib/prism/node.rb#13858 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13871 + # source://prism//lib/prism/node.rb#13879 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13863 + # source://prism//lib/prism/node.rb#13871 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # attr_reader constant_path: ConstantReadNode | ConstantPathNode | MissingNode # - # source://prism//lib/prism/node.rb#13905 + # source://prism//lib/prism/node.rb#13913 sig { returns(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::MissingNode)) } def constant_path; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?module_keyword_loc: Location, ?constant_path: ConstantReadNode | ConstantPathNode | MissingNode, ?body: StatementsNode | BeginNode | nil, ?end_keyword_loc: Location, ?name: Symbol) -> ModuleNode # - # source://prism//lib/prism/node.rb#13876 + # source://prism//lib/prism/node.rb#13884 sig do params( node_id: Integer, @@ -25804,13 +25746,13 @@ class Prism::ModuleNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#13881 + # source://prism//lib/prism/node.rb#13889 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], module_keyword_loc: Location, constant_path: ConstantReadNode | ConstantPathNode | MissingNode, body: StatementsNode | BeginNode | nil, end_keyword_loc: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#13884 + # source://prism//lib/prism/node.rb#13892 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -25818,18 +25760,18 @@ class Prism::ModuleNode < ::Prism::Node # # @yield [constant_path] # - # source://prism//lib/prism/node.rb#13855 + # source://prism//lib/prism/node.rb#13863 def each_child_node; end # def end_keyword: () -> String # - # source://prism//lib/prism/node.rb#13932 + # source://prism//lib/prism/node.rb#13940 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism//lib/prism/node.rb#13911 + # source://prism//lib/prism/node.rb#13919 sig { returns(Prism::Location) } def end_keyword_loc; end @@ -25838,56 +25780,56 @@ class Prism::ModuleNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#13937 + # source://prism//lib/prism/node.rb#13945 sig { override.returns(String) } def inspect; end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#13889 + # source://prism//lib/prism/node.rb#13897 sig { returns(T::Array[Symbol]) } def locals; end # def module_keyword: () -> String # - # source://prism//lib/prism/node.rb#13927 + # source://prism//lib/prism/node.rb#13935 sig { returns(String) } def module_keyword; end # attr_reader module_keyword_loc: Location # - # source://prism//lib/prism/node.rb#13892 + # source://prism//lib/prism/node.rb#13900 sig { returns(Prism::Location) } def module_keyword_loc; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#13924 + # source://prism//lib/prism/node.rb#13932 sig { returns(Symbol) } def name; end # Save the end_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#13919 + # source://prism//lib/prism/node.rb#13927 def save_end_keyword_loc(repository); end # Save the module_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#13900 + # source://prism//lib/prism/node.rb#13908 def save_module_keyword_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#13942 + # source://prism//lib/prism/node.rb#13950 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#13947 + # source://prism//lib/prism/node.rb#13955 def type; end end end @@ -25902,13 +25844,13 @@ end # for a, b in [[1, 2], [3, 4]] # ^^^^ # -# source://prism//lib/prism/node.rb#13974 +# source://prism//lib/prism/node.rb#13982 class Prism::MultiTargetNode < ::Prism::Node # Initialize a new MultiTargetNode node. # # @return [MultiTargetNode] a new instance of MultiTargetNode # - # source://prism//lib/prism/node.rb#13976 + # source://prism//lib/prism/node.rb#13984 sig do params( source: Prism::Source, @@ -25927,36 +25869,36 @@ class Prism::MultiTargetNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#14138 + # source://prism//lib/prism/node.rb#14146 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13989 + # source://prism//lib/prism/node.rb#13997 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#13994 + # source://prism//lib/prism/node.rb#14002 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14017 + # source://prism//lib/prism/node.rb#14025 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14008 + # source://prism//lib/prism/node.rb#14016 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], ?rest: ImplicitRestNode | SplatNode | nil, ?rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], ?lparen_loc: Location?, ?rparen_loc: Location?) -> MultiTargetNode # - # source://prism//lib/prism/node.rb#14022 + # source://prism//lib/prism/node.rb#14030 sig do params( node_id: Integer, @@ -25974,13 +25916,13 @@ class Prism::MultiTargetNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#14027 + # source://prism//lib/prism/node.rb#14035 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], rest: ImplicitRestNode | SplatNode | nil, rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], lparen_loc: Location?, rparen_loc: Location? } # - # source://prism//lib/prism/node.rb#14030 + # source://prism//lib/prism/node.rb#14038 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -25988,7 +25930,7 @@ class Prism::MultiTargetNode < ::Prism::Node # # @yield [rest] # - # source://prism//lib/prism/node.rb#13999 + # source://prism//lib/prism/node.rb#14007 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -25996,7 +25938,7 @@ class Prism::MultiTargetNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#14122 + # source://prism//lib/prism/node.rb#14130 sig { override.returns(String) } def inspect; end @@ -26010,7 +25952,7 @@ class Prism::MultiTargetNode < ::Prism::Node # a, (b, c) = 1, 2, 3, 4, 5 # ^^^^ # - # source://prism//lib/prism/node.rb#14043 + # source://prism//lib/prism/node.rb#14051 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 @@ -26018,7 +25960,7 @@ class Prism::MultiTargetNode < ::Prism::Node # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#14112 + # source://prism//lib/prism/node.rb#14120 sig { returns(T.nilable(String)) } def lparen; end @@ -26027,7 +25969,7 @@ class Prism::MultiTargetNode < ::Prism::Node # a, (b, c) = 1, 2, 3 # ^ # - # source://prism//lib/prism/node.rb#14071 + # source://prism//lib/prism/node.rb#14079 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end @@ -26046,7 +25988,7 @@ class Prism::MultiTargetNode < ::Prism::Node # a, (b,) = 1, 2, 3, 4 # ^ # - # source://prism//lib/prism/node.rb#14059 + # source://prism//lib/prism/node.rb#14067 sig { returns(T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode))) } def rest; end @@ -26055,7 +25997,7 @@ class Prism::MultiTargetNode < ::Prism::Node # a, (*, b, c) = 1, 2, 3, 4, 5 # ^^^^ # - # source://prism//lib/prism/node.rb#14065 + # source://prism//lib/prism/node.rb#14073 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 @@ -26063,7 +26005,7 @@ class Prism::MultiTargetNode < ::Prism::Node # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#14117 + # source://prism//lib/prism/node.rb#14125 sig { returns(T.nilable(String)) } def rparen; end @@ -26072,32 +26014,32 @@ class Prism::MultiTargetNode < ::Prism::Node # a, (b, c) = 1, 2, 3 # ^ # - # source://prism//lib/prism/node.rb#14093 + # source://prism//lib/prism/node.rb#14101 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end # Save the lparen_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#14085 + # source://prism//lib/prism/node.rb#14093 def save_lparen_loc(repository); end # Save the rparen_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#14107 + # source://prism//lib/prism/node.rb#14115 def save_rparen_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#14127 + # source://prism//lib/prism/node.rb#14135 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#14132 + # source://prism//lib/prism/node.rb#14140 def type; end end end @@ -26107,13 +26049,13 @@ end # a, b, c = 1, 2, 3 # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#14154 +# source://prism//lib/prism/node.rb#14162 class Prism::MultiWriteNode < ::Prism::Node # Initialize a new MultiWriteNode node. # # @return [MultiWriteNode] a new instance of MultiWriteNode # - # source://prism//lib/prism/node.rb#14156 + # source://prism//lib/prism/node.rb#14164 sig do params( source: Prism::Source, @@ -26134,36 +26076,36 @@ class Prism::MultiWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#14349 + # source://prism//lib/prism/node.rb#14357 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14171 + # source://prism//lib/prism/node.rb#14179 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#14176 + # source://prism//lib/prism/node.rb#14184 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14201 + # source://prism//lib/prism/node.rb#14209 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14191 + # source://prism//lib/prism/node.rb#14199 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode], ?rest: ImplicitRestNode | SplatNode | nil, ?rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode], ?lparen_loc: Location?, ?rparen_loc: Location?, ?operator_loc: Location, ?value: Prism::node) -> MultiWriteNode # - # source://prism//lib/prism/node.rb#14206 + # source://prism//lib/prism/node.rb#14214 sig do params( node_id: Integer, @@ -26183,13 +26125,13 @@ class Prism::MultiWriteNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#14211 + # source://prism//lib/prism/node.rb#14219 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode], rest: ImplicitRestNode | SplatNode | nil, rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode], lparen_loc: Location?, rparen_loc: Location?, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#14214 + # source://prism//lib/prism/node.rb#14222 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -26197,7 +26139,7 @@ class Prism::MultiWriteNode < ::Prism::Node # # @yield [rest] # - # source://prism//lib/prism/node.rb#14181 + # source://prism//lib/prism/node.rb#14189 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -26205,7 +26147,7 @@ class Prism::MultiWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#14333 + # source://prism//lib/prism/node.rb#14341 sig { override.returns(String) } def inspect; end @@ -26219,7 +26161,7 @@ class Prism::MultiWriteNode < ::Prism::Node # a, b, c = 1, 2, 3, 4, 5 # ^^^^^^^ # - # source://prism//lib/prism/node.rb#14227 + # source://prism//lib/prism/node.rb#14235 sig do returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)]) end @@ -26227,7 +26169,7 @@ class Prism::MultiWriteNode < ::Prism::Node # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#14318 + # source://prism//lib/prism/node.rb#14326 sig { returns(T.nilable(String)) } def lparen; end @@ -26236,13 +26178,13 @@ class Prism::MultiWriteNode < ::Prism::Node # (a, b, c) = 1, 2, 3 # ^ # - # source://prism//lib/prism/node.rb#14255 + # source://prism//lib/prism/node.rb#14263 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#14328 + # source://prism//lib/prism/node.rb#14336 sig { returns(String) } def operator; end @@ -26251,7 +26193,7 @@ class Prism::MultiWriteNode < ::Prism::Node # a, b, c = 1, 2, 3 # ^ # - # source://prism//lib/prism/node.rb#14299 + # source://prism//lib/prism/node.rb#14307 sig { returns(Prism::Location) } def operator_loc; end @@ -26270,7 +26212,7 @@ class Prism::MultiWriteNode < ::Prism::Node # a, b, = 1, 2, 3, 4 # ^ # - # source://prism//lib/prism/node.rb#14243 + # source://prism//lib/prism/node.rb#14251 sig { returns(T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode))) } def rest; end @@ -26279,7 +26221,7 @@ class Prism::MultiWriteNode < ::Prism::Node # a, *, b, c = 1, 2, 3, 4, 5 # ^^^^ # - # source://prism//lib/prism/node.rb#14249 + # source://prism//lib/prism/node.rb#14257 sig do returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)]) end @@ -26287,7 +26229,7 @@ class Prism::MultiWriteNode < ::Prism::Node # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#14323 + # source://prism//lib/prism/node.rb#14331 sig { returns(T.nilable(String)) } def rparen; end @@ -26296,31 +26238,31 @@ class Prism::MultiWriteNode < ::Prism::Node # (a, b, c) = 1, 2, 3 # ^ # - # source://prism//lib/prism/node.rb#14277 + # source://prism//lib/prism/node.rb#14285 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end # Save the lparen_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#14269 + # source://prism//lib/prism/node.rb#14277 def save_lparen_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#14307 + # source://prism//lib/prism/node.rb#14315 def save_operator_loc(repository); end # Save the rparen_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#14291 + # source://prism//lib/prism/node.rb#14299 def save_rparen_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#14338 + # source://prism//lib/prism/node.rb#14346 sig { override.returns(Symbol) } def type; end @@ -26329,14 +26271,14 @@ class Prism::MultiWriteNode < ::Prism::Node # a, b, c = 1, 2, 3 # ^^^^^^^ # - # source://prism//lib/prism/node.rb#14315 + # source://prism//lib/prism/node.rb#14323 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#14343 + # source://prism//lib/prism/node.rb#14351 def type; end end end @@ -27108,13 +27050,13 @@ end # next 1 # ^^^^^^ # -# source://prism//lib/prism/node.rb#14367 +# source://prism//lib/prism/node.rb#14375 class Prism::NextNode < ::Prism::Node # Initialize a new NextNode node. # # @return [NextNode] a new instance of NextNode # - # source://prism//lib/prism/node.rb#14369 + # source://prism//lib/prism/node.rb#14377 sig do params( source: Prism::Source, @@ -27130,42 +27072,42 @@ class Prism::NextNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#14458 + # source://prism//lib/prism/node.rb#14466 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14379 + # source://prism//lib/prism/node.rb#14387 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#14421 + # source://prism//lib/prism/node.rb#14429 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#14384 + # source://prism//lib/prism/node.rb#14392 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14403 + # source://prism//lib/prism/node.rb#14411 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14396 + # source://prism//lib/prism/node.rb#14404 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?arguments: ArgumentsNode?, ?keyword_loc: Location) -> NextNode # - # source://prism//lib/prism/node.rb#14408 + # source://prism//lib/prism/node.rb#14416 sig do params( node_id: Integer, @@ -27180,13 +27122,13 @@ class Prism::NextNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#14413 + # source://prism//lib/prism/node.rb#14421 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, arguments: ArgumentsNode?, keyword_loc: Location } # - # source://prism//lib/prism/node.rb#14416 + # source://prism//lib/prism/node.rb#14424 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -27194,7 +27136,7 @@ class Prism::NextNode < ::Prism::Node # # @yield [arguments] # - # source://prism//lib/prism/node.rb#14389 + # source://prism//lib/prism/node.rb#14397 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -27202,38 +27144,38 @@ class Prism::NextNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#14442 + # source://prism//lib/prism/node.rb#14450 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#14437 + # source://prism//lib/prism/node.rb#14445 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#14424 + # source://prism//lib/prism/node.rb#14432 sig { returns(Prism::Location) } def keyword_loc; end # Save the keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#14432 + # source://prism//lib/prism/node.rb#14440 def save_keyword_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#14447 + # source://prism//lib/prism/node.rb#14455 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#14452 + # source://prism//lib/prism/node.rb#14460 def type; end end end @@ -27243,68 +27185,68 @@ end # nil # ^^^ # -# source://prism//lib/prism/node.rb#14469 +# source://prism//lib/prism/node.rb#14477 class Prism::NilNode < ::Prism::Node # Initialize a new NilNode node. # # @return [NilNode] a new instance of NilNode # - # source://prism//lib/prism/node.rb#14471 + # source://prism//lib/prism/node.rb#14479 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#14534 + # source://prism//lib/prism/node.rb#14542 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14479 + # source://prism//lib/prism/node.rb#14487 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#14484 + # source://prism//lib/prism/node.rb#14492 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14500 + # source://prism//lib/prism/node.rb#14508 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14495 + # source://prism//lib/prism/node.rb#14503 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> NilNode # - # source://prism//lib/prism/node.rb#14505 + # source://prism//lib/prism/node.rb#14513 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[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#14510 + # source://prism//lib/prism/node.rb#14518 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#14513 + # source://prism//lib/prism/node.rb#14521 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#14489 + # source://prism//lib/prism/node.rb#14497 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -27312,20 +27254,20 @@ class Prism::NilNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#14518 + # source://prism//lib/prism/node.rb#14526 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#14523 + # source://prism//lib/prism/node.rb#14531 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#14528 + # source://prism//lib/prism/node.rb#14536 def type; end end end @@ -27336,13 +27278,13 @@ end # ^^^^^ # end # -# source://prism//lib/prism/node.rb#14544 +# source://prism//lib/prism/node.rb#14552 class Prism::NoKeywordsParameterNode < ::Prism::Node # Initialize a new NoKeywordsParameterNode node. # # @return [NoKeywordsParameterNode] a new instance of NoKeywordsParameterNode # - # source://prism//lib/prism/node.rb#14546 + # source://prism//lib/prism/node.rb#14554 sig do params( source: Prism::Source, @@ -27358,36 +27300,36 @@ class Prism::NoKeywordsParameterNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#14647 + # source://prism//lib/prism/node.rb#14655 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14556 + # source://prism//lib/prism/node.rb#14564 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#14561 + # source://prism//lib/prism/node.rb#14569 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14577 + # source://prism//lib/prism/node.rb#14585 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14572 + # source://prism//lib/prism/node.rb#14580 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?operator_loc: Location, ?keyword_loc: Location) -> NoKeywordsParameterNode # - # source://prism//lib/prism/node.rb#14582 + # source://prism//lib/prism/node.rb#14590 sig do params( node_id: Integer, @@ -27402,19 +27344,19 @@ class Prism::NoKeywordsParameterNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#14587 + # source://prism//lib/prism/node.rb#14595 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, operator_loc: Location, keyword_loc: Location } # - # source://prism//lib/prism/node.rb#14590 + # source://prism//lib/prism/node.rb#14598 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#14566 + # source://prism//lib/prism/node.rb#14574 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -27422,56 +27364,56 @@ class Prism::NoKeywordsParameterNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#14631 + # source://prism//lib/prism/node.rb#14639 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#14626 + # source://prism//lib/prism/node.rb#14634 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#14608 + # source://prism//lib/prism/node.rb#14616 sig { returns(Prism::Location) } def keyword_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#14621 + # source://prism//lib/prism/node.rb#14629 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#14595 + # source://prism//lib/prism/node.rb#14603 sig { returns(Prism::Location) } def operator_loc; end # Save the keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#14616 + # source://prism//lib/prism/node.rb#14624 def save_keyword_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#14603 + # source://prism//lib/prism/node.rb#14611 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#14636 + # source://prism//lib/prism/node.rb#14644 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#14641 + # source://prism//lib/prism/node.rb#14649 def type; end end end @@ -27487,20 +27429,30 @@ class Prism::Node # # @raise [NoMethodError] # - # source://prism//lib/prism/node.rb#261 + # source://prism//lib/prism/node.rb#269 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 + # breadth-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#231 + # source://prism//lib/prism/node.rb#219 sig { params(block: T.proc.params(node: Prism::Node).returns(T::Boolean)).returns(T.nilable(Prism::Node)) } def breadth_first_search(&block); end + # Returns all of the nodes that match the given block when visited in a + # breadth-first search. This is useful for finding all nodes that match a + # particular condition. + # + # node.breadth_first_search_all { |node| node.is_a?(Prism::CallNode) } + # + # source://prism//lib/prism/node.rb#237 + sig { params(block: T.proc.params(node: Prism::Node).returns(T::Boolean)).returns(T::Array[Prism::Node]) } + def breadth_first_search_all(&block); end + # Delegates to the cached_end_code_units_column of the associated location # object. # @@ -27530,7 +27482,7 @@ class Prism::Node # # @raise [NoMethodError] # - # source://prism//lib/prism/node.rb#267 + # source://prism//lib/prism/node.rb#275 sig { abstract.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end @@ -27539,7 +27491,7 @@ class Prism::Node # # @raise [NoMethodError] # - # source://prism//lib/prism/node.rb#288 + # source://prism//lib/prism/node.rb#296 sig { abstract.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end @@ -27553,7 +27505,7 @@ class Prism::Node # # @raise [NoMethodError] # - # source://prism//lib/prism/node.rb#282 + # source://prism//lib/prism/node.rb#290 sig { abstract.returns(T::Array[Prism::Node]) } def compact_child_nodes; end @@ -27562,7 +27514,7 @@ class Prism::Node # # @raise [NoMethodError] # - # source://prism//lib/prism/node.rb#271 + # source://prism//lib/prism/node.rb#279 sig { abstract.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -27575,7 +27527,7 @@ class Prism::Node # # @raise [NoMethodError] # - # source://prism//lib/prism/node.rb#276 + # source://prism//lib/prism/node.rb#284 def each_child_node; end # Delegates to the end_character_column of the associated location object. @@ -27608,11 +27560,29 @@ class Prism::Node sig { abstract.returns(T::Array[Prism::Reflection::Field]) } def fields; end + # Returns the first node that matches the given block when visited in a + # breadth-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#229 + def find(&block); end + + # Returns all of the nodes that match the given block when visited in a + # breadth-first search. This is useful for finding all nodes that match a + # particular condition. + # + # node.breadth_first_search_all { |node| node.is_a?(Prism::CallNode) } + # + # source://prism//lib/prism/node.rb#248 + def find_all(&block); end + # Returns a string representation of the node. # # @raise [NoMethodError] # - # source://prism//lib/prism/node.rb#293 + # source://prism//lib/prism/node.rb#301 sig { abstract.returns(String) } def inspect; end @@ -27770,7 +27740,7 @@ class Prism::Node # # @raise [NoMethodError] # - # source://prism//lib/prism/node.rb#309 + # source://prism//lib/prism/node.rb#317 sig { abstract.returns(Symbol) } def type; end @@ -27798,7 +27768,7 @@ class Prism::Node # # @raise [NoMethodError] # - # source://prism//lib/prism/node.rb#245 + # source://prism//lib/prism/node.rb#253 def fields; end # Similar to #type, this method returns a symbol that you can use for @@ -27808,26 +27778,26 @@ class Prism::Node # # @raise [NoMethodError] # - # source://prism//lib/prism/node.rb#317 + # source://prism//lib/prism/node.rb#325 def type; end end end # The flags that are common to all nodes. # -# source://prism//lib/prism/node.rb#19949 +# source://prism//lib/prism/node.rb#19957 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#19952 +# source://prism//lib/prism/node.rb#19960 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#19956 +# source://prism//lib/prism/node.rb#19964 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. @@ -27835,13 +27805,13 @@ Prism::NodeFlags::STATIC_LITERAL = T.let(T.unsafe(nil), Integer) # -> { _1 + _2 } # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#14658 +# source://prism//lib/prism/node.rb#14666 class Prism::NumberedParametersNode < ::Prism::Node # Initialize a new NumberedParametersNode node. # # @return [NumberedParametersNode] a new instance of NumberedParametersNode # - # source://prism//lib/prism/node.rb#14660 + # source://prism//lib/prism/node.rb#14668 sig do params( source: Prism::Source, @@ -27856,36 +27826,36 @@ class Prism::NumberedParametersNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#14727 + # source://prism//lib/prism/node.rb#14735 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14669 + # source://prism//lib/prism/node.rb#14677 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#14674 + # source://prism//lib/prism/node.rb#14682 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14690 + # source://prism//lib/prism/node.rb#14698 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14685 + # source://prism//lib/prism/node.rb#14693 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?maximum: Integer) -> NumberedParametersNode # - # source://prism//lib/prism/node.rb#14695 + # source://prism//lib/prism/node.rb#14703 sig do params( node_id: Integer, @@ -27899,19 +27869,19 @@ class Prism::NumberedParametersNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#14700 + # source://prism//lib/prism/node.rb#14708 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, maximum: Integer } # - # source://prism//lib/prism/node.rb#14703 + # source://prism//lib/prism/node.rb#14711 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#14679 + # source://prism//lib/prism/node.rb#14687 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -27919,26 +27889,26 @@ class Prism::NumberedParametersNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#14711 + # source://prism//lib/prism/node.rb#14719 sig { override.returns(String) } def inspect; end # attr_reader maximum: Integer # - # source://prism//lib/prism/node.rb#14708 + # source://prism//lib/prism/node.rb#14716 sig { returns(Integer) } def maximum; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#14716 + # source://prism//lib/prism/node.rb#14724 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#14721 + # source://prism//lib/prism/node.rb#14729 def type; end end end @@ -27948,13 +27918,13 @@ end # $1 # ^^ # -# source://prism//lib/prism/node.rb#14737 +# source://prism//lib/prism/node.rb#14745 class Prism::NumberedReferenceReadNode < ::Prism::Node # Initialize a new NumberedReferenceReadNode node. # # @return [NumberedReferenceReadNode] a new instance of NumberedReferenceReadNode # - # source://prism//lib/prism/node.rb#14739 + # source://prism//lib/prism/node.rb#14747 sig do params( source: Prism::Source, @@ -27969,36 +27939,36 @@ class Prism::NumberedReferenceReadNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#14812 + # source://prism//lib/prism/node.rb#14820 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14748 + # source://prism//lib/prism/node.rb#14756 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#14753 + # source://prism//lib/prism/node.rb#14761 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14769 + # source://prism//lib/prism/node.rb#14777 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14764 + # source://prism//lib/prism/node.rb#14772 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?number: Integer) -> NumberedReferenceReadNode # - # source://prism//lib/prism/node.rb#14774 + # source://prism//lib/prism/node.rb#14782 sig do params( node_id: Integer, @@ -28012,19 +27982,19 @@ class Prism::NumberedReferenceReadNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#14779 + # source://prism//lib/prism/node.rb#14787 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, number: Integer } # - # source://prism//lib/prism/node.rb#14782 + # source://prism//lib/prism/node.rb#14790 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#14758 + # source://prism//lib/prism/node.rb#14766 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -28032,7 +28002,7 @@ class Prism::NumberedReferenceReadNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#14796 + # source://prism//lib/prism/node.rb#14804 sig { override.returns(String) } def inspect; end @@ -28044,20 +28014,20 @@ class Prism::NumberedReferenceReadNode < ::Prism::Node # # $4294967296 # number `0` # - # source://prism//lib/prism/node.rb#14793 + # source://prism//lib/prism/node.rb#14801 sig { returns(Integer) } def number; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#14801 + # source://prism//lib/prism/node.rb#14809 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#14806 + # source://prism//lib/prism/node.rb#14814 def type; end end end @@ -28068,13 +28038,13 @@ end # ^^^^ # end # -# source://prism//lib/prism/node.rb#14823 +# source://prism//lib/prism/node.rb#14831 class Prism::OptionalKeywordParameterNode < ::Prism::Node # Initialize a new OptionalKeywordParameterNode node. # # @return [OptionalKeywordParameterNode] a new instance of OptionalKeywordParameterNode # - # source://prism//lib/prism/node.rb#14825 + # source://prism//lib/prism/node.rb#14833 sig do params( source: Prism::Source, @@ -28091,36 +28061,36 @@ class Prism::OptionalKeywordParameterNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#14916 + # source://prism//lib/prism/node.rb#14924 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14836 + # source://prism//lib/prism/node.rb#14844 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#14841 + # source://prism//lib/prism/node.rb#14849 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14858 + # source://prism//lib/prism/node.rb#14866 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14853 + # source://prism//lib/prism/node.rb#14861 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node) -> OptionalKeywordParameterNode # - # source://prism//lib/prism/node.rb#14863 + # source://prism//lib/prism/node.rb#14871 sig do params( node_id: Integer, @@ -28136,13 +28106,13 @@ class Prism::OptionalKeywordParameterNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#14868 + # source://prism//lib/prism/node.rb#14876 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#14871 + # source://prism//lib/prism/node.rb#14879 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -28150,7 +28120,7 @@ class Prism::OptionalKeywordParameterNode < ::Prism::Node # # @yield [value] # - # source://prism//lib/prism/node.rb#14846 + # source://prism//lib/prism/node.rb#14854 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -28158,19 +28128,19 @@ class Prism::OptionalKeywordParameterNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#14900 + # source://prism//lib/prism/node.rb#14908 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#14881 + # source://prism//lib/prism/node.rb#14889 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#14884 + # source://prism//lib/prism/node.rb#14892 sig { returns(Prism::Location) } def name_loc; end @@ -28178,32 +28148,32 @@ class Prism::OptionalKeywordParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#14876 + # source://prism//lib/prism/node.rb#14884 sig { returns(T::Boolean) } def repeated_parameter?; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#14892 + # source://prism//lib/prism/node.rb#14900 def save_name_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#14905 + # source://prism//lib/prism/node.rb#14913 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#14897 + # source://prism//lib/prism/node.rb#14905 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#14910 + # source://prism//lib/prism/node.rb#14918 def type; end end end @@ -28214,13 +28184,13 @@ end # ^^^^^ # end # -# source://prism//lib/prism/node.rb#14930 +# source://prism//lib/prism/node.rb#14938 class Prism::OptionalParameterNode < ::Prism::Node # Initialize a new OptionalParameterNode node. # # @return [OptionalParameterNode] a new instance of OptionalParameterNode # - # source://prism//lib/prism/node.rb#14932 + # source://prism//lib/prism/node.rb#14940 sig do params( source: Prism::Source, @@ -28238,36 +28208,36 @@ class Prism::OptionalParameterNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#15042 + # source://prism//lib/prism/node.rb#15050 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14944 + # source://prism//lib/prism/node.rb#14952 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#14949 + # source://prism//lib/prism/node.rb#14957 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14966 + # source://prism//lib/prism/node.rb#14974 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14961 + # source://prism//lib/prism/node.rb#14969 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> OptionalParameterNode # - # source://prism//lib/prism/node.rb#14971 + # source://prism//lib/prism/node.rb#14979 sig do params( node_id: Integer, @@ -28284,13 +28254,13 @@ class Prism::OptionalParameterNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#14976 + # source://prism//lib/prism/node.rb#14984 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#14979 + # source://prism//lib/prism/node.rb#14987 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -28298,7 +28268,7 @@ class Prism::OptionalParameterNode < ::Prism::Node # # @yield [value] # - # source://prism//lib/prism/node.rb#14954 + # source://prism//lib/prism/node.rb#14962 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -28306,31 +28276,31 @@ class Prism::OptionalParameterNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#15026 + # source://prism//lib/prism/node.rb#15034 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#14989 + # source://prism//lib/prism/node.rb#14997 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#14992 + # source://prism//lib/prism/node.rb#15000 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#15021 + # source://prism//lib/prism/node.rb#15029 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#15005 + # source://prism//lib/prism/node.rb#15013 sig { returns(Prism::Location) } def operator_loc; end @@ -28338,38 +28308,38 @@ class Prism::OptionalParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#14984 + # source://prism//lib/prism/node.rb#14992 sig { returns(T::Boolean) } def repeated_parameter?; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#15000 + # source://prism//lib/prism/node.rb#15008 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#15013 + # source://prism//lib/prism/node.rb#15021 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#15031 + # source://prism//lib/prism/node.rb#15039 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#15018 + # source://prism//lib/prism/node.rb#15026 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#15036 + # source://prism//lib/prism/node.rb#15044 def type; end end end @@ -28379,13 +28349,13 @@ end # left or right # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#15056 +# source://prism//lib/prism/node.rb#15064 class Prism::OrNode < ::Prism::Node # Initialize a new OrNode node. # # @return [OrNode] a new instance of OrNode # - # source://prism//lib/prism/node.rb#15058 + # source://prism//lib/prism/node.rb#15066 sig do params( source: Prism::Source, @@ -28402,36 +28372,36 @@ class Prism::OrNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#15165 + # source://prism//lib/prism/node.rb#15173 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15069 + # source://prism//lib/prism/node.rb#15077 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#15074 + # source://prism//lib/prism/node.rb#15082 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15092 + # source://prism//lib/prism/node.rb#15100 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15087 + # source://prism//lib/prism/node.rb#15095 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?left: Prism::node, ?right: Prism::node, ?operator_loc: Location) -> OrNode # - # source://prism//lib/prism/node.rb#15097 + # source://prism//lib/prism/node.rb#15105 sig do params( node_id: Integer, @@ -28447,13 +28417,13 @@ class Prism::OrNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#15102 + # source://prism//lib/prism/node.rb#15110 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node, right: Prism::node, operator_loc: Location } # - # source://prism//lib/prism/node.rb#15105 + # source://prism//lib/prism/node.rb#15113 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -28461,7 +28431,7 @@ class Prism::OrNode < ::Prism::Node # # @yield [left] # - # source://prism//lib/prism/node.rb#15079 + # source://prism//lib/prism/node.rb#15087 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -28469,7 +28439,7 @@ class Prism::OrNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#15149 + # source://prism//lib/prism/node.rb#15157 sig { override.returns(String) } def inspect; end @@ -28481,13 +28451,13 @@ class Prism::OrNode < ::Prism::Node # 1 || 2 # ^ # - # source://prism//lib/prism/node.rb#15116 + # source://prism//lib/prism/node.rb#15124 sig { returns(Prism::Node) } def left; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#15144 + # source://prism//lib/prism/node.rb#15152 sig { returns(String) } def operator; end @@ -28496,7 +28466,7 @@ class Prism::OrNode < ::Prism::Node # left or right # ^^ # - # source://prism//lib/prism/node.rb#15131 + # source://prism//lib/prism/node.rb#15139 sig { returns(Prism::Location) } def operator_loc; end @@ -28508,26 +28478,26 @@ class Prism::OrNode < ::Prism::Node # 1 or 2 # ^ # - # source://prism//lib/prism/node.rb#15125 + # source://prism//lib/prism/node.rb#15133 sig { returns(Prism::Node) } def right; end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#15139 + # source://prism//lib/prism/node.rb#15147 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#15154 + # source://prism//lib/prism/node.rb#15162 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#15159 + # source://prism//lib/prism/node.rb#15167 def type; end end end @@ -28537,7 +28507,7 @@ end # source://prism//lib/prism/pack.rb#8 module Prism::Pack class << self - # source://prism//lib/prism.rb#105 + # source://prism//lib/prism.rb#92 def parse(_arg0, _arg1, _arg2); end end end @@ -28777,12 +28747,12 @@ Prism::Pack::UTF8 = T.let(T.unsafe(nil), Symbol) # Flags for parameter nodes. # -# source://prism//lib/prism/node.rb#19856 +# source://prism//lib/prism/node.rb#19864 module Prism::ParameterFlags; end # a parameter name that has been repeated in the method signature # -# source://prism//lib/prism/node.rb#19858 +# source://prism//lib/prism/node.rb#19866 Prism::ParameterFlags::REPEATED_PARAMETER = T.let(T.unsafe(nil), Integer) # Represents the list of parameters on a method, block, or lambda definition. @@ -28791,13 +28761,13 @@ Prism::ParameterFlags::REPEATED_PARAMETER = T.let(T.unsafe(nil), Integer) # ^^^^^^^ # end # -# source://prism//lib/prism/node.rb#15178 +# source://prism//lib/prism/node.rb#15186 class Prism::ParametersNode < ::Prism::Node # Initialize a new ParametersNode node. # # @return [ParametersNode] a new instance of ParametersNode # - # source://prism//lib/prism/node.rb#15180 + # source://prism//lib/prism/node.rb#15188 sig do params( source: Prism::Source, @@ -28818,42 +28788,42 @@ class Prism::ParametersNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#15286 + # source://prism//lib/prism/node.rb#15294 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15195 + # source://prism//lib/prism/node.rb#15203 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader block: BlockParameterNode? # - # source://prism//lib/prism/node.rb#15267 + # source://prism//lib/prism/node.rb#15275 sig { returns(T.nilable(Prism::BlockParameterNode)) } def block; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#15200 + # source://prism//lib/prism/node.rb#15208 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15231 + # source://prism//lib/prism/node.rb#15239 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15218 + # source://prism//lib/prism/node.rb#15226 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?requireds: Array[RequiredParameterNode | MultiTargetNode], ?optionals: Array[OptionalParameterNode], ?rest: RestParameterNode | ImplicitRestNode | nil, ?posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode | ForwardingParameterNode], ?keywords: Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode], ?keyword_rest: KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil, ?block: BlockParameterNode?) -> ParametersNode # - # source://prism//lib/prism/node.rb#15236 + # source://prism//lib/prism/node.rb#15244 sig do params( node_id: Integer, @@ -28873,13 +28843,13 @@ class Prism::ParametersNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#15241 + # source://prism//lib/prism/node.rb#15249 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, requireds: Array[RequiredParameterNode | MultiTargetNode], optionals: Array[OptionalParameterNode], rest: RestParameterNode | ImplicitRestNode | nil, posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode | ForwardingParameterNode], keywords: Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode], keyword_rest: KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil, block: BlockParameterNode? } # - # source://prism//lib/prism/node.rb#15244 + # source://prism//lib/prism/node.rb#15252 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -28887,7 +28857,7 @@ class Prism::ParametersNode < ::Prism::Node # # @yield [rest] # - # source://prism//lib/prism/node.rb#15205 + # source://prism//lib/prism/node.rb#15213 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -28895,13 +28865,13 @@ class Prism::ParametersNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#15270 + # source://prism//lib/prism/node.rb#15278 sig { override.returns(String) } def inspect; end # attr_reader keyword_rest: KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil # - # source://prism//lib/prism/node.rb#15264 + # source://prism//lib/prism/node.rb#15272 sig do returns(T.nilable(T.any(Prism::KeywordRestParameterNode, Prism::ForwardingParameterNode, Prism::NoKeywordsParameterNode))) end @@ -28909,19 +28879,19 @@ class Prism::ParametersNode < ::Prism::Node # attr_reader keywords: Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode] # - # source://prism//lib/prism/node.rb#15261 + # source://prism//lib/prism/node.rb#15269 sig { returns(T::Array[T.any(Prism::RequiredKeywordParameterNode, Prism::OptionalKeywordParameterNode)]) } def keywords; end # attr_reader optionals: Array[OptionalParameterNode] # - # source://prism//lib/prism/node.rb#15252 + # source://prism//lib/prism/node.rb#15260 sig { returns(T::Array[Prism::OptionalParameterNode]) } def optionals; end # attr_reader posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode | ForwardingParameterNode] # - # source://prism//lib/prism/node.rb#15258 + # source://prism//lib/prism/node.rb#15266 sig do returns(T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode, Prism::KeywordRestParameterNode, Prism::NoKeywordsParameterNode, Prism::ForwardingParameterNode)]) end @@ -28929,13 +28899,13 @@ class Prism::ParametersNode < ::Prism::Node # attr_reader requireds: Array[RequiredParameterNode | MultiTargetNode] # - # source://prism//lib/prism/node.rb#15249 + # source://prism//lib/prism/node.rb#15257 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#15255 + # source://prism//lib/prism/node.rb#15263 sig { returns(T.nilable(T.any(Prism::RestParameterNode, Prism::ImplicitRestNode))) } def rest; end @@ -28947,14 +28917,14 @@ class Prism::ParametersNode < ::Prism::Node # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#15275 + # source://prism//lib/prism/node.rb#15283 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#15280 + # source://prism//lib/prism/node.rb#15288 def type; end end end @@ -28964,13 +28934,13 @@ end # (10 + 34) # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#15306 +# source://prism//lib/prism/node.rb#15314 class Prism::ParenthesesNode < ::Prism::Node # Initialize a new ParenthesesNode node. # # @return [ParenthesesNode] a new instance of ParenthesesNode # - # source://prism//lib/prism/node.rb#15308 + # source://prism//lib/prism/node.rb#15316 sig do params( source: Prism::Source, @@ -28987,54 +28957,54 @@ class Prism::ParenthesesNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#15421 + # source://prism//lib/prism/node.rb#15429 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15319 + # source://prism//lib/prism/node.rb#15327 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader body: Prism::node? # - # source://prism//lib/prism/node.rb#15366 + # source://prism//lib/prism/node.rb#15374 sig { returns(T.nilable(Prism::Node)) } def body; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#15324 + # source://prism//lib/prism/node.rb#15332 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#15400 + # source://prism//lib/prism/node.rb#15408 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#15382 + # source://prism//lib/prism/node.rb#15390 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15343 + # source://prism//lib/prism/node.rb#15351 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15336 + # source://prism//lib/prism/node.rb#15344 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?body: Prism::node?, ?opening_loc: Location, ?closing_loc: Location) -> ParenthesesNode # - # source://prism//lib/prism/node.rb#15348 + # source://prism//lib/prism/node.rb#15356 sig do params( node_id: Integer, @@ -29050,13 +29020,13 @@ class Prism::ParenthesesNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#15353 + # source://prism//lib/prism/node.rb#15361 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, body: Prism::node?, opening_loc: Location, closing_loc: Location } # - # source://prism//lib/prism/node.rb#15356 + # source://prism//lib/prism/node.rb#15364 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -29064,7 +29034,7 @@ class Prism::ParenthesesNode < ::Prism::Node # # @yield [body] # - # source://prism//lib/prism/node.rb#15329 + # source://prism//lib/prism/node.rb#15337 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -29072,7 +29042,7 @@ class Prism::ParenthesesNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#15405 + # source://prism//lib/prism/node.rb#15413 sig { override.returns(String) } def inspect; end @@ -29080,7 +29050,7 @@ class Prism::ParenthesesNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15361 + # source://prism//lib/prism/node.rb#15369 sig { returns(T::Boolean) } def multiple_statements?; end @@ -29089,111 +29059,111 @@ class Prism::ParenthesesNode < ::Prism::Node # def opening: () -> String # - # source://prism//lib/prism/node.rb#15395 + # source://prism//lib/prism/node.rb#15403 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#15369 + # source://prism//lib/prism/node.rb#15377 sig { returns(Prism::Location) } def opening_loc; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#15390 + # source://prism//lib/prism/node.rb#15398 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#15377 + # source://prism//lib/prism/node.rb#15385 def save_opening_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#15410 + # source://prism//lib/prism/node.rb#15418 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#15415 + # source://prism//lib/prism/node.rb#15423 def type; end end end # Flags for parentheses nodes. # -# source://prism//lib/prism/node.rb#19862 +# source://prism//lib/prism/node.rb#19870 module Prism::ParenthesesNodeFlags; end # parentheses that contain multiple potentially void statements # -# source://prism//lib/prism/node.rb#19864 +# source://prism//lib/prism/node.rb#19872 Prism::ParenthesesNodeFlags::MULTIPLE_STATEMENTS = T.let(T.unsafe(nil), Integer) # This represents an error that was encountered during parsing. # -# source://prism//lib/prism/parse_result.rb#597 +# source://prism//lib/prism/parse_result.rb#606 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#612 + # source://prism//lib/prism/parse_result.rb#621 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#620 + # source://prism//lib/prism/parse_result.rb#629 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#625 + # source://prism//lib/prism/parse_result.rb#634 sig { returns(String) } def inspect; end # The level of this error. # - # source://prism//lib/prism/parse_result.rb#609 + # source://prism//lib/prism/parse_result.rb#618 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#606 + # source://prism//lib/prism/parse_result.rb#615 sig { returns(Prism::Location) } def location; end # The message associated with this error. # - # source://prism//lib/prism/parse_result.rb#603 + # source://prism//lib/prism/parse_result.rb#612 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#600 + # source://prism//lib/prism/parse_result.rb#609 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#786 +# source://prism//lib/prism/parse_result.rb#795 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#792 + # source://prism//lib/prism/parse_result.rb#801 sig do params( value: [Prism::ProgramNode, T::Array[T.untyped]], @@ -29209,27 +29179,27 @@ class Prism::ParseLexResult < ::Prism::Result # Implement the hash pattern matching interface for ParseLexResult. # - # source://prism//lib/prism/parse_result.rb#798 + # source://prism//lib/prism/parse_result.rb#807 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#789 + # source://prism//lib/prism/parse_result.rb#798 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#727 +# source://prism//lib/prism/parse_result.rb#736 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#740 + # source://prism//lib/prism/parse_result.rb#749 sig do params( value: Prism::ProgramNode, @@ -29245,30 +29215,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#751 + # source://prism//lib/prism/parse_result.rb#760 def attach_comments!; end # Implement the hash pattern matching interface for ParseResult. # - # source://prism//lib/prism/parse_result.rb#746 + # source://prism//lib/prism/parse_result.rb#755 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#763 + # source://prism//lib/prism/parse_result.rb#772 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#757 + # source://prism//lib/prism/parse_result.rb#766 def mark_newlines!; end # The syntax tree that was parsed from the source code. # - # source://prism//lib/prism/parse_result.rb#737 + # source://prism//lib/prism/parse_result.rb#746 sig { returns(Prism::ProgramNode) } def value; end end @@ -29461,50 +29431,50 @@ end # This represents a warning that was encountered during parsing. # -# source://prism//lib/prism/parse_result.rb#631 +# source://prism//lib/prism/parse_result.rb#640 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#646 + # source://prism//lib/prism/parse_result.rb#655 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#654 + # source://prism//lib/prism/parse_result.rb#663 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#659 + # source://prism//lib/prism/parse_result.rb#668 sig { returns(String) } def inspect; end # The level of this warning. # - # source://prism//lib/prism/parse_result.rb#643 + # source://prism//lib/prism/parse_result.rb#652 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#640 + # source://prism//lib/prism/parse_result.rb#649 sig { returns(Prism::Location) } def location; end # The message associated with this warning. # - # source://prism//lib/prism/parse_result.rb#637 + # source://prism//lib/prism/parse_result.rb#646 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#634 + # source://prism//lib/prism/parse_result.rb#643 sig { returns(Symbol) } def type; end end @@ -29675,13 +29645,13 @@ end # foo in ^(bar) # ^^^^^^ # -# source://prism//lib/prism/node.rb#15434 +# source://prism//lib/prism/node.rb#15442 class Prism::PinnedExpressionNode < ::Prism::Node # Initialize a new PinnedExpressionNode node. # # @return [PinnedExpressionNode] a new instance of PinnedExpressionNode # - # source://prism//lib/prism/node.rb#15436 + # source://prism//lib/prism/node.rb#15444 sig do params( source: Prism::Source, @@ -29699,36 +29669,36 @@ class Prism::PinnedExpressionNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#15573 + # source://prism//lib/prism/node.rb#15581 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15448 + # source://prism//lib/prism/node.rb#15456 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#15453 + # source://prism//lib/prism/node.rb#15461 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15470 + # source://prism//lib/prism/node.rb#15478 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15465 + # source://prism//lib/prism/node.rb#15473 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?expression: Prism::node, ?operator_loc: Location, ?lparen_loc: Location, ?rparen_loc: Location) -> PinnedExpressionNode # - # source://prism//lib/prism/node.rb#15475 + # source://prism//lib/prism/node.rb#15483 sig do params( node_id: Integer, @@ -29745,13 +29715,13 @@ class Prism::PinnedExpressionNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#15480 + # source://prism//lib/prism/node.rb#15488 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, expression: Prism::node, operator_loc: Location, lparen_loc: Location, rparen_loc: Location } # - # source://prism//lib/prism/node.rb#15483 + # source://prism//lib/prism/node.rb#15491 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -29759,7 +29729,7 @@ class Prism::PinnedExpressionNode < ::Prism::Node # # @yield [expression] # - # source://prism//lib/prism/node.rb#15458 + # source://prism//lib/prism/node.rb#15466 def each_child_node; end # The expression used in the pinned expression @@ -29767,7 +29737,7 @@ class Prism::PinnedExpressionNode < ::Prism::Node # foo in ^(bar) # ^^^ # - # source://prism//lib/prism/node.rb#15491 + # source://prism//lib/prism/node.rb#15499 sig { returns(Prism::Node) } def expression; end @@ -29776,13 +29746,13 @@ class Prism::PinnedExpressionNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#15557 + # source://prism//lib/prism/node.rb#15565 sig { override.returns(String) } def inspect; end # def lparen: () -> String # - # source://prism//lib/prism/node.rb#15547 + # source://prism//lib/prism/node.rb#15555 sig { returns(String) } def lparen; end @@ -29791,13 +29761,13 @@ class Prism::PinnedExpressionNode < ::Prism::Node # foo in ^(bar) # ^ # - # source://prism//lib/prism/node.rb#15513 + # source://prism//lib/prism/node.rb#15521 sig { returns(Prism::Location) } def lparen_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#15542 + # source://prism//lib/prism/node.rb#15550 sig { returns(String) } def operator; end @@ -29806,13 +29776,13 @@ class Prism::PinnedExpressionNode < ::Prism::Node # foo in ^(bar) # ^ # - # source://prism//lib/prism/node.rb#15497 + # source://prism//lib/prism/node.rb#15505 sig { returns(Prism::Location) } def operator_loc; end # def rparen: () -> String # - # source://prism//lib/prism/node.rb#15552 + # source://prism//lib/prism/node.rb#15560 sig { returns(String) } def rparen; end @@ -29821,38 +29791,38 @@ class Prism::PinnedExpressionNode < ::Prism::Node # foo in ^(bar) # ^ # - # source://prism//lib/prism/node.rb#15529 + # source://prism//lib/prism/node.rb#15537 sig { returns(Prism::Location) } def rparen_loc; end # Save the lparen_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#15521 + # source://prism//lib/prism/node.rb#15529 def save_lparen_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#15505 + # source://prism//lib/prism/node.rb#15513 def save_operator_loc(repository); end # Save the rparen_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#15537 + # source://prism//lib/prism/node.rb#15545 def save_rparen_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#15562 + # source://prism//lib/prism/node.rb#15570 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#15567 + # source://prism//lib/prism/node.rb#15575 def type; end end end @@ -29862,13 +29832,13 @@ end # foo in ^bar # ^^^^ # -# source://prism//lib/prism/node.rb#15586 +# source://prism//lib/prism/node.rb#15594 class Prism::PinnedVariableNode < ::Prism::Node # Initialize a new PinnedVariableNode node. # # @return [PinnedVariableNode] a new instance of PinnedVariableNode # - # source://prism//lib/prism/node.rb#15588 + # source://prism//lib/prism/node.rb#15596 sig do params( source: Prism::Source, @@ -29884,36 +29854,36 @@ class Prism::PinnedVariableNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#15681 + # source://prism//lib/prism/node.rb#15689 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15598 + # source://prism//lib/prism/node.rb#15606 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#15603 + # source://prism//lib/prism/node.rb#15611 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15620 + # source://prism//lib/prism/node.rb#15628 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15615 + # source://prism//lib/prism/node.rb#15623 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?variable: LocalVariableReadNode | InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode | ItLocalVariableReadNode | MissingNode, ?operator_loc: Location) -> PinnedVariableNode # - # source://prism//lib/prism/node.rb#15625 + # source://prism//lib/prism/node.rb#15633 sig do params( node_id: Integer, @@ -29928,13 +29898,13 @@ class Prism::PinnedVariableNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#15630 + # source://prism//lib/prism/node.rb#15638 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, variable: LocalVariableReadNode | InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode | ItLocalVariableReadNode | MissingNode, operator_loc: Location } # - # source://prism//lib/prism/node.rb#15633 + # source://prism//lib/prism/node.rb#15641 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -29942,7 +29912,7 @@ class Prism::PinnedVariableNode < ::Prism::Node # # @yield [variable] # - # source://prism//lib/prism/node.rb#15608 + # source://prism//lib/prism/node.rb#15616 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -29950,13 +29920,13 @@ class Prism::PinnedVariableNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#15665 + # source://prism//lib/prism/node.rb#15673 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#15660 + # source://prism//lib/prism/node.rb#15668 sig { returns(String) } def operator; end @@ -29965,19 +29935,19 @@ class Prism::PinnedVariableNode < ::Prism::Node # foo in ^bar # ^ # - # source://prism//lib/prism/node.rb#15647 + # source://prism//lib/prism/node.rb#15655 sig { returns(Prism::Location) } def operator_loc; end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#15655 + # source://prism//lib/prism/node.rb#15663 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#15670 + # source://prism//lib/prism/node.rb#15678 sig { override.returns(Symbol) } def type; end @@ -29986,7 +29956,7 @@ class Prism::PinnedVariableNode < ::Prism::Node # foo in ^bar # ^^^ # - # source://prism//lib/prism/node.rb#15641 + # source://prism//lib/prism/node.rb#15649 sig do returns(T.any(Prism::LocalVariableReadNode, Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::ItLocalVariableReadNode, Prism::MissingNode)) end @@ -29995,7 +29965,7 @@ class Prism::PinnedVariableNode < ::Prism::Node class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#15675 + # source://prism//lib/prism/node.rb#15683 def type; end end end @@ -30005,13 +29975,13 @@ end # END { foo } # ^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#15692 +# source://prism//lib/prism/node.rb#15700 class Prism::PostExecutionNode < ::Prism::Node # Initialize a new PostExecutionNode node. # # @return [PostExecutionNode] a new instance of PostExecutionNode # - # source://prism//lib/prism/node.rb#15694 + # source://prism//lib/prism/node.rb#15702 sig do params( source: Prism::Source, @@ -30029,48 +29999,48 @@ class Prism::PostExecutionNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#15821 + # source://prism//lib/prism/node.rb#15829 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15706 + # source://prism//lib/prism/node.rb#15714 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#15711 + # source://prism//lib/prism/node.rb#15719 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#15800 + # source://prism//lib/prism/node.rb#15808 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#15777 + # source://prism//lib/prism/node.rb#15785 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15730 + # source://prism//lib/prism/node.rb#15738 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15723 + # source://prism//lib/prism/node.rb#15731 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?statements: StatementsNode?, ?keyword_loc: Location, ?opening_loc: Location, ?closing_loc: Location) -> PostExecutionNode # - # source://prism//lib/prism/node.rb#15735 + # source://prism//lib/prism/node.rb#15743 sig do params( node_id: Integer, @@ -30087,13 +30057,13 @@ class Prism::PostExecutionNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#15740 + # source://prism//lib/prism/node.rb#15748 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location } # - # source://prism//lib/prism/node.rb#15743 + # source://prism//lib/prism/node.rb#15751 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -30101,7 +30071,7 @@ class Prism::PostExecutionNode < ::Prism::Node # # @yield [statements] # - # source://prism//lib/prism/node.rb#15716 + # source://prism//lib/prism/node.rb#15724 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -30109,68 +30079,68 @@ class Prism::PostExecutionNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#15805 + # source://prism//lib/prism/node.rb#15813 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#15790 + # source://prism//lib/prism/node.rb#15798 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#15751 + # source://prism//lib/prism/node.rb#15759 sig { returns(Prism::Location) } def keyword_loc; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#15795 + # source://prism//lib/prism/node.rb#15803 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#15764 + # source://prism//lib/prism/node.rb#15772 sig { returns(Prism::Location) } def opening_loc; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#15785 + # source://prism//lib/prism/node.rb#15793 def save_closing_loc(repository); end # Save the keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#15759 + # source://prism//lib/prism/node.rb#15767 def save_keyword_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#15772 + # source://prism//lib/prism/node.rb#15780 def save_opening_loc(repository); end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#15748 + # source://prism//lib/prism/node.rb#15756 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#15810 + # source://prism//lib/prism/node.rb#15818 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#15815 + # source://prism//lib/prism/node.rb#15823 def type; end end end @@ -30180,13 +30150,13 @@ end # BEGIN { foo } # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#15834 +# source://prism//lib/prism/node.rb#15842 class Prism::PreExecutionNode < ::Prism::Node # Initialize a new PreExecutionNode node. # # @return [PreExecutionNode] a new instance of PreExecutionNode # - # source://prism//lib/prism/node.rb#15836 + # source://prism//lib/prism/node.rb#15844 sig do params( source: Prism::Source, @@ -30204,48 +30174,48 @@ class Prism::PreExecutionNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#15963 + # source://prism//lib/prism/node.rb#15971 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15848 + # source://prism//lib/prism/node.rb#15856 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#15853 + # source://prism//lib/prism/node.rb#15861 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#15942 + # source://prism//lib/prism/node.rb#15950 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#15919 + # source://prism//lib/prism/node.rb#15927 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15872 + # source://prism//lib/prism/node.rb#15880 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15865 + # source://prism//lib/prism/node.rb#15873 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?statements: StatementsNode?, ?keyword_loc: Location, ?opening_loc: Location, ?closing_loc: Location) -> PreExecutionNode # - # source://prism//lib/prism/node.rb#15877 + # source://prism//lib/prism/node.rb#15885 sig do params( node_id: Integer, @@ -30262,13 +30232,13 @@ class Prism::PreExecutionNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#15882 + # source://prism//lib/prism/node.rb#15890 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location } # - # source://prism//lib/prism/node.rb#15885 + # source://prism//lib/prism/node.rb#15893 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -30276,7 +30246,7 @@ class Prism::PreExecutionNode < ::Prism::Node # # @yield [statements] # - # source://prism//lib/prism/node.rb#15858 + # source://prism//lib/prism/node.rb#15866 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -30284,81 +30254,81 @@ class Prism::PreExecutionNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#15947 + # source://prism//lib/prism/node.rb#15955 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#15932 + # source://prism//lib/prism/node.rb#15940 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#15893 + # source://prism//lib/prism/node.rb#15901 sig { returns(Prism::Location) } def keyword_loc; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#15937 + # source://prism//lib/prism/node.rb#15945 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#15906 + # source://prism//lib/prism/node.rb#15914 sig { returns(Prism::Location) } def opening_loc; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#15927 + # source://prism//lib/prism/node.rb#15935 def save_closing_loc(repository); end # Save the keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#15901 + # source://prism//lib/prism/node.rb#15909 def save_keyword_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#15914 + # source://prism//lib/prism/node.rb#15922 def save_opening_loc(repository); end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#15890 + # source://prism//lib/prism/node.rb#15898 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#15952 + # source://prism//lib/prism/node.rb#15960 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#15957 + # source://prism//lib/prism/node.rb#15965 def type; end end end # The top level node of any parse tree. # -# source://prism//lib/prism/node.rb#15973 +# source://prism//lib/prism/node.rb#15981 class Prism::ProgramNode < ::Prism::Node # Initialize a new ProgramNode node. # # @return [ProgramNode] a new instance of ProgramNode # - # source://prism//lib/prism/node.rb#15975 + # source://prism//lib/prism/node.rb#15983 sig do params( source: Prism::Source, @@ -30374,36 +30344,36 @@ class Prism::ProgramNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#16047 + # source://prism//lib/prism/node.rb#16055 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15985 + # source://prism//lib/prism/node.rb#15993 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#15990 + # source://prism//lib/prism/node.rb#15998 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16007 + # source://prism//lib/prism/node.rb#16015 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16002 + # source://prism//lib/prism/node.rb#16010 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?statements: StatementsNode) -> ProgramNode # - # source://prism//lib/prism/node.rb#16012 + # source://prism//lib/prism/node.rb#16020 sig do params( node_id: Integer, @@ -30418,13 +30388,13 @@ class Prism::ProgramNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#16017 + # source://prism//lib/prism/node.rb#16025 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], statements: StatementsNode } # - # source://prism//lib/prism/node.rb#16020 + # source://prism//lib/prism/node.rb#16028 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -30432,7 +30402,7 @@ class Prism::ProgramNode < ::Prism::Node # # @yield [statements] # - # source://prism//lib/prism/node.rb#15995 + # source://prism//lib/prism/node.rb#16003 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -30440,44 +30410,44 @@ class Prism::ProgramNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#16031 + # source://prism//lib/prism/node.rb#16039 sig { override.returns(String) } def inspect; end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#16025 + # source://prism//lib/prism/node.rb#16033 sig { returns(T::Array[Symbol]) } def locals; end # attr_reader statements: StatementsNode # - # source://prism//lib/prism/node.rb#16028 + # source://prism//lib/prism/node.rb#16036 sig { returns(Prism::StatementsNode) } def statements; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#16036 + # source://prism//lib/prism/node.rb#16044 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#16041 + # source://prism//lib/prism/node.rb#16049 def type; end end end # Flags for range and flip-flop nodes. # -# source://prism//lib/prism/node.rb#19868 +# source://prism//lib/prism/node.rb#19876 module Prism::RangeFlags; end # ... operator # -# source://prism//lib/prism/node.rb#19870 +# source://prism//lib/prism/node.rb#19878 Prism::RangeFlags::EXCLUDE_END = T.let(T.unsafe(nil), Integer) # Represents the use of the `..` or `...` operators. @@ -30488,13 +30458,13 @@ Prism::RangeFlags::EXCLUDE_END = T.let(T.unsafe(nil), Integer) # c if a =~ /left/ ... b =~ /right/ # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#16062 +# source://prism//lib/prism/node.rb#16070 class Prism::RangeNode < ::Prism::Node # Initialize a new RangeNode node. # # @return [RangeNode] a new instance of RangeNode # - # source://prism//lib/prism/node.rb#16064 + # source://prism//lib/prism/node.rb#16072 sig do params( source: Prism::Source, @@ -30511,36 +30481,36 @@ class Prism::RangeNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#16177 + # source://prism//lib/prism/node.rb#16185 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16075 + # source://prism//lib/prism/node.rb#16083 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#16080 + # source://prism//lib/prism/node.rb#16088 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16101 + # source://prism//lib/prism/node.rb#16109 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16093 + # source://prism//lib/prism/node.rb#16101 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?left: Prism::node?, ?right: Prism::node?, ?operator_loc: Location) -> RangeNode # - # source://prism//lib/prism/node.rb#16106 + # source://prism//lib/prism/node.rb#16114 sig do params( node_id: Integer, @@ -30556,13 +30526,13 @@ class Prism::RangeNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#16111 + # source://prism//lib/prism/node.rb#16119 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node?, right: Prism::node?, operator_loc: Location } # - # source://prism//lib/prism/node.rb#16114 + # source://prism//lib/prism/node.rb#16122 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -30570,14 +30540,14 @@ class Prism::RangeNode < ::Prism::Node # # @yield [left] # - # source://prism//lib/prism/node.rb#16085 + # source://prism//lib/prism/node.rb#16093 def each_child_node; end # def exclude_end?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16119 + # source://prism//lib/prism/node.rb#16127 sig { returns(T::Boolean) } def exclude_end?; end @@ -30586,7 +30556,7 @@ class Prism::RangeNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#16161 + # source://prism//lib/prism/node.rb#16169 sig { override.returns(String) } def inspect; end @@ -30598,19 +30568,19 @@ class Prism::RangeNode < ::Prism::Node # hello...goodbye # ^^^^^ # - # source://prism//lib/prism/node.rb#16130 + # source://prism//lib/prism/node.rb#16138 sig { returns(T.nilable(Prism::Node)) } def left; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#16156 + # source://prism//lib/prism/node.rb#16164 sig { returns(String) } def operator; end # The location of the `..` or `...` operator. # - # source://prism//lib/prism/node.rb#16143 + # source://prism//lib/prism/node.rb#16151 sig { returns(Prism::Location) } def operator_loc; end @@ -30623,26 +30593,26 @@ 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#16140 + # source://prism//lib/prism/node.rb#16148 sig { returns(T.nilable(Prism::Node)) } def right; end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#16151 + # source://prism//lib/prism/node.rb#16159 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#16166 + # source://prism//lib/prism/node.rb#16174 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#16171 + # source://prism//lib/prism/node.rb#16179 def type; end end end @@ -30652,13 +30622,13 @@ end # 1.0r # ^^^^ # -# source://prism//lib/prism/node.rb#16190 +# source://prism//lib/prism/node.rb#16198 class Prism::RationalNode < ::Prism::Node # Initialize a new RationalNode node. # # @return [RationalNode] a new instance of RationalNode # - # source://prism//lib/prism/node.rb#16192 + # source://prism//lib/prism/node.rb#16200 sig do params( source: Prism::Source, @@ -30674,12 +30644,12 @@ class Prism::RationalNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#16287 + # source://prism//lib/prism/node.rb#16295 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16202 + # source://prism//lib/prism/node.rb#16210 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -30687,31 +30657,31 @@ class Prism::RationalNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16241 + # source://prism//lib/prism/node.rb#16249 sig { returns(T::Boolean) } def binary?; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#16207 + # source://prism//lib/prism/node.rb#16215 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16223 + # source://prism//lib/prism/node.rb#16231 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16218 + # source://prism//lib/prism/node.rb#16226 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?numerator: Integer, ?denominator: Integer) -> RationalNode # - # source://prism//lib/prism/node.rb#16228 + # source://prism//lib/prism/node.rb#16236 sig do params( node_id: Integer, @@ -30727,20 +30697,20 @@ class Prism::RationalNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16246 + # source://prism//lib/prism/node.rb#16254 sig { returns(T::Boolean) } def decimal?; end # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#16233 + # source://prism//lib/prism/node.rb#16241 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, numerator: Integer, denominator: Integer } # - # source://prism//lib/prism/node.rb#16236 + # source://prism//lib/prism/node.rb#16244 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -30748,13 +30718,13 @@ class Prism::RationalNode < ::Prism::Node # # 1.5r # denominator 2 # - # source://prism//lib/prism/node.rb#16268 + # source://prism//lib/prism/node.rb#16276 sig { returns(Integer) } def denominator; end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#16212 + # source://prism//lib/prism/node.rb#16220 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -30764,13 +30734,13 @@ class Prism::RationalNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16256 + # source://prism//lib/prism/node.rb#16264 sig { returns(T::Boolean) } def hexadecimal?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#16271 + # source://prism//lib/prism/node.rb#16279 sig { override.returns(String) } def inspect; end @@ -30778,7 +30748,7 @@ class Prism::RationalNode < ::Prism::Node # # 1.5r # numerator 3 # - # source://prism//lib/prism/node.rb#16263 + # source://prism//lib/prism/node.rb#16271 sig { returns(Integer) } def numerator; end @@ -30792,13 +30762,13 @@ class Prism::RationalNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16251 + # source://prism//lib/prism/node.rb#16259 sig { returns(T::Boolean) } def octal?; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#16276 + # source://prism//lib/prism/node.rb#16284 sig { override.returns(Symbol) } def type; end @@ -30811,7 +30781,7 @@ class Prism::RationalNode < ::Prism::Node class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#16281 + # source://prism//lib/prism/node.rb#16289 def type; end end end @@ -30821,68 +30791,68 @@ end # redo # ^^^^ # -# source://prism//lib/prism/node.rb#16299 +# source://prism//lib/prism/node.rb#16307 class Prism::RedoNode < ::Prism::Node # Initialize a new RedoNode node. # # @return [RedoNode] a new instance of RedoNode # - # source://prism//lib/prism/node.rb#16301 + # source://prism//lib/prism/node.rb#16309 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#16364 + # source://prism//lib/prism/node.rb#16372 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16309 + # source://prism//lib/prism/node.rb#16317 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#16314 + # source://prism//lib/prism/node.rb#16322 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16330 + # source://prism//lib/prism/node.rb#16338 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16325 + # source://prism//lib/prism/node.rb#16333 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> RedoNode # - # source://prism//lib/prism/node.rb#16335 + # source://prism//lib/prism/node.rb#16343 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[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#16340 + # source://prism//lib/prism/node.rb#16348 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#16343 + # source://prism//lib/prism/node.rb#16351 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#16319 + # source://prism//lib/prism/node.rb#16327 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -30890,20 +30860,20 @@ class Prism::RedoNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#16348 + # source://prism//lib/prism/node.rb#16356 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#16353 + # source://prism//lib/prism/node.rb#16361 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#16358 + # source://prism//lib/prism/node.rb#16366 def type; end end end @@ -31040,62 +31010,62 @@ class Prism::Reflection::StringField < ::Prism::Reflection::Field; end # Flags for regular expression and match last line nodes. # -# source://prism//lib/prism/node.rb#19874 +# source://prism//lib/prism/node.rb#19882 module Prism::RegularExpressionFlags; end # n - forces the ASCII-8BIT encoding # -# source://prism//lib/prism/node.rb#19891 +# source://prism//lib/prism/node.rb#19899 Prism::RegularExpressionFlags::ASCII_8BIT = T.let(T.unsafe(nil), Integer) # e - forces the EUC-JP encoding # -# source://prism//lib/prism/node.rb#19888 +# source://prism//lib/prism/node.rb#19896 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#19879 +# source://prism//lib/prism/node.rb#19887 Prism::RegularExpressionFlags::EXTENDED = T.let(T.unsafe(nil), Integer) # internal bytes forced the encoding to binary # -# source://prism//lib/prism/node.rb#19903 +# source://prism//lib/prism/node.rb#19911 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#19906 +# source://prism//lib/prism/node.rb#19914 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#19900 +# source://prism//lib/prism/node.rb#19908 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#19876 +# source://prism//lib/prism/node.rb#19884 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#19882 +# source://prism//lib/prism/node.rb#19890 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#19885 +# source://prism//lib/prism/node.rb#19893 Prism::RegularExpressionFlags::ONCE = T.let(T.unsafe(nil), Integer) # u - forces the UTF-8 encoding # -# source://prism//lib/prism/node.rb#19897 +# source://prism//lib/prism/node.rb#19905 Prism::RegularExpressionFlags::UTF_8 = T.let(T.unsafe(nil), Integer) # s - forces the Windows-31J encoding # -# source://prism//lib/prism/node.rb#19894 +# source://prism//lib/prism/node.rb#19902 Prism::RegularExpressionFlags::WINDOWS_31J = T.let(T.unsafe(nil), Integer) # Represents a regular expression literal with no interpolation. @@ -31103,7 +31073,7 @@ Prism::RegularExpressionFlags::WINDOWS_31J = T.let(T.unsafe(nil), Integer) # /foo/i # ^^^^^^ # -# source://prism//lib/prism/node.rb#16373 +# source://prism//lib/prism/node.rb#16381 class Prism::RegularExpressionNode < ::Prism::Node include ::Prism::RegularExpressionOptions @@ -31111,7 +31081,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [RegularExpressionNode] a new instance of RegularExpressionNode # - # source://prism//lib/prism/node.rb#16375 + # source://prism//lib/prism/node.rb#16383 sig do params( source: Prism::Source, @@ -31129,12 +31099,12 @@ class Prism::RegularExpressionNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#16554 + # source://prism//lib/prism/node.rb#16562 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16387 + # source://prism//lib/prism/node.rb#16395 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -31142,55 +31112,55 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16451 + # source://prism//lib/prism/node.rb#16459 sig { returns(T::Boolean) } def ascii_8bit?; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#16392 + # source://prism//lib/prism/node.rb#16400 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#16533 + # source://prism//lib/prism/node.rb#16541 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#16507 + # source://prism//lib/prism/node.rb#16515 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16408 + # source://prism//lib/prism/node.rb#16416 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16403 + # source://prism//lib/prism/node.rb#16411 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def content: () -> String # - # source://prism//lib/prism/node.rb#16528 + # source://prism//lib/prism/node.rb#16536 sig { returns(String) } def content; end # attr_reader content_loc: Location # - # source://prism//lib/prism/node.rb#16494 + # source://prism//lib/prism/node.rb#16502 sig { returns(Prism::Location) } def content_loc; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String) -> RegularExpressionNode # - # source://prism//lib/prism/node.rb#16413 + # source://prism//lib/prism/node.rb#16421 sig do params( node_id: Integer, @@ -31207,26 +31177,26 @@ class Prism::RegularExpressionNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#16418 + # source://prism//lib/prism/node.rb#16426 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String } # - # source://prism//lib/prism/node.rb#16421 + # source://prism//lib/prism/node.rb#16429 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#16397 + # source://prism//lib/prism/node.rb#16405 def each_child_node; end # def euc_jp?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16446 + # source://prism//lib/prism/node.rb#16454 sig { returns(T::Boolean) } def euc_jp?; end @@ -31234,7 +31204,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16431 + # source://prism//lib/prism/node.rb#16439 sig { returns(T::Boolean) } def extended?; end @@ -31245,7 +31215,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16471 + # source://prism//lib/prism/node.rb#16479 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -31253,7 +31223,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16476 + # source://prism//lib/prism/node.rb#16484 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end @@ -31261,7 +31231,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16466 + # source://prism//lib/prism/node.rb#16474 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -31269,13 +31239,13 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16426 + # source://prism//lib/prism/node.rb#16434 sig { returns(T::Boolean) } def ignore_case?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#16538 + # source://prism//lib/prism/node.rb#16546 sig { override.returns(String) } def inspect; end @@ -31283,7 +31253,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16436 + # source://prism//lib/prism/node.rb#16444 sig { returns(T::Boolean) } def multi_line?; end @@ -31291,19 +31261,19 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16441 + # source://prism//lib/prism/node.rb#16449 sig { returns(T::Boolean) } def once?; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#16523 + # source://prism//lib/prism/node.rb#16531 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#16481 + # source://prism//lib/prism/node.rb#16489 sig { returns(Prism::Location) } def opening_loc; end @@ -31313,30 +31283,30 @@ class Prism::RegularExpressionNode < ::Prism::Node # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#16515 + # source://prism//lib/prism/node.rb#16523 def save_closing_loc(repository); end # Save the content_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#16502 + # source://prism//lib/prism/node.rb#16510 def save_content_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#16489 + # source://prism//lib/prism/node.rb#16497 def save_opening_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#16543 + # source://prism//lib/prism/node.rb#16551 sig { override.returns(Symbol) } def type; end # attr_reader unescaped: String # - # source://prism//lib/prism/node.rb#16520 + # source://prism//lib/prism/node.rb#16528 sig { returns(String) } def unescaped; end @@ -31344,7 +31314,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16461 + # source://prism//lib/prism/node.rb#16469 sig { returns(T::Boolean) } def utf_8?; end @@ -31352,14 +31322,14 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16456 + # source://prism//lib/prism/node.rb#16464 sig { returns(T::Boolean) } def windows_31j?; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#16548 + # source://prism//lib/prism/node.rb#16556 def type; end end end @@ -31908,13 +31878,13 @@ end # ^^ # end # -# source://prism//lib/prism/node.rb#16569 +# source://prism//lib/prism/node.rb#16577 class Prism::RequiredKeywordParameterNode < ::Prism::Node # Initialize a new RequiredKeywordParameterNode node. # # @return [RequiredKeywordParameterNode] a new instance of RequiredKeywordParameterNode # - # source://prism//lib/prism/node.rb#16571 + # source://prism//lib/prism/node.rb#16579 sig do params( source: Prism::Source, @@ -31930,36 +31900,36 @@ class Prism::RequiredKeywordParameterNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#16657 + # source://prism//lib/prism/node.rb#16665 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16581 + # source://prism//lib/prism/node.rb#16589 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#16586 + # source://prism//lib/prism/node.rb#16594 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16602 + # source://prism//lib/prism/node.rb#16610 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16597 + # source://prism//lib/prism/node.rb#16605 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location) -> RequiredKeywordParameterNode # - # source://prism//lib/prism/node.rb#16607 + # source://prism//lib/prism/node.rb#16615 sig do params( node_id: Integer, @@ -31974,19 +31944,19 @@ class Prism::RequiredKeywordParameterNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#16612 + # source://prism//lib/prism/node.rb#16620 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location } # - # source://prism//lib/prism/node.rb#16615 + # source://prism//lib/prism/node.rb#16623 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#16591 + # source://prism//lib/prism/node.rb#16599 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -31994,19 +31964,19 @@ class Prism::RequiredKeywordParameterNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#16641 + # source://prism//lib/prism/node.rb#16649 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#16625 + # source://prism//lib/prism/node.rb#16633 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#16628 + # source://prism//lib/prism/node.rb#16636 sig { returns(Prism::Location) } def name_loc; end @@ -32014,26 +31984,26 @@ class Prism::RequiredKeywordParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16620 + # source://prism//lib/prism/node.rb#16628 sig { returns(T::Boolean) } def repeated_parameter?; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#16636 + # source://prism//lib/prism/node.rb#16644 def save_name_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#16646 + # source://prism//lib/prism/node.rb#16654 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#16651 + # source://prism//lib/prism/node.rb#16659 def type; end end end @@ -32044,49 +32014,49 @@ end # ^ # end # -# source://prism//lib/prism/node.rb#16670 +# source://prism//lib/prism/node.rb#16678 class Prism::RequiredParameterNode < ::Prism::Node # Initialize a new RequiredParameterNode node. # # @return [RequiredParameterNode] a new instance of RequiredParameterNode # - # source://prism//lib/prism/node.rb#16672 + # source://prism//lib/prism/node.rb#16680 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#16744 + # source://prism//lib/prism/node.rb#16752 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16681 + # source://prism//lib/prism/node.rb#16689 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#16686 + # source://prism//lib/prism/node.rb#16694 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16702 + # source://prism//lib/prism/node.rb#16710 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16697 + # source://prism//lib/prism/node.rb#16705 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> RequiredParameterNode # - # source://prism//lib/prism/node.rb#16707 + # source://prism//lib/prism/node.rb#16715 sig do params( node_id: Integer, @@ -32100,19 +32070,19 @@ class Prism::RequiredParameterNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#16712 + # source://prism//lib/prism/node.rb#16720 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#16715 + # source://prism//lib/prism/node.rb#16723 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#16691 + # source://prism//lib/prism/node.rb#16699 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -32120,13 +32090,13 @@ class Prism::RequiredParameterNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#16728 + # source://prism//lib/prism/node.rb#16736 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#16725 + # source://prism//lib/prism/node.rb#16733 sig { returns(Symbol) } def name; end @@ -32134,20 +32104,20 @@ class Prism::RequiredParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16720 + # source://prism//lib/prism/node.rb#16728 sig { returns(T::Boolean) } def repeated_parameter?; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#16733 + # source://prism//lib/prism/node.rb#16741 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#16738 + # source://prism//lib/prism/node.rb#16746 def type; end end end @@ -32157,13 +32127,13 @@ end # foo rescue nil # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#16755 +# source://prism//lib/prism/node.rb#16763 class Prism::RescueModifierNode < ::Prism::Node # Initialize a new RescueModifierNode node. # # @return [RescueModifierNode] a new instance of RescueModifierNode # - # source://prism//lib/prism/node.rb#16757 + # source://prism//lib/prism/node.rb#16765 sig do params( source: Prism::Source, @@ -32180,36 +32150,36 @@ class Prism::RescueModifierNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#16849 + # source://prism//lib/prism/node.rb#16857 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16768 + # source://prism//lib/prism/node.rb#16776 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#16773 + # source://prism//lib/prism/node.rb#16781 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16791 + # source://prism//lib/prism/node.rb#16799 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16786 + # source://prism//lib/prism/node.rb#16794 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?expression: Prism::node, ?keyword_loc: Location, ?rescue_expression: Prism::node) -> RescueModifierNode # - # source://prism//lib/prism/node.rb#16796 + # source://prism//lib/prism/node.rb#16804 sig do params( node_id: Integer, @@ -32225,13 +32195,13 @@ class Prism::RescueModifierNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#16801 + # source://prism//lib/prism/node.rb#16809 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, expression: Prism::node, keyword_loc: Location, rescue_expression: Prism::node } # - # source://prism//lib/prism/node.rb#16804 + # source://prism//lib/prism/node.rb#16812 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -32239,12 +32209,12 @@ class Prism::RescueModifierNode < ::Prism::Node # # @yield [expression] # - # source://prism//lib/prism/node.rb#16778 + # source://prism//lib/prism/node.rb#16786 def each_child_node; end # attr_reader expression: Prism::node # - # source://prism//lib/prism/node.rb#16809 + # source://prism//lib/prism/node.rb#16817 sig { returns(Prism::Node) } def expression; end @@ -32253,19 +32223,19 @@ class Prism::RescueModifierNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#16833 + # source://prism//lib/prism/node.rb#16841 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#16828 + # source://prism//lib/prism/node.rb#16836 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#16812 + # source://prism//lib/prism/node.rb#16820 sig { returns(Prism::Location) } def keyword_loc; end @@ -32274,26 +32244,26 @@ class Prism::RescueModifierNode < ::Prism::Node # attr_reader rescue_expression: Prism::node # - # source://prism//lib/prism/node.rb#16825 + # source://prism//lib/prism/node.rb#16833 sig { returns(Prism::Node) } def rescue_expression; end # Save the keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#16820 + # source://prism//lib/prism/node.rb#16828 def save_keyword_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#16838 + # source://prism//lib/prism/node.rb#16846 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#16843 + # source://prism//lib/prism/node.rb#16851 def type; end end end @@ -32308,13 +32278,13 @@ end # # `Foo, *splat, Bar` are in the `exceptions` field. `ex` is in the `reference` field. # -# source://prism//lib/prism/node.rb#16866 +# source://prism//lib/prism/node.rb#16874 class Prism::RescueNode < ::Prism::Node # Initialize a new RescueNode node. # # @return [RescueNode] a new instance of RescueNode # - # source://prism//lib/prism/node.rb#16868 + # source://prism//lib/prism/node.rb#16876 sig do params( source: Prism::Source, @@ -32335,30 +32305,30 @@ class Prism::RescueNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#17025 + # source://prism//lib/prism/node.rb#17033 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16883 + # source://prism//lib/prism/node.rb#16891 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#16888 + # source://prism//lib/prism/node.rb#16896 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16913 + # source://prism//lib/prism/node.rb#16921 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16903 + # source://prism//lib/prism/node.rb#16911 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end @@ -32370,7 +32340,7 @@ class Prism::RescueNode < ::Prism::Node # 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, ?then_keyword_loc: Location?, ?statements: StatementsNode?, ?subsequent: RescueNode?) -> RescueNode # - # source://prism//lib/prism/node.rb#16918 + # source://prism//lib/prism/node.rb#16926 sig do params( node_id: Integer, @@ -32390,13 +32360,13 @@ class Prism::RescueNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#16923 + # source://prism//lib/prism/node.rb#16931 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, exceptions: Array[Prism::node], operator_loc: Location?, reference: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode | nil, then_keyword_loc: Location?, statements: StatementsNode?, subsequent: RescueNode? } # - # source://prism//lib/prism/node.rb#16926 + # source://prism//lib/prism/node.rb#16934 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -32404,12 +32374,12 @@ class Prism::RescueNode < ::Prism::Node # # @yield [reference] # - # source://prism//lib/prism/node.rb#16893 + # source://prism//lib/prism/node.rb#16901 def each_child_node; end # attr_reader exceptions: Array[Prism::node] # - # source://prism//lib/prism/node.rb#16944 + # source://prism//lib/prism/node.rb#16952 sig { returns(T::Array[Prism::Node]) } def exceptions; end @@ -32418,37 +32388,37 @@ class Prism::RescueNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#17009 + # source://prism//lib/prism/node.rb#17017 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#16994 + # source://prism//lib/prism/node.rb#17002 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#16931 + # source://prism//lib/prism/node.rb#16939 sig { returns(Prism::Location) } def keyword_loc; end # def operator: () -> String? # - # source://prism//lib/prism/node.rb#16999 + # source://prism//lib/prism/node.rb#17007 sig { returns(T.nilable(String)) } def operator; end # attr_reader operator_loc: Location? # - # source://prism//lib/prism/node.rb#16947 + # source://prism//lib/prism/node.rb#16955 sig { returns(T.nilable(Prism::Location)) } def operator_loc; end # attr_reader reference: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode | nil # - # source://prism//lib/prism/node.rb#16966 + # source://prism//lib/prism/node.rb#16974 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 @@ -32457,55 +32427,55 @@ class Prism::RescueNode < ::Prism::Node # Save the keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#16939 + # source://prism//lib/prism/node.rb#16947 def save_keyword_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#16961 + # source://prism//lib/prism/node.rb#16969 def save_operator_loc(repository); end # Save the then_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#16983 + # source://prism//lib/prism/node.rb#16991 def save_then_keyword_loc(repository); end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#16988 + # source://prism//lib/prism/node.rb#16996 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # attr_reader subsequent: RescueNode? # - # source://prism//lib/prism/node.rb#16991 + # source://prism//lib/prism/node.rb#16999 sig { returns(T.nilable(Prism::RescueNode)) } def subsequent; end # def then_keyword: () -> String? # - # source://prism//lib/prism/node.rb#17004 + # source://prism//lib/prism/node.rb#17012 sig { returns(T.nilable(String)) } def then_keyword; end # attr_reader then_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#16969 + # source://prism//lib/prism/node.rb#16977 sig { returns(T.nilable(Prism::Location)) } def then_keyword_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#17014 + # source://prism//lib/prism/node.rb#17022 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#17019 + # source://prism//lib/prism/node.rb#17027 def type; end end end @@ -32516,13 +32486,13 @@ end # ^^ # end # -# source://prism//lib/prism/node.rb#17043 +# source://prism//lib/prism/node.rb#17051 class Prism::RestParameterNode < ::Prism::Node # Initialize a new RestParameterNode node. # # @return [RestParameterNode] a new instance of RestParameterNode # - # source://prism//lib/prism/node.rb#17045 + # source://prism//lib/prism/node.rb#17053 sig do params( source: Prism::Source, @@ -32539,36 +32509,36 @@ class Prism::RestParameterNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#17156 + # source://prism//lib/prism/node.rb#17164 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17056 + # source://prism//lib/prism/node.rb#17064 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#17061 + # source://prism//lib/prism/node.rb#17069 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17077 + # source://prism//lib/prism/node.rb#17085 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17072 + # source://prism//lib/prism/node.rb#17080 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol?, ?name_loc: Location?, ?operator_loc: Location) -> RestParameterNode # - # source://prism//lib/prism/node.rb#17082 + # source://prism//lib/prism/node.rb#17090 sig do params( node_id: Integer, @@ -32584,19 +32554,19 @@ class Prism::RestParameterNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#17087 + # source://prism//lib/prism/node.rb#17095 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol?, name_loc: Location?, operator_loc: Location } # - # source://prism//lib/prism/node.rb#17090 + # source://prism//lib/prism/node.rb#17098 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#17066 + # source://prism//lib/prism/node.rb#17074 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -32604,31 +32574,31 @@ class Prism::RestParameterNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#17140 + # source://prism//lib/prism/node.rb#17148 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol? # - # source://prism//lib/prism/node.rb#17100 + # source://prism//lib/prism/node.rb#17108 sig { returns(T.nilable(Symbol)) } def name; end # attr_reader name_loc: Location? # - # source://prism//lib/prism/node.rb#17103 + # source://prism//lib/prism/node.rb#17111 sig { returns(T.nilable(Prism::Location)) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#17135 + # source://prism//lib/prism/node.rb#17143 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#17122 + # source://prism//lib/prism/node.rb#17130 sig { returns(Prism::Location) } def operator_loc; end @@ -32636,32 +32606,32 @@ class Prism::RestParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#17095 + # source://prism//lib/prism/node.rb#17103 sig { returns(T::Boolean) } def repeated_parameter?; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#17117 + # source://prism//lib/prism/node.rb#17125 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#17130 + # source://prism//lib/prism/node.rb#17138 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#17145 + # source://prism//lib/prism/node.rb#17153 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#17150 + # source://prism//lib/prism/node.rb#17158 def type; end end end @@ -32670,13 +32640,13 @@ end # the requested structure, any comments that were encounters, and any errors # that were encountered. # -# source://prism//lib/prism/parse_result.rb#667 +# source://prism//lib/prism/parse_result.rb#676 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#689 + # source://prism//lib/prism/parse_result.rb#698 sig do params( comments: T::Array[Prism::Comment], @@ -32691,7 +32661,7 @@ class Prism::Result # Create a code units cache for the given encoding. # - # source://prism//lib/prism/parse_result.rb#721 + # source://prism//lib/prism/parse_result.rb#730 sig do params( encoding: Encoding @@ -32701,7 +32671,7 @@ class Prism::Result # The list of comments that were encountered during parsing. # - # source://prism//lib/prism/parse_result.rb#669 + # source://prism//lib/prism/parse_result.rb#678 sig { returns(T::Array[Prism::Comment]) } def comments; end @@ -32709,25 +32679,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#677 + # source://prism//lib/prism/parse_result.rb#686 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#699 + # source://prism//lib/prism/parse_result.rb#708 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#704 + # source://prism//lib/prism/parse_result.rb#713 sig { returns(Encoding) } def encoding; end # The list of errors that were generated during parsing. # - # source://prism//lib/prism/parse_result.rb#680 + # source://prism//lib/prism/parse_result.rb#689 sig { returns(T::Array[Prism::ParseError]) } def errors; end @@ -32736,19 +32706,19 @@ class Prism::Result # # @return [Boolean] # - # source://prism//lib/prism/parse_result.rb#716 + # source://prism//lib/prism/parse_result.rb#725 sig { returns(T::Boolean) } def failure?; end # The list of magic comments that were encountered during parsing. # - # source://prism//lib/prism/parse_result.rb#672 + # source://prism//lib/prism/parse_result.rb#681 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#686 + # source://prism//lib/prism/parse_result.rb#695 sig { returns(Prism::Source) } def source; end @@ -32757,13 +32727,13 @@ class Prism::Result # # @return [Boolean] # - # source://prism//lib/prism/parse_result.rb#710 + # source://prism//lib/prism/parse_result.rb#719 sig { returns(T::Boolean) } def success?; end # The list of warnings that were generated during parsing. # - # source://prism//lib/prism/parse_result.rb#683 + # source://prism//lib/prism/parse_result.rb#692 sig { returns(T::Array[Prism::ParseWarning]) } def warnings; end end @@ -32773,68 +32743,68 @@ end # retry # ^^^^^ # -# source://prism//lib/prism/node.rb#17169 +# source://prism//lib/prism/node.rb#17177 class Prism::RetryNode < ::Prism::Node # Initialize a new RetryNode node. # # @return [RetryNode] a new instance of RetryNode # - # source://prism//lib/prism/node.rb#17171 + # source://prism//lib/prism/node.rb#17179 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#17234 + # source://prism//lib/prism/node.rb#17242 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17179 + # source://prism//lib/prism/node.rb#17187 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#17184 + # source://prism//lib/prism/node.rb#17192 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17200 + # source://prism//lib/prism/node.rb#17208 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17195 + # source://prism//lib/prism/node.rb#17203 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> RetryNode # - # source://prism//lib/prism/node.rb#17205 + # source://prism//lib/prism/node.rb#17213 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[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#17210 + # source://prism//lib/prism/node.rb#17218 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#17213 + # source://prism//lib/prism/node.rb#17221 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#17189 + # source://prism//lib/prism/node.rb#17197 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -32842,20 +32812,20 @@ class Prism::RetryNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#17218 + # source://prism//lib/prism/node.rb#17226 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#17223 + # source://prism//lib/prism/node.rb#17231 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#17228 + # source://prism//lib/prism/node.rb#17236 def type; end end end @@ -32865,13 +32835,13 @@ end # return 1 # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#17243 +# source://prism//lib/prism/node.rb#17251 class Prism::ReturnNode < ::Prism::Node # Initialize a new ReturnNode node. # # @return [ReturnNode] a new instance of ReturnNode # - # source://prism//lib/prism/node.rb#17245 + # source://prism//lib/prism/node.rb#17253 sig do params( source: Prism::Source, @@ -32887,42 +32857,42 @@ class Prism::ReturnNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#17334 + # source://prism//lib/prism/node.rb#17342 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17255 + # source://prism//lib/prism/node.rb#17263 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#17310 + # source://prism//lib/prism/node.rb#17318 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#17260 + # source://prism//lib/prism/node.rb#17268 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17279 + # source://prism//lib/prism/node.rb#17287 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17272 + # source://prism//lib/prism/node.rb#17280 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?arguments: ArgumentsNode?) -> ReturnNode # - # source://prism//lib/prism/node.rb#17284 + # source://prism//lib/prism/node.rb#17292 sig do params( node_id: Integer, @@ -32937,13 +32907,13 @@ class Prism::ReturnNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#17289 + # source://prism//lib/prism/node.rb#17297 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, arguments: ArgumentsNode? } # - # source://prism//lib/prism/node.rb#17292 + # source://prism//lib/prism/node.rb#17300 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -32951,7 +32921,7 @@ class Prism::ReturnNode < ::Prism::Node # # @yield [arguments] # - # source://prism//lib/prism/node.rb#17265 + # source://prism//lib/prism/node.rb#17273 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -32959,38 +32929,38 @@ class Prism::ReturnNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#17318 + # source://prism//lib/prism/node.rb#17326 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#17313 + # source://prism//lib/prism/node.rb#17321 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#17297 + # source://prism//lib/prism/node.rb#17305 sig { returns(Prism::Location) } def keyword_loc; end # Save the keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#17305 + # source://prism//lib/prism/node.rb#17313 def save_keyword_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#17323 + # source://prism//lib/prism/node.rb#17331 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#17328 + # source://prism//lib/prism/node.rb#17336 def type; end end end @@ -33000,13 +32970,13 @@ end # variables visible at that scope as well as the forwarding parameters # available at that scope. # -# source://prism//lib/prism/parse_result.rb#875 +# source://prism//lib/prism/parse_result.rb#884 class Prism::Scope # Create a new scope object with the given locals and forwarding. # # @return [Scope] a new instance of Scope # - # source://prism//lib/prism/parse_result.rb#886 + # source://prism//lib/prism/parse_result.rb#895 sig { params(locals: T::Array[Symbol], forwarding: T::Array[Symbol]).void } def initialize(locals, forwarding); end @@ -33014,14 +32984,14 @@ class Prism::Scope # should by defined as an array of symbols containing the specific values of # :*, :**, :&, or :"...". # - # source://prism//lib/prism/parse_result.rb#883 + # source://prism//lib/prism/parse_result.rb#892 sig { returns(T::Array[Symbol]) } def forwarding; end # The list of local variables that are defined in this scope. This should be # defined as an array of symbols. # - # source://prism//lib/prism/parse_result.rb#878 + # source://prism//lib/prism/parse_result.rb#887 sig { returns(T::Array[Symbol]) } def locals; end end @@ -33031,68 +33001,68 @@ end # self # ^^^^ # -# source://prism//lib/prism/node.rb#17345 +# source://prism//lib/prism/node.rb#17353 class Prism::SelfNode < ::Prism::Node # Initialize a new SelfNode node. # # @return [SelfNode] a new instance of SelfNode # - # source://prism//lib/prism/node.rb#17347 + # source://prism//lib/prism/node.rb#17355 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#17410 + # source://prism//lib/prism/node.rb#17418 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17355 + # source://prism//lib/prism/node.rb#17363 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#17360 + # source://prism//lib/prism/node.rb#17368 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17376 + # source://prism//lib/prism/node.rb#17384 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17371 + # source://prism//lib/prism/node.rb#17379 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> SelfNode # - # source://prism//lib/prism/node.rb#17381 + # source://prism//lib/prism/node.rb#17389 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[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#17386 + # source://prism//lib/prism/node.rb#17394 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#17389 + # source://prism//lib/prism/node.rb#17397 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#17365 + # source://prism//lib/prism/node.rb#17373 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -33100,20 +33070,20 @@ class Prism::SelfNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#17394 + # source://prism//lib/prism/node.rb#17402 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#17399 + # source://prism//lib/prism/node.rb#17407 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#17404 + # source://prism//lib/prism/node.rb#17412 def type; end end end @@ -33320,13 +33290,13 @@ Prism::Serialize::TOKEN_TYPES = T.let(T.unsafe(nil), Array) # C = { a: 1 } # ^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#17420 +# source://prism//lib/prism/node.rb#17428 class Prism::ShareableConstantNode < ::Prism::Node # Initialize a new ShareableConstantNode node. # # @return [ShareableConstantNode] a new instance of ShareableConstantNode # - # source://prism//lib/prism/node.rb#17422 + # source://prism//lib/prism/node.rb#17430 sig do params( source: Prism::Source, @@ -33341,36 +33311,36 @@ class Prism::ShareableConstantNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#17505 + # source://prism//lib/prism/node.rb#17513 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17431 + # source://prism//lib/prism/node.rb#17439 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#17436 + # source://prism//lib/prism/node.rb#17444 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17453 + # source://prism//lib/prism/node.rb#17461 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17448 + # source://prism//lib/prism/node.rb#17456 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?write: ConstantWriteNode | ConstantAndWriteNode | ConstantOrWriteNode | ConstantOperatorWriteNode | ConstantPathWriteNode | ConstantPathAndWriteNode | ConstantPathOrWriteNode | ConstantPathOperatorWriteNode) -> ShareableConstantNode # - # source://prism//lib/prism/node.rb#17458 + # source://prism//lib/prism/node.rb#17466 sig do params( node_id: Integer, @@ -33384,13 +33354,13 @@ class Prism::ShareableConstantNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#17463 + # source://prism//lib/prism/node.rb#17471 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, write: ConstantWriteNode | ConstantAndWriteNode | ConstantOrWriteNode | ConstantOperatorWriteNode | ConstantPathWriteNode | ConstantPathAndWriteNode | ConstantPathOrWriteNode | ConstantPathOperatorWriteNode } # - # source://prism//lib/prism/node.rb#17466 + # source://prism//lib/prism/node.rb#17474 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -33398,14 +33368,14 @@ class Prism::ShareableConstantNode < ::Prism::Node # # @yield [write] # - # source://prism//lib/prism/node.rb#17441 + # source://prism//lib/prism/node.rb#17449 def each_child_node; end # def experimental_copy?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#17481 + # source://prism//lib/prism/node.rb#17489 sig { returns(T::Boolean) } def experimental_copy?; end @@ -33413,7 +33383,7 @@ class Prism::ShareableConstantNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#17476 + # source://prism//lib/prism/node.rb#17484 sig { returns(T::Boolean) } def experimental_everything?; end @@ -33422,7 +33392,7 @@ class Prism::ShareableConstantNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#17489 + # source://prism//lib/prism/node.rb#17497 sig { override.returns(String) } def inspect; end @@ -33430,19 +33400,19 @@ class Prism::ShareableConstantNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#17471 + # source://prism//lib/prism/node.rb#17479 sig { returns(T::Boolean) } def literal?; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#17494 + # source://prism//lib/prism/node.rb#17502 sig { override.returns(Symbol) } def type; end # The constant write that should be modified with the shareability state. # - # source://prism//lib/prism/node.rb#17486 + # source://prism//lib/prism/node.rb#17494 sig do returns(T.any(Prism::ConstantWriteNode, Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode, Prism::ConstantOperatorWriteNode, Prism::ConstantPathWriteNode, Prism::ConstantPathAndWriteNode, Prism::ConstantPathOrWriteNode, Prism::ConstantPathOperatorWriteNode)) end @@ -33451,29 +33421,29 @@ class Prism::ShareableConstantNode < ::Prism::Node class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#17499 + # source://prism//lib/prism/node.rb#17507 def type; end end end # Flags for shareable constant nodes. # -# source://prism//lib/prism/node.rb#19910 +# source://prism//lib/prism/node.rb#19918 module Prism::ShareableConstantNodeFlags; end # constant writes that should be modified with shareable constant value experimental copy # -# source://prism//lib/prism/node.rb#19918 +# source://prism//lib/prism/node.rb#19926 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#19915 +# source://prism//lib/prism/node.rb#19923 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#19912 +# source://prism//lib/prism/node.rb#19920 Prism::ShareableConstantNodeFlags::LITERAL = T.let(T.unsafe(nil), Integer) # Represents a singleton class declaration involving the `class` keyword. @@ -33481,13 +33451,13 @@ Prism::ShareableConstantNodeFlags::LITERAL = T.let(T.unsafe(nil), Integer) # class << self end # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#17516 +# source://prism//lib/prism/node.rb#17524 class Prism::SingletonClassNode < ::Prism::Node # Initialize a new SingletonClassNode node. # # @return [SingletonClassNode] a new instance of SingletonClassNode # - # source://prism//lib/prism/node.rb#17518 + # source://prism//lib/prism/node.rb#17526 sig do params( source: Prism::Source, @@ -33507,54 +33477,54 @@ class Prism::SingletonClassNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#17655 + # source://prism//lib/prism/node.rb#17663 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17532 + # source://prism//lib/prism/node.rb#17540 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader body: StatementsNode | BeginNode | nil # - # source://prism//lib/prism/node.rb#17608 + # source://prism//lib/prism/node.rb#17616 sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } def body; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#17537 + # source://prism//lib/prism/node.rb#17545 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def class_keyword: () -> String # - # source://prism//lib/prism/node.rb#17624 + # source://prism//lib/prism/node.rb#17632 sig { returns(String) } def class_keyword; end # attr_reader class_keyword_loc: Location # - # source://prism//lib/prism/node.rb#17579 + # source://prism//lib/prism/node.rb#17587 sig { returns(Prism::Location) } def class_keyword_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17558 + # source://prism//lib/prism/node.rb#17566 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17550 + # source://prism//lib/prism/node.rb#17558 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?class_keyword_loc: Location, ?operator_loc: Location, ?expression: Prism::node, ?body: StatementsNode | BeginNode | nil, ?end_keyword_loc: Location) -> SingletonClassNode # - # source://prism//lib/prism/node.rb#17563 + # source://prism//lib/prism/node.rb#17571 sig do params( node_id: Integer, @@ -33573,13 +33543,13 @@ class Prism::SingletonClassNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#17568 + # source://prism//lib/prism/node.rb#17576 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { 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#17571 + # source://prism//lib/prism/node.rb#17579 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -33587,24 +33557,24 @@ class Prism::SingletonClassNode < ::Prism::Node # # @yield [expression] # - # source://prism//lib/prism/node.rb#17542 + # source://prism//lib/prism/node.rb#17550 def each_child_node; end # def end_keyword: () -> String # - # source://prism//lib/prism/node.rb#17634 + # source://prism//lib/prism/node.rb#17642 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism//lib/prism/node.rb#17611 + # source://prism//lib/prism/node.rb#17619 sig { returns(Prism::Location) } def end_keyword_loc; end # attr_reader expression: Prism::node # - # source://prism//lib/prism/node.rb#17605 + # source://prism//lib/prism/node.rb#17613 sig { returns(Prism::Node) } def expression; end @@ -33613,56 +33583,56 @@ class Prism::SingletonClassNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#17639 + # source://prism//lib/prism/node.rb#17647 sig { override.returns(String) } def inspect; end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#17576 + # source://prism//lib/prism/node.rb#17584 sig { returns(T::Array[Symbol]) } def locals; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#17629 + # source://prism//lib/prism/node.rb#17637 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#17592 + # source://prism//lib/prism/node.rb#17600 sig { returns(Prism::Location) } def operator_loc; end # Save the class_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#17587 + # source://prism//lib/prism/node.rb#17595 def save_class_keyword_loc(repository); end # Save the end_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#17619 + # source://prism//lib/prism/node.rb#17627 def save_end_keyword_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#17600 + # source://prism//lib/prism/node.rb#17608 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#17644 + # source://prism//lib/prism/node.rb#17652 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#17649 + # source://prism//lib/prism/node.rb#17657 def type; end end end @@ -33681,22 +33651,27 @@ class Prism::Source 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 + # Converts the line number and column in bytes to a byte offset. + # + # source://prism//lib/prism/parse_result.rb#80 + def byte_offset(line, column); end + # Return the column number in characters for the given byte offset. # - # source://prism//lib/prism/parse_result.rb#108 + # source://prism//lib/prism/parse_result.rb#117 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#103 + # source://prism//lib/prism/parse_result.rb#112 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#136 + # source://prism//lib/prism/parse_result.rb#145 sig do params( encoding: Encoding @@ -33707,7 +33682,7 @@ class Prism::Source # Returns the column number in code units for the given encoding for the # given byte offset. # - # source://prism//lib/prism/parse_result.rb#142 + # source://prism//lib/prism/parse_result.rb#151 sig { params(byte_offset: Integer, encoding: Encoding).returns(Integer) } def code_units_column(byte_offset, encoding); end @@ -33724,19 +33699,19 @@ class Prism::Source # 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#124 + # source://prism//lib/prism/parse_result.rb#133 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#98 + # source://prism//lib/prism/parse_result.rb#107 sig { params(byte_offset: Integer).returns(Integer) } def column(byte_offset); end # Freeze this object and the objects it contains. # - # source://prism//lib/prism/parse_result.rb#147 + # source://prism//lib/prism/parse_result.rb#156 def deep_freeze; end # Returns the encoding of the source code, which is set by parameters to the @@ -33749,20 +33724,20 @@ 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#81 + # source://prism//lib/prism/parse_result.rb#90 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#93 + # source://prism//lib/prism/parse_result.rb#102 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#87 + # source://prism//lib/prism/parse_result.rb#96 sig { params(byte_offset: Integer).returns(Integer) } def line_start(byte_offset); end @@ -33814,7 +33789,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#157 + # source://prism//lib/prism/parse_result.rb#166 def find_line(byte_offset); end class << self @@ -33833,68 +33808,68 @@ end # __ENCODING__ # ^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#17671 +# source://prism//lib/prism/node.rb#17679 class Prism::SourceEncodingNode < ::Prism::Node # Initialize a new SourceEncodingNode node. # # @return [SourceEncodingNode] a new instance of SourceEncodingNode # - # source://prism//lib/prism/node.rb#17673 + # source://prism//lib/prism/node.rb#17681 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#17736 + # source://prism//lib/prism/node.rb#17744 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17681 + # source://prism//lib/prism/node.rb#17689 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#17686 + # source://prism//lib/prism/node.rb#17694 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17702 + # source://prism//lib/prism/node.rb#17710 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17697 + # source://prism//lib/prism/node.rb#17705 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> SourceEncodingNode # - # source://prism//lib/prism/node.rb#17707 + # source://prism//lib/prism/node.rb#17715 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[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#17712 + # source://prism//lib/prism/node.rb#17720 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#17715 + # source://prism//lib/prism/node.rb#17723 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#17691 + # source://prism//lib/prism/node.rb#17699 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -33902,20 +33877,20 @@ class Prism::SourceEncodingNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#17720 + # source://prism//lib/prism/node.rb#17728 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#17725 + # source://prism//lib/prism/node.rb#17733 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#17730 + # source://prism//lib/prism/node.rb#17738 def type; end end end @@ -33925,13 +33900,13 @@ end # __FILE__ # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#17745 +# source://prism//lib/prism/node.rb#17753 class Prism::SourceFileNode < ::Prism::Node # Initialize a new SourceFileNode node. # # @return [SourceFileNode] a new instance of SourceFileNode # - # source://prism//lib/prism/node.rb#17747 + # source://prism//lib/prism/node.rb#17755 sig do params( source: Prism::Source, @@ -33946,36 +33921,36 @@ class Prism::SourceFileNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#17834 + # source://prism//lib/prism/node.rb#17842 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17756 + # source://prism//lib/prism/node.rb#17764 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#17761 + # source://prism//lib/prism/node.rb#17769 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17777 + # source://prism//lib/prism/node.rb#17785 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17772 + # source://prism//lib/prism/node.rb#17780 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?filepath: String) -> SourceFileNode # - # source://prism//lib/prism/node.rb#17782 + # source://prism//lib/prism/node.rb#17790 sig do params( node_id: Integer, @@ -33989,19 +33964,19 @@ class Prism::SourceFileNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#17787 + # source://prism//lib/prism/node.rb#17795 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, filepath: String } # - # source://prism//lib/prism/node.rb#17790 + # source://prism//lib/prism/node.rb#17798 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#17766 + # source://prism//lib/prism/node.rb#17774 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -34009,7 +33984,7 @@ class Prism::SourceFileNode < ::Prism::Node # Represents the file path being parsed. This corresponds directly to the `filepath` option given to the various `Prism::parse*` APIs. # - # source://prism//lib/prism/node.rb#17815 + # source://prism//lib/prism/node.rb#17823 sig { returns(String) } def filepath; end @@ -34017,7 +33992,7 @@ class Prism::SourceFileNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#17800 + # source://prism//lib/prism/node.rb#17808 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -34025,7 +34000,7 @@ class Prism::SourceFileNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#17795 + # source://prism//lib/prism/node.rb#17803 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -34033,13 +34008,13 @@ class Prism::SourceFileNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#17805 + # source://prism//lib/prism/node.rb#17813 sig { returns(T::Boolean) } def frozen?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#17818 + # source://prism//lib/prism/node.rb#17826 sig { override.returns(String) } def inspect; end @@ -34047,20 +34022,20 @@ class Prism::SourceFileNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#17810 + # source://prism//lib/prism/node.rb#17818 sig { returns(T::Boolean) } def mutable?; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#17823 + # source://prism//lib/prism/node.rb#17831 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#17828 + # source://prism//lib/prism/node.rb#17836 def type; end end end @@ -34070,68 +34045,68 @@ end # __LINE__ # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#17845 +# source://prism//lib/prism/node.rb#17853 class Prism::SourceLineNode < ::Prism::Node # Initialize a new SourceLineNode node. # # @return [SourceLineNode] a new instance of SourceLineNode # - # source://prism//lib/prism/node.rb#17847 + # source://prism//lib/prism/node.rb#17855 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#17910 + # source://prism//lib/prism/node.rb#17918 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17855 + # source://prism//lib/prism/node.rb#17863 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#17860 + # source://prism//lib/prism/node.rb#17868 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17876 + # source://prism//lib/prism/node.rb#17884 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17871 + # source://prism//lib/prism/node.rb#17879 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#17881 + # source://prism//lib/prism/node.rb#17889 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[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#17886 + # source://prism//lib/prism/node.rb#17894 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#17889 + # source://prism//lib/prism/node.rb#17897 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#17865 + # source://prism//lib/prism/node.rb#17873 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -34139,20 +34114,20 @@ class Prism::SourceLineNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#17894 + # source://prism//lib/prism/node.rb#17902 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#17899 + # source://prism//lib/prism/node.rb#17907 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#17904 + # source://prism//lib/prism/node.rb#17912 def type; end end end @@ -34162,13 +34137,13 @@ end # [*a] # ^^ # -# source://prism//lib/prism/node.rb#17919 +# source://prism//lib/prism/node.rb#17927 class Prism::SplatNode < ::Prism::Node # Initialize a new SplatNode node. # # @return [SplatNode] a new instance of SplatNode # - # source://prism//lib/prism/node.rb#17921 + # source://prism//lib/prism/node.rb#17929 sig do params( source: Prism::Source, @@ -34184,36 +34159,36 @@ class Prism::SplatNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#18010 + # source://prism//lib/prism/node.rb#18018 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17931 + # source://prism//lib/prism/node.rb#17939 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#17936 + # source://prism//lib/prism/node.rb#17944 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17955 + # source://prism//lib/prism/node.rb#17963 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17948 + # source://prism//lib/prism/node.rb#17956 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?operator_loc: Location, ?expression: Prism::node?) -> SplatNode # - # source://prism//lib/prism/node.rb#17960 + # source://prism//lib/prism/node.rb#17968 sig do params( node_id: Integer, @@ -34228,13 +34203,13 @@ class Prism::SplatNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#17965 + # source://prism//lib/prism/node.rb#17973 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, operator_loc: Location, expression: Prism::node? } # - # source://prism//lib/prism/node.rb#17968 + # source://prism//lib/prism/node.rb#17976 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -34242,12 +34217,12 @@ class Prism::SplatNode < ::Prism::Node # # @yield [expression] # - # source://prism//lib/prism/node.rb#17941 + # source://prism//lib/prism/node.rb#17949 def each_child_node; end # attr_reader expression: Prism::node? # - # source://prism//lib/prism/node.rb#17986 + # source://prism//lib/prism/node.rb#17994 sig { returns(T.nilable(Prism::Node)) } def expression; end @@ -34256,38 +34231,38 @@ class Prism::SplatNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#17994 + # source://prism//lib/prism/node.rb#18002 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#17989 + # source://prism//lib/prism/node.rb#17997 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#17973 + # source://prism//lib/prism/node.rb#17981 sig { returns(Prism::Location) } def operator_loc; end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#17981 + # source://prism//lib/prism/node.rb#17989 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#17999 + # source://prism//lib/prism/node.rb#18007 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#18004 + # source://prism//lib/prism/node.rb#18012 def type; end end end @@ -34297,13 +34272,13 @@ end # foo; bar; baz # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#18021 +# source://prism//lib/prism/node.rb#18029 class Prism::StatementsNode < ::Prism::Node # Initialize a new StatementsNode node. # # @return [StatementsNode] a new instance of StatementsNode # - # source://prism//lib/prism/node.rb#18023 + # source://prism//lib/prism/node.rb#18031 sig do params( source: Prism::Source, @@ -34318,42 +34293,42 @@ class Prism::StatementsNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#18091 + # source://prism//lib/prism/node.rb#18099 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18032 + # source://prism//lib/prism/node.rb#18040 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#18072 + # source://prism//lib/prism/node.rb#18080 sig { returns(T::Array[Prism::Node]) } def body; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#18037 + # source://prism//lib/prism/node.rb#18045 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#18054 + # source://prism//lib/prism/node.rb#18062 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#18049 + # source://prism//lib/prism/node.rb#18057 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?body: Array[Prism::node]) -> StatementsNode # - # source://prism//lib/prism/node.rb#18059 + # source://prism//lib/prism/node.rb#18067 sig do params( node_id: Integer, @@ -34367,19 +34342,19 @@ class Prism::StatementsNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#18064 + # source://prism//lib/prism/node.rb#18072 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, body: Array[Prism::node] } # - # source://prism//lib/prism/node.rb#18067 + # source://prism//lib/prism/node.rb#18075 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#18042 + # source://prism//lib/prism/node.rb#18050 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -34387,43 +34362,43 @@ class Prism::StatementsNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#18075 + # source://prism//lib/prism/node.rb#18083 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#18080 + # source://prism//lib/prism/node.rb#18088 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#18085 + # source://prism//lib/prism/node.rb#18093 def type; end end end # Flags for string nodes. # -# source://prism//lib/prism/node.rb#19922 +# source://prism//lib/prism/node.rb#19930 module Prism::StringFlags; end # internal bytes forced the encoding to binary # -# source://prism//lib/prism/node.rb#19927 +# source://prism//lib/prism/node.rb#19935 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#19924 +# source://prism//lib/prism/node.rb#19932 Prism::StringFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/node.rb#19930 +# source://prism//lib/prism/node.rb#19938 Prism::StringFlags::FROZEN = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/node.rb#19933 +# source://prism//lib/prism/node.rb#19941 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. @@ -34437,7 +34412,7 @@ Prism::StringFlags::MUTABLE = T.let(T.unsafe(nil), Integer) # "foo #{bar} baz" # ^^^^ ^^^^ # -# source://prism//lib/prism/node.rb#18108 +# source://prism//lib/prism/node.rb#18116 class Prism::StringNode < ::Prism::Node include ::Prism::HeredocQuery @@ -34445,7 +34420,7 @@ class Prism::StringNode < ::Prism::Node # # @return [StringNode] a new instance of StringNode # - # source://prism//lib/prism/node.rb#18110 + # source://prism//lib/prism/node.rb#18118 sig do params( source: Prism::Source, @@ -34463,60 +34438,60 @@ class Prism::StringNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#18266 + # source://prism//lib/prism/node.rb#18274 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18122 + # source://prism//lib/prism/node.rb#18130 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#18127 + # source://prism//lib/prism/node.rb#18135 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#18245 + # source://prism//lib/prism/node.rb#18253 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#18213 + # source://prism//lib/prism/node.rb#18221 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#18143 + # source://prism//lib/prism/node.rb#18151 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#18138 + # source://prism//lib/prism/node.rb#18146 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def content: () -> String # - # source://prism//lib/prism/node.rb#18240 + # source://prism//lib/prism/node.rb#18248 sig { returns(String) } def content; end # attr_reader content_loc: Location # - # source://prism//lib/prism/node.rb#18200 + # source://prism//lib/prism/node.rb#18208 sig { returns(Prism::Location) } def content_loc; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location?, ?content_loc: Location, ?closing_loc: Location?, ?unescaped: String) -> StringNode # - # source://prism//lib/prism/node.rb#18148 + # source://prism//lib/prism/node.rb#18156 sig do params( node_id: Integer, @@ -34533,19 +34508,19 @@ class Prism::StringNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#18153 + # source://prism//lib/prism/node.rb#18161 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location?, content_loc: Location, closing_loc: Location?, unescaped: String } # - # source://prism//lib/prism/node.rb#18156 + # source://prism//lib/prism/node.rb#18164 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#18132 + # source://prism//lib/prism/node.rb#18140 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -34555,7 +34530,7 @@ class Prism::StringNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#18166 + # source://prism//lib/prism/node.rb#18174 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -34563,7 +34538,7 @@ class Prism::StringNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#18161 + # source://prism//lib/prism/node.rb#18169 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -34571,7 +34546,7 @@ class Prism::StringNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#18171 + # source://prism//lib/prism/node.rb#18179 sig { returns(T::Boolean) } def frozen?; end @@ -34580,7 +34555,7 @@ class Prism::StringNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#18250 + # source://prism//lib/prism/node.rb#18258 sig { override.returns(String) } def inspect; end @@ -34588,38 +34563,38 @@ class Prism::StringNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#18176 + # source://prism//lib/prism/node.rb#18184 sig { returns(T::Boolean) } def mutable?; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#18235 + # source://prism//lib/prism/node.rb#18243 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#18181 + # source://prism//lib/prism/node.rb#18189 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#18227 + # source://prism//lib/prism/node.rb#18235 def save_closing_loc(repository); end # Save the content_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#18208 + # source://prism//lib/prism/node.rb#18216 def save_content_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#18195 + # source://prism//lib/prism/node.rb#18203 def save_opening_loc(repository); end # Occasionally it's helpful to treat a string as if it were interpolated so @@ -34631,20 +34606,20 @@ class Prism::StringNode < ::Prism::Node # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#18255 + # source://prism//lib/prism/node.rb#18263 sig { override.returns(Symbol) } def type; end # attr_reader unescaped: String # - # source://prism//lib/prism/node.rb#18232 + # source://prism//lib/prism/node.rb#18240 sig { returns(String) } def unescaped; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#18260 + # source://prism//lib/prism/node.rb#18268 def type; end end end @@ -34692,21 +34667,21 @@ class Prism::StringQuery # # @return [Boolean] # - # source://prism//lib/prism.rb#105 + # source://prism//lib/prism.rb#92 def constant?(_arg0); end # Mirrors the C extension's StringQuery::local? method. # # @return [Boolean] # - # source://prism//lib/prism.rb#105 + # source://prism//lib/prism.rb#92 def local?(_arg0); end # Mirrors the C extension's StringQuery::method_name? method. # # @return [Boolean] # - # source://prism//lib/prism.rb#105 + # source://prism//lib/prism.rb#92 def method_name?(_arg0); end end end @@ -34721,13 +34696,13 @@ end # # If no arguments are provided (except for a block), it would be a `ForwardingSuperNode` instead. # -# source://prism//lib/prism/node.rb#18285 +# source://prism//lib/prism/node.rb#18293 class Prism::SuperNode < ::Prism::Node # Initialize a new SuperNode node. # # @return [SuperNode] a new instance of SuperNode # - # source://prism//lib/prism/node.rb#18287 + # source://prism//lib/prism/node.rb#18295 sig do params( source: Prism::Source, @@ -34746,48 +34721,48 @@ class Prism::SuperNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#18432 + # source://prism//lib/prism/node.rb#18440 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18300 + # source://prism//lib/prism/node.rb#18308 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # Can be only `nil` when there are empty parentheses, like `super()`. # - # source://prism//lib/prism/node.rb#18376 + # source://prism//lib/prism/node.rb#18384 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # attr_reader block: BlockNode | BlockArgumentNode | nil # - # source://prism//lib/prism/node.rb#18398 + # source://prism//lib/prism/node.rb#18406 sig { returns(T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode))) } def block; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#18305 + # source://prism//lib/prism/node.rb#18313 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#18326 + # source://prism//lib/prism/node.rb#18334 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#18318 + # source://prism//lib/prism/node.rb#18326 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?lparen_loc: Location?, ?arguments: ArgumentsNode?, ?rparen_loc: Location?, ?block: BlockNode | BlockArgumentNode | nil) -> SuperNode # - # source://prism//lib/prism/node.rb#18331 + # source://prism//lib/prism/node.rb#18339 sig do params( node_id: Integer, @@ -34805,13 +34780,13 @@ class Prism::SuperNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#18336 + # source://prism//lib/prism/node.rb#18344 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { 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#18339 + # source://prism//lib/prism/node.rb#18347 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -34819,7 +34794,7 @@ class Prism::SuperNode < ::Prism::Node # # @yield [arguments] # - # source://prism//lib/prism/node.rb#18310 + # source://prism//lib/prism/node.rb#18318 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -34827,96 +34802,96 @@ class Prism::SuperNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#18416 + # source://prism//lib/prism/node.rb#18424 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#18401 + # source://prism//lib/prism/node.rb#18409 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#18344 + # source://prism//lib/prism/node.rb#18352 sig { returns(Prism::Location) } def keyword_loc; end # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#18406 + # source://prism//lib/prism/node.rb#18414 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://prism//lib/prism/node.rb#18357 + # source://prism//lib/prism/node.rb#18365 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#18411 + # source://prism//lib/prism/node.rb#18419 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://prism//lib/prism/node.rb#18379 + # source://prism//lib/prism/node.rb#18387 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end # Save the keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#18352 + # source://prism//lib/prism/node.rb#18360 def save_keyword_loc(repository); end # Save the lparen_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#18371 + # source://prism//lib/prism/node.rb#18379 def save_lparen_loc(repository); end # Save the rparen_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#18393 + # source://prism//lib/prism/node.rb#18401 def save_rparen_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#18421 + # source://prism//lib/prism/node.rb#18429 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#18426 + # source://prism//lib/prism/node.rb#18434 def type; end end end # Flags for symbol nodes. # -# source://prism//lib/prism/node.rb#19937 +# source://prism//lib/prism/node.rb#19945 module Prism::SymbolFlags; end # internal bytes forced the encoding to binary # -# source://prism//lib/prism/node.rb#19942 +# source://prism//lib/prism/node.rb#19950 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#19945 +# source://prism//lib/prism/node.rb#19953 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#19939 +# source://prism//lib/prism/node.rb#19947 Prism::SymbolFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) # Represents a symbol literal or a symbol contained within a `%i` list. @@ -34927,13 +34902,13 @@ Prism::SymbolFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) # %i[foo] # ^^^ # -# source://prism//lib/prism/node.rb#18449 +# source://prism//lib/prism/node.rb#18457 class Prism::SymbolNode < ::Prism::Node # Initialize a new SymbolNode node. # # @return [SymbolNode] a new instance of SymbolNode # - # source://prism//lib/prism/node.rb#18451 + # source://prism//lib/prism/node.rb#18459 sig do params( source: Prism::Source, @@ -34951,48 +34926,48 @@ class Prism::SymbolNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#18608 + # source://prism//lib/prism/node.rb#18616 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18463 + # source://prism//lib/prism/node.rb#18471 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#18468 + # source://prism//lib/prism/node.rb#18476 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#18587 + # source://prism//lib/prism/node.rb#18595 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#18555 + # source://prism//lib/prism/node.rb#18563 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#18484 + # source://prism//lib/prism/node.rb#18492 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#18479 + # source://prism//lib/prism/node.rb#18487 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location?, ?value_loc: Location?, ?closing_loc: Location?, ?unescaped: String) -> SymbolNode # - # source://prism//lib/prism/node.rb#18489 + # source://prism//lib/prism/node.rb#18497 sig do params( node_id: Integer, @@ -35009,19 +34984,19 @@ class Prism::SymbolNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#18494 + # source://prism//lib/prism/node.rb#18502 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location?, value_loc: Location?, closing_loc: Location?, unescaped: String } # - # source://prism//lib/prism/node.rb#18497 + # source://prism//lib/prism/node.rb#18505 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#18473 + # source://prism//lib/prism/node.rb#18481 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -35031,7 +35006,7 @@ class Prism::SymbolNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#18507 + # source://prism//lib/prism/node.rb#18515 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -35039,7 +35014,7 @@ class Prism::SymbolNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#18512 + # source://prism//lib/prism/node.rb#18520 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end @@ -35047,133 +35022,133 @@ class Prism::SymbolNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#18502 + # source://prism//lib/prism/node.rb#18510 sig { returns(T::Boolean) } def forced_utf8_encoding?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#18592 + # source://prism//lib/prism/node.rb#18600 sig { override.returns(String) } def inspect; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#18577 + # source://prism//lib/prism/node.rb#18585 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#18517 + # source://prism//lib/prism/node.rb#18525 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#18569 + # source://prism//lib/prism/node.rb#18577 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#18531 + # source://prism//lib/prism/node.rb#18539 def save_opening_loc(repository); end # Save the value_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#18550 + # source://prism//lib/prism/node.rb#18558 def save_value_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#18597 + # source://prism//lib/prism/node.rb#18605 sig { override.returns(Symbol) } def type; end # attr_reader unescaped: String # - # source://prism//lib/prism/node.rb#18574 + # source://prism//lib/prism/node.rb#18582 sig { returns(String) } def unescaped; end # def value: () -> String? # - # source://prism//lib/prism/node.rb#18582 + # source://prism//lib/prism/node.rb#18590 sig { returns(T.nilable(String)) } def value; end # attr_reader value_loc: Location? # - # source://prism//lib/prism/node.rb#18536 + # source://prism//lib/prism/node.rb#18544 sig { returns(T.nilable(Prism::Location)) } def value_loc; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#18602 + # source://prism//lib/prism/node.rb#18610 def type; end end end # This represents a token from the Ruby source. # -# source://prism//lib/prism/parse_result.rb#804 +# source://prism//lib/prism/parse_result.rb#813 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#816 + # source://prism//lib/prism/parse_result.rb#825 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#851 + # source://prism//lib/prism/parse_result.rb#860 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#824 + # source://prism//lib/prism/parse_result.rb#833 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # Freeze this object and the objects it contains. # - # source://prism//lib/prism/parse_result.rb#864 + # source://prism//lib/prism/parse_result.rb#873 def deep_freeze; end # Returns a string representation of this token. # - # source://prism//lib/prism/parse_result.rb#858 + # source://prism//lib/prism/parse_result.rb#867 def inspect; end # A Location object representing the location of this token in the source. # - # source://prism//lib/prism/parse_result.rb#829 + # source://prism//lib/prism/parse_result.rb#838 sig { returns(Prism::Location) } def location; end # Implement the pretty print interface for Token. # - # source://prism//lib/prism/parse_result.rb#836 + # source://prism//lib/prism/parse_result.rb#845 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#810 + # source://prism//lib/prism/parse_result.rb#819 sig { returns(Symbol) } def type; end # A byteslice of the source that this token represents. # - # source://prism//lib/prism/parse_result.rb#813 + # source://prism//lib/prism/parse_result.rb#822 sig { returns(String) } def value; end @@ -35181,7 +35156,7 @@ class Prism::Token # The Source object that represents the source this token came from. # - # source://prism//lib/prism/parse_result.rb#806 + # source://prism//lib/prism/parse_result.rb#815 sig { returns(Prism::Source) } def source; end end @@ -36856,89 +36831,89 @@ class Prism::Translation::Ripper < ::Prism::Compiler # # @return [Ripper] a new instance of Ripper # - # source://prism//lib/prism/translation/ripper.rb#468 + # source://prism//lib/prism/translation/ripper.rb#482 def initialize(source, filename = T.unsafe(nil), lineno = T.unsafe(nil)); end # The current column number of the parser. # - # source://prism//lib/prism/translation/ripper.rb#465 + # source://prism//lib/prism/translation/ripper.rb#479 def column; end # True if the parser encountered an error during parsing. # # @return [Boolean] # - # source://prism//lib/prism/translation/ripper.rb#481 + # source://prism//lib/prism/translation/ripper.rb#495 sig { returns(T::Boolean) } def error?; end # The filename of the source being parsed. # - # source://prism//lib/prism/translation/ripper.rb#459 + # source://prism//lib/prism/translation/ripper.rb#473 def filename; end # The current line number of the parser. # - # source://prism//lib/prism/translation/ripper.rb#462 + # source://prism//lib/prism/translation/ripper.rb#476 def lineno; end # Parse the source and return the result. # - # source://prism//lib/prism/translation/ripper.rb#486 + # source://prism//lib/prism/translation/ripper.rb#500 sig { returns(T.untyped) } def parse; end # The source that is being parsed. # - # source://prism//lib/prism/translation/ripper.rb#456 + # source://prism//lib/prism/translation/ripper.rb#470 def source; end # alias $foo $bar # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#585 + # source://prism//lib/prism/translation/ripper.rb#599 def visit_alias_global_variable_node(node); end # alias foo bar # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#575 + # source://prism//lib/prism/translation/ripper.rb#589 def visit_alias_method_node(node); end # foo => bar | baz # ^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#609 + # source://prism//lib/prism/translation/ripper.rb#623 def visit_alternation_pattern_node(node); end # a and b # ^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#629 + # source://prism//lib/prism/translation/ripper.rb#643 def visit_and_node(node); end # foo(bar) # ^^^ # - # source://prism//lib/prism/translation/ripper.rb#820 + # source://prism//lib/prism/translation/ripper.rb#834 def visit_arguments_node(node); end # [] # ^^ # - # source://prism//lib/prism/translation/ripper.rb#639 + # source://prism//lib/prism/translation/ripper.rb#653 def visit_array_node(node); end # foo => [bar] # ^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#799 + # source://prism//lib/prism/translation/ripper.rb#813 def visit_array_pattern_node(node); end # { a: 1 } # ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#827 + # source://prism//lib/prism/translation/ripper.rb#841 def visit_assoc_node(node); end # def foo(**); bar(**); end @@ -36947,47 +36922,47 @@ class Prism::Translation::Ripper < ::Prism::Compiler # { **foo } # ^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#840 + # source://prism//lib/prism/translation/ripper.rb#854 def visit_assoc_splat_node(node); end # $+ # ^^ # - # source://prism//lib/prism/translation/ripper.rb#849 + # source://prism//lib/prism/translation/ripper.rb#863 def visit_back_reference_read_node(node); end # begin end # ^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#856 + # source://prism//lib/prism/translation/ripper.rb#870 def visit_begin_node(node); end # foo(&bar) # ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#920 + # source://prism//lib/prism/translation/ripper.rb#934 def visit_block_argument_node(node); end # foo { |; bar| } # ^^^ # - # source://prism//lib/prism/translation/ripper.rb#926 + # source://prism//lib/prism/translation/ripper.rb#940 def visit_block_local_variable_node(node); end # Visit a BlockNode. # - # source://prism//lib/prism/translation/ripper.rb#932 + # source://prism//lib/prism/translation/ripper.rb#946 def visit_block_node(node); end # def foo(&bar); end # ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#968 + # source://prism//lib/prism/translation/ripper.rb#982 def visit_block_parameter_node(node); end # A block's parameters. # - # source://prism//lib/prism/translation/ripper.rb#982 + # source://prism//lib/prism/translation/ripper.rb#996 def visit_block_parameters_node(node); end # break @@ -36996,13 +36971,13 @@ class Prism::Translation::Ripper < ::Prism::Compiler # break foo # ^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1006 + # source://prism//lib/prism/translation/ripper.rb#1020 def visit_break_node(node); end # foo.bar &&= baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1228 + # source://prism//lib/prism/translation/ripper.rb#1251 def visit_call_and_write_node(node); end # foo @@ -37014,79 +36989,79 @@ class Prism::Translation::Ripper < ::Prism::Compiler # foo.bar() {} # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1026 + # source://prism//lib/prism/translation/ripper.rb#1040 def visit_call_node(node); end # foo.bar += baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1206 + # source://prism//lib/prism/translation/ripper.rb#1229 def visit_call_operator_write_node(node); end # foo.bar ||= baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1250 + # source://prism//lib/prism/translation/ripper.rb#1273 def visit_call_or_write_node(node); end # foo.bar, = 1 # ^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1272 + # source://prism//lib/prism/translation/ripper.rb#1295 def visit_call_target_node(node); end # foo => bar => baz # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1297 + # source://prism//lib/prism/translation/ripper.rb#1320 def visit_capture_pattern_node(node); end # case foo; in bar; end # ^^^^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1320 + # source://prism//lib/prism/translation/ripper.rb#1343 def visit_case_match_node(node); end # case foo; when bar; end # ^^^^^^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1307 + # source://prism//lib/prism/translation/ripper.rb#1330 def visit_case_node(node); end # class Foo; end # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1333 + # source://prism//lib/prism/translation/ripper.rb#1356 def visit_class_node(node); end # @@foo &&= bar # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1386 + # source://prism//lib/prism/translation/ripper.rb#1409 def visit_class_variable_and_write_node(node); end # @@foo += bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1372 + # source://prism//lib/prism/translation/ripper.rb#1395 def visit_class_variable_operator_write_node(node); end # @@foo ||= bar # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1400 + # source://prism//lib/prism/translation/ripper.rb#1423 def visit_class_variable_or_write_node(node); end # @@foo # ^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1351 + # source://prism//lib/prism/translation/ripper.rb#1374 def visit_class_variable_read_node(node); end # @@foo, = bar # ^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1414 + # source://prism//lib/prism/translation/ripper.rb#1437 def visit_class_variable_target_node(node); end # @@foo = 1 @@ -37095,55 +37070,55 @@ class Prism::Translation::Ripper < ::Prism::Compiler # @@foo, @@bar = 1 # ^^^^^ ^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1361 + # source://prism//lib/prism/translation/ripper.rb#1384 def visit_class_variable_write_node(node); end # Foo &&= bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1456 + # source://prism//lib/prism/translation/ripper.rb#1479 def visit_constant_and_write_node(node); end # Foo += bar # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1442 + # source://prism//lib/prism/translation/ripper.rb#1465 def visit_constant_operator_write_node(node); end # Foo ||= bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1470 + # source://prism//lib/prism/translation/ripper.rb#1493 def visit_constant_or_write_node(node); end # Foo::Bar &&= baz # ^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1557 + # source://prism//lib/prism/translation/ripper.rb#1580 def visit_constant_path_and_write_node(node); end # Foo::Bar # ^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1491 + # source://prism//lib/prism/translation/ripper.rb#1514 def visit_constant_path_node(node); end # Foo::Bar += baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1543 + # source://prism//lib/prism/translation/ripper.rb#1566 def visit_constant_path_operator_write_node(node); end # Foo::Bar ||= baz # ^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1571 + # source://prism//lib/prism/translation/ripper.rb#1594 def visit_constant_path_or_write_node(node); end # Foo::Bar, = baz # ^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1585 + # source://prism//lib/prism/translation/ripper.rb#1608 def visit_constant_path_target_node(node); end # Foo::Bar = 1 @@ -37152,19 +37127,19 @@ class Prism::Translation::Ripper < ::Prism::Compiler # Foo::Foo, Bar::Bar = 1 # ^^^^^^^^ ^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1514 + # source://prism//lib/prism/translation/ripper.rb#1537 def visit_constant_path_write_node(node); end # Foo # ^^^ # - # source://prism//lib/prism/translation/ripper.rb#1421 + # source://prism//lib/prism/translation/ripper.rb#1444 def visit_constant_read_node(node); end # Foo, = bar # ^^^ # - # source://prism//lib/prism/translation/ripper.rb#1484 + # source://prism//lib/prism/translation/ripper.rb#1507 def visit_constant_target_node(node); end # Foo = 1 @@ -37173,7 +37148,7 @@ class Prism::Translation::Ripper < ::Prism::Compiler # Foo, Bar = 1 # ^^^ ^^^ # - # source://prism//lib/prism/translation/ripper.rb#1431 + # source://prism//lib/prism/translation/ripper.rb#1454 def visit_constant_write_node(node); end # def foo; end @@ -37182,7 +37157,7 @@ class Prism::Translation::Ripper < ::Prism::Compiler # def self.foo; end # ^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1594 + # source://prism//lib/prism/translation/ripper.rb#1617 def visit_def_node(node); end # defined? a @@ -37191,72 +37166,72 @@ class Prism::Translation::Ripper < ::Prism::Compiler # defined?(a) # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1641 + # source://prism//lib/prism/translation/ripper.rb#1664 def visit_defined_node(node); end # if foo then bar else baz end # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1663 + # source://prism//lib/prism/translation/ripper.rb#1686 def visit_else_node(node); end # "foo #{bar}" # ^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1679 + # source://prism//lib/prism/translation/ripper.rb#1702 def visit_embedded_statements_node(node); end # "foo #@bar" # ^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1700 + # source://prism//lib/prism/translation/ripper.rb#1723 def visit_embedded_variable_node(node); end # Visit an EnsureNode node. # - # source://prism//lib/prism/translation/ripper.rb#1711 + # source://prism//lib/prism/translation/ripper.rb#1734 def visit_ensure_node(node); end # false # ^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1729 + # source://prism//lib/prism/translation/ripper.rb#1752 def visit_false_node(node); end # foo => [*, bar, *] # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1736 + # source://prism//lib/prism/translation/ripper.rb#1759 def visit_find_pattern_node(node); end # if foo .. bar; end # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1761 + # source://prism//lib/prism/translation/ripper.rb#1784 def visit_flip_flop_node(node); end # 1.0 # ^^^ # - # source://prism//lib/prism/translation/ripper.rb#1775 + # source://prism//lib/prism/translation/ripper.rb#1798 def visit_float_node(node); end # for foo in bar do end # ^^^^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1781 + # source://prism//lib/prism/translation/ripper.rb#1804 def visit_for_node(node); end # def foo(...); bar(...); end # ^^^ # - # source://prism//lib/prism/translation/ripper.rb#1798 + # source://prism//lib/prism/translation/ripper.rb#1821 def visit_forwarding_arguments_node(node); end # def foo(...); end # ^^^ # - # source://prism//lib/prism/translation/ripper.rb#1805 + # source://prism//lib/prism/translation/ripper.rb#1828 def visit_forwarding_parameter_node(node); end # super @@ -37265,37 +37240,37 @@ class Prism::Translation::Ripper < ::Prism::Compiler # super {} # ^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1815 + # source://prism//lib/prism/translation/ripper.rb#1838 def visit_forwarding_super_node(node); end # $foo &&= bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1864 + # source://prism//lib/prism/translation/ripper.rb#1887 def visit_global_variable_and_write_node(node); end # $foo += bar # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1850 + # source://prism//lib/prism/translation/ripper.rb#1873 def visit_global_variable_operator_write_node(node); end # $foo ||= bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1878 + # source://prism//lib/prism/translation/ripper.rb#1901 def visit_global_variable_or_write_node(node); end # $foo # ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1829 + # source://prism//lib/prism/translation/ripper.rb#1852 def visit_global_variable_read_node(node); end # $foo, = bar # ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1892 + # source://prism//lib/prism/translation/ripper.rb#1915 def visit_global_variable_target_node(node); end # $foo = 1 @@ -37304,19 +37279,19 @@ class Prism::Translation::Ripper < ::Prism::Compiler # $foo, $bar = 1 # ^^^^ ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1839 + # source://prism//lib/prism/translation/ripper.rb#1862 def visit_global_variable_write_node(node); end # {} # ^^ # - # source://prism//lib/prism/translation/ripper.rb#1899 + # source://prism//lib/prism/translation/ripper.rb#1922 def visit_hash_node(node); end # foo => {} # ^^ # - # source://prism//lib/prism/translation/ripper.rb#1914 + # source://prism//lib/prism/translation/ripper.rb#1937 def visit_hash_pattern_node(node); end # if foo then bar end @@ -37328,140 +37303,140 @@ class Prism::Translation::Ripper < ::Prism::Compiler # foo ? bar : baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1956 + # source://prism//lib/prism/translation/ripper.rb#1979 def visit_if_node(node); end # 1i # ^^ # - # source://prism//lib/prism/translation/ripper.rb#1992 + # source://prism//lib/prism/translation/ripper.rb#2015 def visit_imaginary_node(node); end # { foo: } # ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1998 + # source://prism//lib/prism/translation/ripper.rb#2021 def visit_implicit_node(node); end # foo { |bar,| } # ^ # - # source://prism//lib/prism/translation/ripper.rb#2003 + # source://prism//lib/prism/translation/ripper.rb#2026 def visit_implicit_rest_node(node); end # case foo; in bar; end # ^^^^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2010 + # source://prism//lib/prism/translation/ripper.rb#2033 def visit_in_node(node); end # foo[bar] &&= baz # ^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2045 + # source://prism//lib/prism/translation/ripper.rb#2068 def visit_index_and_write_node(node); end # foo[bar] += baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2028 + # source://prism//lib/prism/translation/ripper.rb#2051 def visit_index_operator_write_node(node); end # foo[bar] ||= baz # ^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2062 + # source://prism//lib/prism/translation/ripper.rb#2085 def visit_index_or_write_node(node); end # foo[bar], = 1 # ^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2079 + # source://prism//lib/prism/translation/ripper.rb#2102 def visit_index_target_node(node); end # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2121 + # source://prism//lib/prism/translation/ripper.rb#2144 def visit_instance_variable_and_write_node(node); end # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2107 + # source://prism//lib/prism/translation/ripper.rb#2130 def visit_instance_variable_operator_write_node(node); end # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2135 + # source://prism//lib/prism/translation/ripper.rb#2158 def visit_instance_variable_or_write_node(node); end # ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2089 + # source://prism//lib/prism/translation/ripper.rb#2112 def visit_instance_variable_read_node(node); end # @foo, = bar # ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2149 + # source://prism//lib/prism/translation/ripper.rb#2172 def visit_instance_variable_target_node(node); end # ^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2096 + # source://prism//lib/prism/translation/ripper.rb#2119 def visit_instance_variable_write_node(node); end # 1 # ^ # - # source://prism//lib/prism/translation/ripper.rb#2156 + # source://prism//lib/prism/translation/ripper.rb#2179 def visit_integer_node(node); end # if /foo #{bar}/ then end # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2162 + # source://prism//lib/prism/translation/ripper.rb#2185 def visit_interpolated_match_last_line_node(node); end # /foo #{bar}/ # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2181 + # source://prism//lib/prism/translation/ripper.rb#2204 def visit_interpolated_regular_expression_node(node); end # "foo #{bar}" # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2200 + # source://prism//lib/prism/translation/ripper.rb#2223 def visit_interpolated_string_node(node); end # :"foo #{bar}" # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2228 + # source://prism//lib/prism/translation/ripper.rb#2251 def visit_interpolated_symbol_node(node); end # `foo #{bar}` # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2241 + # source://prism//lib/prism/translation/ripper.rb#2264 def visit_interpolated_x_string_node(node); end # -> { it } # ^^ # - # source://prism//lib/prism/translation/ripper.rb#2271 + # source://prism//lib/prism/translation/ripper.rb#2294 def visit_it_local_variable_read_node(node); end # -> { it } # ^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2278 + # source://prism//lib/prism/translation/ripper.rb#2301 def visit_it_parameters_node(node); end # foo(bar: baz) # ^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2283 + # source://prism//lib/prism/translation/ripper.rb#2306 def visit_keyword_hash_node(node); end # def foo(**bar); end @@ -37470,96 +37445,96 @@ class Prism::Translation::Ripper < ::Prism::Compiler # def foo(**); end # ^^ # - # source://prism//lib/prism/translation/ripper.rb#2295 + # source://prism//lib/prism/translation/ripper.rb#2318 def visit_keyword_rest_parameter_node(node); end # -> {} # - # source://prism//lib/prism/translation/ripper.rb#2309 + # source://prism//lib/prism/translation/ripper.rb#2332 def visit_lambda_node(node); end # foo &&= bar # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2401 + # source://prism//lib/prism/translation/ripper.rb#2424 def visit_local_variable_and_write_node(node); end # foo += bar # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2387 + # source://prism//lib/prism/translation/ripper.rb#2410 def visit_local_variable_operator_write_node(node); end # foo ||= bar # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2415 + # source://prism//lib/prism/translation/ripper.rb#2438 def visit_local_variable_or_write_node(node); end # foo # ^^^ # - # source://prism//lib/prism/translation/ripper.rb#2369 + # source://prism//lib/prism/translation/ripper.rb#2392 def visit_local_variable_read_node(node); end # foo, = bar # ^^^ # - # source://prism//lib/prism/translation/ripper.rb#2429 + # source://prism//lib/prism/translation/ripper.rb#2452 def visit_local_variable_target_node(node); end # foo = 1 # ^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2376 + # source://prism//lib/prism/translation/ripper.rb#2399 def visit_local_variable_write_node(node); end # if /foo/ then end # ^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2436 + # source://prism//lib/prism/translation/ripper.rb#2459 def visit_match_last_line_node(node); end # foo in bar # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2451 + # source://prism//lib/prism/translation/ripper.rb#2474 def visit_match_predicate_node(node); end # foo => bar # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2460 + # source://prism//lib/prism/translation/ripper.rb#2483 def visit_match_required_node(node); end # /(?foo)/ =~ bar # ^^^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2469 + # source://prism//lib/prism/translation/ripper.rb#2492 def visit_match_write_node(node); end # A node that is missing from the syntax tree. This is only used in the # case of a syntax error. # - # source://prism//lib/prism/translation/ripper.rb#2475 + # source://prism//lib/prism/translation/ripper.rb#2498 def visit_missing_node(node); end # module Foo; end # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2481 + # source://prism//lib/prism/translation/ripper.rb#2504 def visit_module_node(node); end # (foo, bar), bar = qux # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2498 + # source://prism//lib/prism/translation/ripper.rb#2521 def visit_multi_target_node(node); end # foo, bar = baz # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2552 + # source://prism//lib/prism/translation/ripper.rb#2575 def visit_multi_write_node(node); end # next @@ -37568,55 +37543,55 @@ class Prism::Translation::Ripper < ::Prism::Compiler # next foo # ^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2572 + # source://prism//lib/prism/translation/ripper.rb#2595 def visit_next_node(node); end # nil # ^^^ # - # source://prism//lib/prism/translation/ripper.rb#2586 + # source://prism//lib/prism/translation/ripper.rb#2609 def visit_nil_node(node); end # def foo(**nil); end # ^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2593 + # source://prism//lib/prism/translation/ripper.rb#2616 def visit_no_keywords_parameter_node(node); end # -> { _1 + _2 } # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2602 + # source://prism//lib/prism/translation/ripper.rb#2625 def visit_numbered_parameters_node(node); end # $1 # ^^ # - # source://prism//lib/prism/translation/ripper.rb#2607 + # source://prism//lib/prism/translation/ripper.rb#2630 def visit_numbered_reference_read_node(node); end # def foo(bar: baz); end # ^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2614 + # source://prism//lib/prism/translation/ripper.rb#2637 def visit_optional_keyword_parameter_node(node); end # def foo(bar = 1); end # ^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2624 + # source://prism//lib/prism/translation/ripper.rb#2647 def visit_optional_parameter_node(node); end # a or b # ^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2634 + # source://prism//lib/prism/translation/ripper.rb#2657 def visit_or_node(node); end # def foo(bar, *baz); end # ^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2644 + # source://prism//lib/prism/translation/ripper.rb#2667 def visit_parameters_node(node); end # () @@ -37625,84 +37600,84 @@ class Prism::Translation::Ripper < ::Prism::Compiler # (1) # ^^^ # - # source://prism//lib/prism/translation/ripper.rb#2671 + # source://prism//lib/prism/translation/ripper.rb#2694 def visit_parentheses_node(node); end # foo => ^(bar) # ^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2685 + # source://prism//lib/prism/translation/ripper.rb#2708 def visit_pinned_expression_node(node); end # foo = 1 and bar => ^foo # ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2694 + # source://prism//lib/prism/translation/ripper.rb#2717 def visit_pinned_variable_node(node); end # END {} # ^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2700 + # source://prism//lib/prism/translation/ripper.rb#2723 def visit_post_execution_node(node); end # BEGIN {} # ^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2715 + # source://prism//lib/prism/translation/ripper.rb#2738 def visit_pre_execution_node(node); end # The top-level program node. # - # source://prism//lib/prism/translation/ripper.rb#2729 + # source://prism//lib/prism/translation/ripper.rb#2752 def visit_program_node(node); end # 0..5 # ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2740 + # source://prism//lib/prism/translation/ripper.rb#2763 def visit_range_node(node); end # 1r # ^^ # - # source://prism//lib/prism/translation/ripper.rb#2754 + # source://prism//lib/prism/translation/ripper.rb#2777 def visit_rational_node(node); end # redo # ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2760 + # source://prism//lib/prism/translation/ripper.rb#2783 def visit_redo_node(node); end # /foo/ # ^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2767 + # source://prism//lib/prism/translation/ripper.rb#2790 def visit_regular_expression_node(node); end # def foo(bar:); end # ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2789 + # source://prism//lib/prism/translation/ripper.rb#2812 def visit_required_keyword_parameter_node(node); end # def foo(bar); end # ^^^ # - # source://prism//lib/prism/translation/ripper.rb#2796 + # source://prism//lib/prism/translation/ripper.rb#2819 def visit_required_parameter_node(node); end # foo rescue bar # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2803 + # source://prism//lib/prism/translation/ripper.rb#2826 def visit_rescue_modifier_node(node); end # begin; rescue; end # ^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2813 + # source://prism//lib/prism/translation/ripper.rb#2836 def visit_rescue_node(node); end # def foo(*bar); end @@ -37711,13 +37686,13 @@ class Prism::Translation::Ripper < ::Prism::Compiler # def foo(*); end # ^ # - # source://prism//lib/prism/translation/ripper.rb#2871 + # source://prism//lib/prism/translation/ripper.rb#2894 def visit_rest_parameter_node(node); end # retry # ^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2883 + # source://prism//lib/prism/translation/ripper.rb#2906 def visit_retry_node(node); end # return @@ -37726,42 +37701,42 @@ class Prism::Translation::Ripper < ::Prism::Compiler # return 1 # ^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2893 + # source://prism//lib/prism/translation/ripper.rb#2916 def visit_return_node(node); end # self # ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2907 + # source://prism//lib/prism/translation/ripper.rb#2930 def visit_self_node(node); end # A shareable constant. # - # source://prism//lib/prism/translation/ripper.rb#2913 + # source://prism//lib/prism/translation/ripper.rb#2936 def visit_shareable_constant_node(node); end # class << self; end # ^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2919 + # source://prism//lib/prism/translation/ripper.rb#2942 def visit_singleton_class_node(node); end # __ENCODING__ # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2929 + # source://prism//lib/prism/translation/ripper.rb#2952 def visit_source_encoding_node(node); end # __FILE__ # ^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2936 + # source://prism//lib/prism/translation/ripper.rb#2959 def visit_source_file_node(node); end # __LINE__ # ^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2943 + # source://prism//lib/prism/translation/ripper.rb#2966 def visit_source_line_node(node); end # foo(*bar) @@ -37773,42 +37748,42 @@ class Prism::Translation::Ripper < ::Prism::Compiler # def foo(*); bar(*); end # ^ # - # source://prism//lib/prism/translation/ripper.rb#2956 + # source://prism//lib/prism/translation/ripper.rb#2979 def visit_splat_node(node); end # A list of statements. # - # source://prism//lib/prism/translation/ripper.rb#2961 + # source://prism//lib/prism/translation/ripper.rb#2984 def visit_statements_node(node); end # "foo" # ^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2978 + # source://prism//lib/prism/translation/ripper.rb#3001 def visit_string_node(node); end # super(foo) # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#3110 + # source://prism//lib/prism/translation/ripper.rb#3133 def visit_super_node(node); end # :foo # ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#3131 + # source://prism//lib/prism/translation/ripper.rb#3154 def visit_symbol_node(node); end # true # ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#3155 + # source://prism//lib/prism/translation/ripper.rb#3178 def visit_true_node(node); end # undef foo # ^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#3162 + # source://prism//lib/prism/translation/ripper.rb#3185 def visit_undef_node(node); end # unless foo; bar end @@ -37817,7 +37792,7 @@ class Prism::Translation::Ripper < ::Prism::Compiler # bar unless foo # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#3174 + # source://prism//lib/prism/translation/ripper.rb#3197 def visit_unless_node(node); end # until foo; bar end @@ -37826,13 +37801,13 @@ class Prism::Translation::Ripper < ::Prism::Compiler # bar until foo # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#3202 + # source://prism//lib/prism/translation/ripper.rb#3225 def visit_until_node(node); end # case foo; when bar; end # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#3226 + # source://prism//lib/prism/translation/ripper.rb#3249 def visit_when_node(node); end # while foo; bar end @@ -37841,13 +37816,13 @@ class Prism::Translation::Ripper < ::Prism::Compiler # bar while foo # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#3247 + # source://prism//lib/prism/translation/ripper.rb#3270 def visit_while_node(node); end # `foo` # ^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#3271 + # source://prism//lib/prism/translation/ripper.rb#3294 def visit_x_string_node(node); end # yield @@ -37856,33 +37831,33 @@ class Prism::Translation::Ripper < ::Prism::Compiler # yield 1 # ^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#3294 + # source://prism//lib/prism/translation/ripper.rb#3317 def visit_yield_node(node); end private # :stopdoc: # - # source://prism//lib/prism/translation/ripper.rb#3434 + # source://prism//lib/prism/translation/ripper.rb#3457 def _dispatch_0; end - # source://prism//lib/prism/translation/ripper.rb#3435 - def _dispatch_1(_); end + # source://prism//lib/prism/translation/ripper.rb#3458 + def _dispatch_1(arg); end - # source://prism//lib/prism/translation/ripper.rb#3436 - def _dispatch_2(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3459 + def _dispatch_2(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3437 - def _dispatch_3(_, _, _); end + # source://prism//lib/prism/translation/ripper.rb#3460 + def _dispatch_3(arg, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3438 - def _dispatch_4(_, _, _, _); end + # source://prism//lib/prism/translation/ripper.rb#3461 + def _dispatch_4(arg, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3439 - def _dispatch_5(_, _, _, _, _); end + # source://prism//lib/prism/translation/ripper.rb#3462 + def _dispatch_5(arg, _, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3440 - def _dispatch_7(_, _, _, _, _, _, _); end + # source://prism//lib/prism/translation/ripper.rb#3463 + def _dispatch_7(arg, _, _, _, _, _, _); end # This method is responsible for updating lineno and column information # to reflect the current node. @@ -37890,19 +37865,19 @@ 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#3424 + # source://prism//lib/prism/translation/ripper.rb#3447 def bounds(location); end # Returns true if the given node is a command node. # # @return [Boolean] # - # source://prism//lib/prism/translation/ripper.rb#1197 + # source://prism//lib/prism/translation/ripper.rb#1220 def command?(node); end # This method is called when the parser found syntax error. # - # source://prism//lib/prism/translation/ripper.rb#3462 + # source://prism//lib/prism/translation/ripper.rb#3485 def compile_error(msg); end # This method is provided by the Ripper C extension. It is called when a @@ -37910,631 +37885,637 @@ 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#3477 + # source://prism//lib/prism/translation/ripper.rb#3500 def dedent_string(string, width); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_BEGIN(_); end + # Extract the arguments and block Ripper-style, which means if the block + # is like `&b` then it's moved to arguments. + # + # source://prism//lib/prism/translation/ripper.rb#1184 + def get_arguments_and_block(arguments_node, block_node); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_BEGIN(arg); end - # source://prism//lib/prism/translation/ripper.rb#3470 - def on_CHAR(_); end + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_CHAR(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_END(_); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_END(arg); end - # source://prism//lib/prism/translation/ripper.rb#3470 - def on___end__(_); end + # source://prism//lib/prism/translation/ripper.rb#3493 + def on___end__(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_alias(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_alias(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_alias_error(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_alias_error(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_aref(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_aref(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_aref_field(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_aref_field(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_arg_ambiguous(_); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_arg_ambiguous(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_arg_paren(_); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_arg_paren(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_args_add(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_args_add(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_args_add_block(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_args_add_block(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_args_add_star(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_args_add_star(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 + # source://prism//lib/prism/translation/ripper.rb#3471 def on_args_forward; end - # source://prism//lib/prism/translation/ripper.rb#3448 + # source://prism//lib/prism/translation/ripper.rb#3471 def on_args_new; end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_array(_); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_array(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_aryptn(_, _, _, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_aryptn(arg, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_assign(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_assign(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_assign_error(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_assign_error(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_assoc_new(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_assoc_new(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_assoc_splat(_); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_assoc_splat(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_assoclist_from_args(_); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_assoclist_from_args(arg); end - # source://prism//lib/prism/translation/ripper.rb#3470 - def on_backref(_); end + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_backref(arg); end - # source://prism//lib/prism/translation/ripper.rb#3470 - def on_backtick(_); end + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_backtick(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_bare_assoc_hash(_); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_bare_assoc_hash(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_begin(_); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_begin(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_binary(_, _, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_binary(arg, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_block_var(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_block_var(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_blockarg(_); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_blockarg(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_bodystmt(_, _, _, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_bodystmt(arg, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_brace_block(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_brace_block(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_break(_); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_break(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_call(_, _, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_call(arg, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_case(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_case(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_class(_, _, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_class(arg, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_class_name_error(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_class_name_error(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3470 - def on_comma(_); end + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_comma(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_command(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_command(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_command_call(_, _, _, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_command_call(arg, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3470 - def on_comment(_); end + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_comment(arg); end - # source://prism//lib/prism/translation/ripper.rb#3470 - def on_const(_); end + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_const(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_const_path_field(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_const_path_field(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_const_path_ref(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_const_path_ref(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_const_ref(_); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_const_ref(arg); end - # source://prism//lib/prism/translation/ripper.rb#3470 - def on_cvar(_); end + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_cvar(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_def(_, _, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_def(arg, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_defined(_); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_defined(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_defs(_, _, _, _, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_defs(arg, _, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_do_block(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_do_block(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_dot2(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_dot2(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_dot3(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_dot3(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_dyna_symbol(_); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_dyna_symbol(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_else(_); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_else(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_elsif(_, _, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_elsif(arg, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3470 - def on_embdoc(_); end + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_embdoc(arg); end - # source://prism//lib/prism/translation/ripper.rb#3470 - def on_embdoc_beg(_); end + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_embdoc_beg(arg); end - # source://prism//lib/prism/translation/ripper.rb#3470 - def on_embdoc_end(_); end + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_embdoc_end(arg); end - # source://prism//lib/prism/translation/ripper.rb#3470 - def on_embexpr_beg(_); end + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_embexpr_beg(arg); end - # source://prism//lib/prism/translation/ripper.rb#3470 - def on_embexpr_end(_); end + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_embexpr_end(arg); end - # source://prism//lib/prism/translation/ripper.rb#3470 - def on_embvar(_); end + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_embvar(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_ensure(_); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_ensure(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 + # source://prism//lib/prism/translation/ripper.rb#3471 def on_excessed_comma; end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_fcall(_); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_fcall(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_field(_, _, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_field(arg, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3470 - def on_float(_); end + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_float(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_fndptn(_, _, _, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_fndptn(arg, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_for(_, _, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_for(arg, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3470 - def on_gvar(_); end + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_gvar(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_hash(_); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_hash(arg); end - # source://prism//lib/prism/translation/ripper.rb#3470 - def on_heredoc_beg(_); end + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_heredoc_beg(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_heredoc_dedent(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_heredoc_dedent(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3470 - def on_heredoc_end(_); end + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_heredoc_end(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_hshptn(_, _, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_hshptn(arg, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3470 - def on_ident(_); end + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_ident(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_if(_, _, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_if(arg, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_if_mod(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_if_mod(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_ifop(_, _, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_ifop(arg, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3470 - def on_ignored_nl(_); end + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_ignored_nl(arg); end - # source://prism//lib/prism/translation/ripper.rb#3470 - def on_ignored_sp(_); end + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_ignored_sp(arg); end - # source://prism//lib/prism/translation/ripper.rb#3470 - def on_imaginary(_); end + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_imaginary(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_in(_, _, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_in(arg, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3470 - def on_int(_); end + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_int(arg); end - # source://prism//lib/prism/translation/ripper.rb#3470 - def on_ivar(_); end + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_ivar(arg); end - # source://prism//lib/prism/translation/ripper.rb#3470 - def on_kw(_); end + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_kw(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_kwrest_param(_); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_kwrest_param(arg); end - # source://prism//lib/prism/translation/ripper.rb#3470 - def on_label(_); end + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_label(arg); end - # source://prism//lib/prism/translation/ripper.rb#3470 - def on_label_end(_); end + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_label_end(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_lambda(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_lambda(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3470 - def on_lbrace(_); end + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_lbrace(arg); end - # source://prism//lib/prism/translation/ripper.rb#3470 - def on_lbracket(_); end + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_lbracket(arg); end - # source://prism//lib/prism/translation/ripper.rb#3470 - def on_lparen(_); end + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_lparen(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_magic_comment(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_magic_comment(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_massign(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_massign(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_method_add_arg(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_method_add_arg(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_method_add_block(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_method_add_block(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_mlhs_add(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_mlhs_add(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_mlhs_add_post(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_mlhs_add_post(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_mlhs_add_star(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_mlhs_add_star(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 + # source://prism//lib/prism/translation/ripper.rb#3471 def on_mlhs_new; end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_mlhs_paren(_); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_mlhs_paren(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_module(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_module(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_mrhs_add(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_mrhs_add(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_mrhs_add_star(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_mrhs_add_star(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 + # source://prism//lib/prism/translation/ripper.rb#3471 def on_mrhs_new; end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_mrhs_new_from_args(_); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_mrhs_new_from_args(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_next(_); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_next(arg); end - # source://prism//lib/prism/translation/ripper.rb#3470 - def on_nl(_); end + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_nl(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_nokw_param(_); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_nokw_param(arg); end - # source://prism//lib/prism/translation/ripper.rb#3470 - def on_op(_); end + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_op(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_opassign(_, _, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_opassign(arg, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_operator_ambiguous(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_operator_ambiguous(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_param_error(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_param_error(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_params(_, _, _, _, _, _, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_params(arg, _, _, _, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_paren(_); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_paren(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_parse_error(_); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_parse_error(arg); end - # source://prism//lib/prism/translation/ripper.rb#3470 - def on_period(_); end + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_period(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_program(_); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_program(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_qsymbols_add(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_qsymbols_add(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3470 - def on_qsymbols_beg(_); end + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_qsymbols_beg(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 + # source://prism//lib/prism/translation/ripper.rb#3471 def on_qsymbols_new; end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_qwords_add(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_qwords_add(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3470 - def on_qwords_beg(_); end + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_qwords_beg(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 + # source://prism//lib/prism/translation/ripper.rb#3471 def on_qwords_new; end - # source://prism//lib/prism/translation/ripper.rb#3470 - def on_rational(_); end + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_rational(arg); end - # source://prism//lib/prism/translation/ripper.rb#3470 - def on_rbrace(_); end + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_rbrace(arg); end - # source://prism//lib/prism/translation/ripper.rb#3470 - def on_rbracket(_); end + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_rbracket(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 + # source://prism//lib/prism/translation/ripper.rb#3471 def on_redo; end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_regexp_add(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_regexp_add(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3470 - def on_regexp_beg(_); end + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_regexp_beg(arg); end - # source://prism//lib/prism/translation/ripper.rb#3470 - def on_regexp_end(_); end + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_regexp_end(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_regexp_literal(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_regexp_literal(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 + # source://prism//lib/prism/translation/ripper.rb#3471 def on_regexp_new; end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_rescue(_, _, _, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_rescue(arg, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_rescue_mod(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_rescue_mod(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_rest_param(_); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_rest_param(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 + # source://prism//lib/prism/translation/ripper.rb#3471 def on_retry; end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_return(_); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_return(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 + # source://prism//lib/prism/translation/ripper.rb#3471 def on_return0; end - # source://prism//lib/prism/translation/ripper.rb#3470 - def on_rparen(_); end + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_rparen(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_sclass(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_sclass(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3470 - def on_semicolon(_); end + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_semicolon(arg); end - # source://prism//lib/prism/translation/ripper.rb#3470 - def on_sp(_); end + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_sp(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_stmts_add(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_stmts_add(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 + # source://prism//lib/prism/translation/ripper.rb#3471 def on_stmts_new; end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_string_add(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_string_add(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_string_concat(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_string_concat(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 + # source://prism//lib/prism/translation/ripper.rb#3471 def on_string_content; end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_string_dvar(_); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_string_dvar(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_string_embexpr(_); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_string_embexpr(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_string_literal(_); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_string_literal(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_super(_); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_super(arg); end - # source://prism//lib/prism/translation/ripper.rb#3470 - def on_symbeg(_); end + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_symbeg(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_symbol(_); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_symbol(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_symbol_literal(_); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_symbol_literal(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_symbols_add(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_symbols_add(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3470 - def on_symbols_beg(_); end + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_symbols_beg(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 + # source://prism//lib/prism/translation/ripper.rb#3471 def on_symbols_new; end - # source://prism//lib/prism/translation/ripper.rb#3470 - def on_tlambda(_); end + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_tlambda(arg); end - # source://prism//lib/prism/translation/ripper.rb#3470 - def on_tlambeg(_); end + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_tlambeg(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_top_const_field(_); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_top_const_field(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_top_const_ref(_); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_top_const_ref(arg); end - # source://prism//lib/prism/translation/ripper.rb#3470 - def on_tstring_beg(_); end + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_tstring_beg(arg); end - # source://prism//lib/prism/translation/ripper.rb#3470 - def on_tstring_content(_); end + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_tstring_content(arg); end - # source://prism//lib/prism/translation/ripper.rb#3470 - def on_tstring_end(_); end + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_tstring_end(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_unary(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_unary(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_undef(_); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_undef(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_unless(_, _, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_unless(arg, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_unless_mod(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_unless_mod(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_until(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_until(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_until_mod(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_until_mod(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_var_alias(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_var_alias(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_var_field(_); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_var_field(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_var_ref(_); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_var_ref(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_vcall(_); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_vcall(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 + # source://prism//lib/prism/translation/ripper.rb#3471 def on_void_stmt; end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_when(_, _, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_when(arg, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_while(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_while(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_while_mod(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_while_mod(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_word_add(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_word_add(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 + # source://prism//lib/prism/translation/ripper.rb#3471 def on_word_new; end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_words_add(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_words_add(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3470 - def on_words_beg(_); end + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_words_beg(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 + # source://prism//lib/prism/translation/ripper.rb#3471 def on_words_new; end - # source://prism//lib/prism/translation/ripper.rb#3470 - def on_words_sep(_); end + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_words_sep(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_xstring_add(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_xstring_add(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_xstring_literal(_); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_xstring_literal(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 + # source://prism//lib/prism/translation/ripper.rb#3471 def on_xstring_new; end - # source://prism//lib/prism/translation/ripper.rb#3448 - def on_yield(_); end + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_yield(arg); end - # source://prism//lib/prism/translation/ripper.rb#3448 + # source://prism//lib/prism/translation/ripper.rb#3471 def on_yield0; end - # source://prism//lib/prism/translation/ripper.rb#3448 + # source://prism//lib/prism/translation/ripper.rb#3471 def on_zsuper; end # Lazily initialize the parse result. # - # source://prism//lib/prism/translation/ripper.rb#3320 + # source://prism//lib/prism/translation/ripper.rb#3343 def result; end # Returns true if there is a comma between the two locations. # # @return [Boolean] # - # source://prism//lib/prism/translation/ripper.rb#3329 + # source://prism//lib/prism/translation/ripper.rb#3352 def trailing_comma?(left, right); end # Visit one side of an alias global variable node. # - # source://prism//lib/prism/translation/ripper.rb#594 + # source://prism//lib/prism/translation/ripper.rb#608 def visit_alias_global_variable_node_value(node); end # Visit a list of elements, like the elements of an array or arguments. # - # source://prism//lib/prism/translation/ripper.rb#780 + # source://prism//lib/prism/translation/ripper.rb#794 def visit_arguments(elements); end # Visit the clauses of a begin node to form an on_bodystmt call. # - # source://prism//lib/prism/translation/ripper.rb#864 + # source://prism//lib/prism/translation/ripper.rb#878 def visit_begin_node_clauses(location, node, allow_newline); end # Visit the body of a structure that can have either a set of statements # or statements wrapped in rescue/else/ensure. # - # source://prism//lib/prism/translation/ripper.rb#899 + # source://prism//lib/prism/translation/ripper.rb#913 def visit_body_node(location, node, allow_newline = T.unsafe(nil)); end # Visit the arguments and block of a call node and return the arguments # and block as they should be used. # - # source://prism//lib/prism/translation/ripper.rb#1170 + # source://prism//lib/prism/translation/ripper.rb#1198 def visit_call_node_arguments(arguments_node, block_node, trailing_comma); end # Visit a constant path that is part of a write node. # - # source://prism//lib/prism/translation/ripper.rb#1523 + # source://prism//lib/prism/translation/ripper.rb#1546 def visit_constant_path_write_node_target(node); end # Visit a destructured positional parameter node. # - # source://prism//lib/prism/translation/ripper.rb#2658 + # source://prism//lib/prism/translation/ripper.rb#2681 def visit_destructured_parameter_node(node); end # Visit a string that is expressed using a <<~ heredoc. # - # source://prism//lib/prism/translation/ripper.rb#3029 + # source://prism//lib/prism/translation/ripper.rb#3052 def visit_heredoc_node(parts, base); end # Ripper gives back the escaped string content but strips out the common @@ -38543,34 +38524,34 @@ class Prism::Translation::Ripper < ::Prism::Compiler # work well together, so here we need to re-derive the common leading # whitespace. # - # source://prism//lib/prism/translation/ripper.rb#3004 + # source://prism//lib/prism/translation/ripper.rb#3027 def visit_heredoc_node_whitespace(parts); end # Visit a heredoc node that is representing a string. # - # source://prism//lib/prism/translation/ripper.rb#3075 + # source://prism//lib/prism/translation/ripper.rb#3098 def visit_heredoc_string_node(node); end # Visit a heredoc node that is representing an xstring. # - # source://prism//lib/prism/translation/ripper.rb#3092 + # source://prism//lib/prism/translation/ripper.rb#3115 def visit_heredoc_x_string_node(node); end # Visit the targets of a multi-target node. # - # source://prism//lib/prism/translation/ripper.rb#2511 + # source://prism//lib/prism/translation/ripper.rb#2534 def visit_multi_target_node_targets(lefts, rest, rights, skippable); end # Visit a node that represents a number. We need to explicitly handle the # unary - operator. # - # source://prism//lib/prism/translation/ripper.rb#3368 + # source://prism//lib/prism/translation/ripper.rb#3391 def visit_number_node(node); end # Visit a pattern within a pattern match. This is used to bypass the # parenthesis node that can be used to wrap patterns. # - # source://prism//lib/prism/translation/ripper.rb#619 + # source://prism//lib/prism/translation/ripper.rb#633 def visit_pattern_node(node); end # Visit the list of statements of a statements node. We support nil @@ -38578,49 +38559,49 @@ class Prism::Translation::Ripper < ::Prism::Compiler # structure of the prism parse tree, but we manually add them here so that # we can mirror Ripper's void stmt. # - # source://prism//lib/prism/translation/ripper.rb#2970 + # source://prism//lib/prism/translation/ripper.rb#2993 def visit_statements_node_body(body); end # Visit an individual part of a string-like node. # - # source://prism//lib/prism/translation/ripper.rb#2260 + # source://prism//lib/prism/translation/ripper.rb#2283 def visit_string_content(part); end # Visit the string content of a particular node. This method is used to # split into the various token types. # - # source://prism//lib/prism/translation/ripper.rb#3341 + # source://prism//lib/prism/translation/ripper.rb#3364 def visit_token(token, allow_keywords = T.unsafe(nil)); end # Dispatch a words_sep event that contains the space between the elements # of list literals. # - # source://prism//lib/prism/translation/ripper.rb#769 + # source://prism//lib/prism/translation/ripper.rb#783 def visit_words_sep(opening_loc, previous, current); end # Visit a node that represents a write value. This is used to handle the # special case of an implicit array that is generated without brackets. # - # source://prism//lib/prism/translation/ripper.rb#3386 + # source://prism//lib/prism/translation/ripper.rb#3409 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#3334 + # source://prism//lib/prism/translation/ripper.rb#3357 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#3453 + # source://prism//lib/prism/translation/ripper.rb#3476 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#3458 + # source://prism//lib/prism/translation/ripper.rb#3481 def warning(fmt, *args); end class << self @@ -38649,7 +38630,7 @@ class Prism::Translation::Ripper < ::Prism::Compiler # source://prism//lib/prism/translation/ripper.rb#71 def lex(src, filename = T.unsafe(nil), lineno = T.unsafe(nil), raise_errors: T.unsafe(nil)); end - # source://prism//lib/prism/translation/ripper.rb#449 + # source://prism//lib/prism/translation/ripper.rb#463 def lex_state_name(state); end # Parses the given Ruby program read from +src+. @@ -38676,7 +38657,7 @@ class Prism::Translation::Ripper < ::Prism::Compiler # [:paren, [:params, [[:@ident, "a", [1, 6]]], nil, nil, nil, nil, nil, nil]], # [:bodystmt, [[:var_ref, [:@kw, "nil", [1, 9]]]], nil, nil, nil]]]] # - # source://prism//lib/prism/translation/ripper.rb#380 + # source://prism//lib/prism/translation/ripper.rb#393 def sexp(src, filename = T.unsafe(nil), lineno = T.unsafe(nil), raise_errors: T.unsafe(nil)); end # Parses +src+ and create S-exp tree. @@ -38702,87 +38683,231 @@ class Prism::Translation::Ripper < ::Prism::Compiler # nil, # nil]]]] # - # source://prism//lib/prism/translation/ripper.rb#415 + # source://prism//lib/prism/translation/ripper.rb#428 def sexp_raw(src, filename = T.unsafe(nil), lineno = T.unsafe(nil), raise_errors: T.unsafe(nil)); end + + # Tokenizes the Ruby program and returns an array of strings. + # The +filename+ and +lineno+ arguments are mostly ignored, since the + # return value is just the tokenized input. + # By default, this method does not handle syntax errors in +src+, + # use the +raise_errors+ keyword to raise a SyntaxError for an error in +src+. + # + # p Ripper.tokenize("def m(a) nil end") + # # => ["def", " ", "m", "(", "a", ")", " ", "nil", " ", "end"] + # + # source://prism//lib/prism/translation/ripper.rb#90 + def tokenize(*_arg0, **_arg1, &_arg2); end end end # A list of all of the Ruby binary operators. # -# source://prism//lib/prism/translation/ripper.rb#336 +# source://prism//lib/prism/translation/ripper.rb#349 Prism::Translation::Ripper::BINARY_OPERATORS = T.let(T.unsafe(nil), Array) # This array contains name of all ripper events. # -# source://prism//lib/prism/translation/ripper.rb#288 +# source://prism//lib/prism/translation/ripper.rb#301 Prism::Translation::Ripper::EVENTS = T.let(T.unsafe(nil), Array) -# source://prism//lib/prism/translation/ripper.rb#441 +# source://prism//lib/prism/translation/ripper.rb#455 Prism::Translation::Ripper::EXPR_ARG = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/translation/ripper.rb#446 +# source://prism//lib/prism/translation/ripper.rb#460 Prism::Translation::Ripper::EXPR_ARG_ANY = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/translation/ripper.rb#441 +# source://prism//lib/prism/translation/ripper.rb#455 Prism::Translation::Ripper::EXPR_BEG = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/translation/ripper.rb#445 +# source://prism//lib/prism/translation/ripper.rb#459 Prism::Translation::Ripper::EXPR_BEG_ANY = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/translation/ripper.rb#441 +# source://prism//lib/prism/translation/ripper.rb#455 Prism::Translation::Ripper::EXPR_CLASS = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/translation/ripper.rb#441 +# source://prism//lib/prism/translation/ripper.rb#455 Prism::Translation::Ripper::EXPR_CMDARG = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/translation/ripper.rb#441 +# source://prism//lib/prism/translation/ripper.rb#455 Prism::Translation::Ripper::EXPR_DOT = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/translation/ripper.rb#441 +# source://prism//lib/prism/translation/ripper.rb#455 Prism::Translation::Ripper::EXPR_END = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/translation/ripper.rb#441 +# source://prism//lib/prism/translation/ripper.rb#455 Prism::Translation::Ripper::EXPR_ENDARG = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/translation/ripper.rb#441 +# source://prism//lib/prism/translation/ripper.rb#455 Prism::Translation::Ripper::EXPR_ENDFN = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/translation/ripper.rb#447 +# source://prism//lib/prism/translation/ripper.rb#461 Prism::Translation::Ripper::EXPR_END_ANY = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/translation/ripper.rb#441 +# source://prism//lib/prism/translation/ripper.rb#455 Prism::Translation::Ripper::EXPR_FITEM = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/translation/ripper.rb#441 +# source://prism//lib/prism/translation/ripper.rb#455 Prism::Translation::Ripper::EXPR_FNAME = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/translation/ripper.rb#441 +# source://prism//lib/prism/translation/ripper.rb#455 Prism::Translation::Ripper::EXPR_LABEL = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/translation/ripper.rb#441 +# source://prism//lib/prism/translation/ripper.rb#455 Prism::Translation::Ripper::EXPR_LABELED = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/translation/ripper.rb#441 +# source://prism//lib/prism/translation/ripper.rb#455 Prism::Translation::Ripper::EXPR_MID = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/translation/ripper.rb#443 +# source://prism//lib/prism/translation/ripper.rb#457 Prism::Translation::Ripper::EXPR_NONE = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/translation/ripper.rb#444 +# source://prism//lib/prism/translation/ripper.rb#458 Prism::Translation::Ripper::EXPR_VALUE = T.let(T.unsafe(nil), Integer) +# source://prism//lib/prism/translation/ripper/filter.rb#6 +class Prism::Translation::Ripper::Filter + # :stopdoc: + # + # @return [Filter] a new instance of Filter + # + # source://prism//lib/prism/translation/ripper/filter.rb#8 + def initialize(src, filename = T.unsafe(nil), lineno = T.unsafe(nil)); end + + # source://prism//lib/prism/translation/ripper/filter.rb#23 + def column; end + + # source://prism//lib/prism/translation/ripper/filter.rb#15 + def filename; end + + # source://prism//lib/prism/translation/ripper/filter.rb#19 + def lineno; end + + # source://prism//lib/prism/translation/ripper/filter.rb#31 + def parse(init = T.unsafe(nil)); end + + # source://prism//lib/prism/translation/ripper/filter.rb#27 + def state; end + + private + + # source://prism//lib/prism/translation/ripper/filter.rb#46 + def on_default(event, token, data); end +end + # A list of all of the Ruby keywords. # -# source://prism//lib/prism/translation/ripper.rb#291 +# source://prism//lib/prism/translation/ripper.rb#304 Prism::Translation::Ripper::KEYWORDS = T.let(T.unsafe(nil), Array) # Ripper-internal bitflags. # -# source://prism//lib/prism/translation/ripper.rb#435 +# source://prism//lib/prism/translation/ripper.rb#449 Prism::Translation::Ripper::LEX_STATE_NAMES = T.let(T.unsafe(nil), Hash) # source://prism//lib/prism/translation/ripper/lexer.rb#9 -class Prism::Translation::Ripper::Lexer; end +class Prism::Translation::Ripper::Lexer < ::Prism::Translation::Ripper + # Pretty much just the same as Prism.lex_compat. + # + # source://prism//lib/prism/translation/ripper/lexer.rb#111 + def lex(raise_errors: T.unsafe(nil)); end + + # Returns the lex_compat result wrapped in `Elem`. Errors are omitted. + # Since ripper is a streaming parser, tokens are expected to be emitted in the order + # that the parser encounters them. This is not implemented. + # + # source://prism//lib/prism/translation/ripper/lexer.rb#118 + def parse(*_arg0, **_arg1, &_arg2); end + + # Similar to parse but ripper sorts the elements by position in the source. Also + # includes errors. Since prism does error recovery, in cases of syntax errors + # the result may differ greatly compared to ripper. + # + # source://prism//lib/prism/translation/ripper/lexer.rb#127 + def scan(*_arg0, **_arg1, &_arg2); end +end + +# source://prism//lib/prism/translation/ripper/lexer.rb#50 +class Prism::Translation::Ripper::Lexer::Elem + # @return [Elem] a new instance of Elem + # + # source://prism//lib/prism/translation/ripper/lexer.rb#53 + def initialize(pos, event, tok, state, message = T.unsafe(nil)); end + + # source://prism//lib/prism/translation/ripper/lexer.rb#61 + def [](index); end + + # Returns the value of attribute event. + # + # source://prism//lib/prism/translation/ripper/lexer.rb#51 + def event; end + + # Sets the attribute event + # + # @param value the value to set the attribute event to. + # + # source://prism//lib/prism/translation/ripper/lexer.rb#51 + def event=(_arg0); end + + # source://prism//lib/prism/translation/ripper/lexer.rb#78 + def inspect; end + + # Returns the value of attribute message. + # + # source://prism//lib/prism/translation/ripper/lexer.rb#51 + def message; end + + # Sets the attribute message + # + # @param value the value to set the attribute message to. + # + # source://prism//lib/prism/translation/ripper/lexer.rb#51 + def message=(_arg0); end + + # Returns the value of attribute pos. + # + # source://prism//lib/prism/translation/ripper/lexer.rb#51 + def pos; end + + # Sets the attribute pos + # + # @param value the value to set the attribute pos to. + # + # source://prism//lib/prism/translation/ripper/lexer.rb#51 + def pos=(_arg0); end + + # source://prism//lib/prism/translation/ripper/lexer.rb#84 + def pretty_print(q); end + + # Returns the value of attribute state. + # + # source://prism//lib/prism/translation/ripper/lexer.rb#51 + def state; end + + # Sets the attribute state + # + # @param value the value to set the attribute state to. + # + # source://prism//lib/prism/translation/ripper/lexer.rb#51 + def state=(_arg0); end + + # source://prism//lib/prism/translation/ripper/lexer.rb#101 + def to_a; end + + # source://prism//lib/prism/translation/ripper/lexer.rb#82 + def to_s; end + + # Returns the value of attribute tok. + # + # source://prism//lib/prism/translation/ripper/lexer.rb#51 + def tok; end + + # Sets the attribute tok + # + # @param value the value to set the attribute tok to. + # + # source://prism//lib/prism/translation/ripper/lexer.rb#51 + def tok=(_arg0); end +end # :stopdoc: # @@ -38842,28 +38967,38 @@ class Prism::Translation::Ripper::Lexer::State # source://prism//lib/prism/translation/ripper/lexer.rb#37 def |(i); end + + class << self + # source://prism//lib/prism/translation/ripper/lexer.rb#45 + def cached(i); end + end end +# Instances are frozen and there are only a handful of them so we cache them here. +# +# source://prism//lib/prism/translation/ripper/lexer.rb#43 +Prism::Translation::Ripper::Lexer::State::STATES = T.let(T.unsafe(nil), Hash) + # This array contains name of parser events. # -# source://prism//lib/prism/translation/ripper.rb#282 +# source://prism//lib/prism/translation/ripper.rb#295 Prism::Translation::Ripper::PARSER_EVENTS = T.let(T.unsafe(nil), Array) # This contains a table of all of the parser events and their # corresponding arity. # -# source://prism//lib/prism/translation/ripper.rb#83 +# source://prism//lib/prism/translation/ripper.rb#96 Prism::Translation::Ripper::PARSER_EVENT_TABLE = T.let(T.unsafe(nil), Hash) # This array contains name of scanner events. # -# source://prism//lib/prism/translation/ripper.rb#285 +# source://prism//lib/prism/translation/ripper.rb#298 Prism::Translation::Ripper::SCANNER_EVENTS = T.let(T.unsafe(nil), Array) # This contains a table of all of the scanner events and their # corresponding arity. # -# source://prism//lib/prism/translation/ripper.rb#226 +# source://prism//lib/prism/translation/ripper.rb#239 Prism::Translation::Ripper::SCANNER_EVENT_TABLE = T.let(T.unsafe(nil), Hash) # This class mirrors the ::Ripper::SexpBuilder subclass of ::Ripper that @@ -40958,68 +41093,68 @@ end # true # ^^^^ # -# source://prism//lib/prism/node.rb#18622 +# source://prism//lib/prism/node.rb#18630 class Prism::TrueNode < ::Prism::Node # Initialize a new TrueNode node. # # @return [TrueNode] a new instance of TrueNode # - # source://prism//lib/prism/node.rb#18624 + # source://prism//lib/prism/node.rb#18632 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#18687 + # source://prism//lib/prism/node.rb#18695 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18632 + # source://prism//lib/prism/node.rb#18640 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#18637 + # source://prism//lib/prism/node.rb#18645 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#18653 + # source://prism//lib/prism/node.rb#18661 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#18648 + # source://prism//lib/prism/node.rb#18656 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> TrueNode # - # source://prism//lib/prism/node.rb#18658 + # source://prism//lib/prism/node.rb#18666 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[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#18663 + # source://prism//lib/prism/node.rb#18671 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#18666 + # source://prism//lib/prism/node.rb#18674 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#18642 + # source://prism//lib/prism/node.rb#18650 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -41027,20 +41162,20 @@ class Prism::TrueNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#18671 + # source://prism//lib/prism/node.rb#18679 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#18676 + # source://prism//lib/prism/node.rb#18684 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#18681 + # source://prism//lib/prism/node.rb#18689 def type; end end end @@ -41050,13 +41185,13 @@ end # undef :foo, :bar, :baz # ^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#18696 +# source://prism//lib/prism/node.rb#18704 class Prism::UndefNode < ::Prism::Node # Initialize a new UndefNode node. # # @return [UndefNode] a new instance of UndefNode # - # source://prism//lib/prism/node.rb#18698 + # source://prism//lib/prism/node.rb#18706 sig do params( source: Prism::Source, @@ -41072,36 +41207,36 @@ class Prism::UndefNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#18785 + # source://prism//lib/prism/node.rb#18793 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18708 + # source://prism//lib/prism/node.rb#18716 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#18713 + # source://prism//lib/prism/node.rb#18721 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#18730 + # source://prism//lib/prism/node.rb#18738 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#18725 + # source://prism//lib/prism/node.rb#18733 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?names: Array[SymbolNode | InterpolatedSymbolNode], ?keyword_loc: Location) -> UndefNode # - # source://prism//lib/prism/node.rb#18735 + # source://prism//lib/prism/node.rb#18743 sig do params( node_id: Integer, @@ -41116,19 +41251,19 @@ class Prism::UndefNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#18740 + # source://prism//lib/prism/node.rb#18748 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#18743 + # source://prism//lib/prism/node.rb#18751 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#18718 + # source://prism//lib/prism/node.rb#18726 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -41136,44 +41271,44 @@ class Prism::UndefNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#18769 + # source://prism//lib/prism/node.rb#18777 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#18764 + # source://prism//lib/prism/node.rb#18772 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#18751 + # source://prism//lib/prism/node.rb#18759 sig { returns(Prism::Location) } def keyword_loc; end # attr_reader names: Array[SymbolNode | InterpolatedSymbolNode] # - # source://prism//lib/prism/node.rb#18748 + # source://prism//lib/prism/node.rb#18756 sig { returns(T::Array[T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)]) } def names; end # Save the keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#18759 + # source://prism//lib/prism/node.rb#18767 def save_keyword_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#18774 + # source://prism//lib/prism/node.rb#18782 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#18779 + # source://prism//lib/prism/node.rb#18787 def type; end end end @@ -41186,13 +41321,13 @@ end # unless foo then bar end # ^^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#18800 +# source://prism//lib/prism/node.rb#18808 class Prism::UnlessNode < ::Prism::Node # Initialize a new UnlessNode node. # # @return [UnlessNode] a new instance of UnlessNode # - # source://prism//lib/prism/node.rb#18802 + # source://prism//lib/prism/node.rb#18810 sig do params( source: Prism::Source, @@ -41212,30 +41347,30 @@ class Prism::UnlessNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#18978 + # source://prism//lib/prism/node.rb#18986 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18816 + # source://prism//lib/prism/node.rb#18824 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#18821 + # source://prism//lib/prism/node.rb#18829 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#18844 + # source://prism//lib/prism/node.rb#18852 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#18835 + # source://prism//lib/prism/node.rb#18843 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end @@ -41247,7 +41382,7 @@ class Prism::UnlessNode < ::Prism::Node # 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#18849 + # source://prism//lib/prism/node.rb#18857 sig do params( node_id: Integer, @@ -41266,13 +41401,13 @@ class Prism::UnlessNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#18854 + # source://prism//lib/prism/node.rb#18862 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, predicate: Prism::node, then_keyword_loc: Location?, statements: StatementsNode?, else_clause: ElseNode?, end_keyword_loc: Location? } # - # source://prism//lib/prism/node.rb#18857 + # source://prism//lib/prism/node.rb#18865 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -41280,7 +41415,7 @@ class Prism::UnlessNode < ::Prism::Node # # @yield [predicate] # - # source://prism//lib/prism/node.rb#18826 + # source://prism//lib/prism/node.rb#18834 def each_child_node; end # The else clause of the unless expression, if present. @@ -41288,13 +41423,13 @@ class Prism::UnlessNode < ::Prism::Node # unless cond then bar else baz end # ^^^^^^^^ # - # source://prism//lib/prism/node.rb#18922 + # source://prism//lib/prism/node.rb#18930 sig { returns(T.nilable(Prism::ElseNode)) } def else_clause; end # def end_keyword: () -> String? # - # source://prism//lib/prism/node.rb#18957 + # source://prism//lib/prism/node.rb#18965 sig { returns(T.nilable(String)) } def end_keyword; end @@ -41303,7 +41438,7 @@ class Prism::UnlessNode < ::Prism::Node # unless cond then bar end # ^^^ # - # source://prism//lib/prism/node.rb#18928 + # source://prism//lib/prism/node.rb#18936 sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end @@ -41312,13 +41447,13 @@ class Prism::UnlessNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#18962 + # source://prism//lib/prism/node.rb#18970 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#18947 + # source://prism//lib/prism/node.rb#18955 sig { returns(String) } def keyword; end @@ -41330,7 +41465,7 @@ class Prism::UnlessNode < ::Prism::Node # bar unless cond # ^^^^^^ # - # source://prism//lib/prism/node.rb#18868 + # source://prism//lib/prism/node.rb#18876 sig { returns(Prism::Location) } def keyword_loc; end @@ -41345,26 +41480,26 @@ class Prism::UnlessNode < ::Prism::Node # bar unless cond # ^^^^ # - # source://prism//lib/prism/node.rb#18887 + # source://prism//lib/prism/node.rb#18895 sig { returns(Prism::Node) } def predicate; end # Save the end_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#18942 + # source://prism//lib/prism/node.rb#18950 def save_end_keyword_loc(repository); end # Save the keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#18876 + # source://prism//lib/prism/node.rb#18884 def save_keyword_loc(repository); end # Save the then_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#18907 + # source://prism//lib/prism/node.rb#18915 def save_then_keyword_loc(repository); end # The body of statements that will executed if the unless condition is @@ -41373,13 +41508,13 @@ class Prism::UnlessNode < ::Prism::Node # unless cond then bar end # ^^^ # - # source://prism//lib/prism/node.rb#18916 + # source://prism//lib/prism/node.rb#18924 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # def then_keyword: () -> String? # - # source://prism//lib/prism/node.rb#18952 + # source://prism//lib/prism/node.rb#18960 sig { returns(T.nilable(String)) } def then_keyword; end @@ -41388,20 +41523,20 @@ class Prism::UnlessNode < ::Prism::Node # unless cond then bar end # ^^^^ # - # source://prism//lib/prism/node.rb#18893 + # source://prism//lib/prism/node.rb#18901 sig { returns(T.nilable(Prism::Location)) } def then_keyword_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#18967 + # source://prism//lib/prism/node.rb#18975 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#18972 + # source://prism//lib/prism/node.rb#18980 def type; end end end @@ -41414,13 +41549,13 @@ end # until foo do bar end # ^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#18996 +# source://prism//lib/prism/node.rb#19004 class Prism::UntilNode < ::Prism::Node # Initialize a new UntilNode node. # # @return [UntilNode] a new instance of UntilNode # - # source://prism//lib/prism/node.rb#18998 + # source://prism//lib/prism/node.rb#19006 sig do params( source: Prism::Source, @@ -41439,12 +41574,12 @@ class Prism::UntilNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#19148 + # source://prism//lib/prism/node.rb#19156 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#19011 + # source://prism//lib/prism/node.rb#19019 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -41452,43 +41587,43 @@ class Prism::UntilNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#19055 + # source://prism//lib/prism/node.rb#19063 sig { returns(T::Boolean) } def begin_modifier?; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#19016 + # source://prism//lib/prism/node.rb#19024 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#19127 + # source://prism//lib/prism/node.rb#19135 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#19092 + # source://prism//lib/prism/node.rb#19100 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#19037 + # source://prism//lib/prism/node.rb#19045 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#19029 + # source://prism//lib/prism/node.rb#19037 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?do_keyword_loc: Location?, ?closing_loc: Location?, ?predicate: Prism::node, ?statements: StatementsNode?) -> UntilNode # - # source://prism//lib/prism/node.rb#19042 + # source://prism//lib/prism/node.rb#19050 sig do params( node_id: Integer, @@ -41506,25 +41641,25 @@ class Prism::UntilNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#19047 + # source://prism//lib/prism/node.rb#19055 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, do_keyword_loc: Location?, closing_loc: Location?, predicate: Prism::node, statements: StatementsNode? } # - # source://prism//lib/prism/node.rb#19050 + # source://prism//lib/prism/node.rb#19058 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#19122 + # source://prism//lib/prism/node.rb#19130 sig { returns(T.nilable(String)) } def do_keyword; end # attr_reader do_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#19073 + # source://prism//lib/prism/node.rb#19081 sig { returns(T.nilable(Prism::Location)) } def do_keyword_loc; end @@ -41532,7 +41667,7 @@ class Prism::UntilNode < ::Prism::Node # # @yield [predicate] # - # source://prism//lib/prism/node.rb#19021 + # source://prism//lib/prism/node.rb#19029 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -41540,19 +41675,19 @@ class Prism::UntilNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#19132 + # source://prism//lib/prism/node.rb#19140 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#19117 + # source://prism//lib/prism/node.rb#19125 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#19060 + # source://prism//lib/prism/node.rb#19068 sig { returns(Prism::Location) } def keyword_loc; end @@ -41561,44 +41696,44 @@ class Prism::UntilNode < ::Prism::Node # attr_reader predicate: Prism::node # - # source://prism//lib/prism/node.rb#19111 + # source://prism//lib/prism/node.rb#19119 sig { returns(Prism::Node) } def predicate; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#19106 + # source://prism//lib/prism/node.rb#19114 def save_closing_loc(repository); end # Save the do_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#19087 + # source://prism//lib/prism/node.rb#19095 def save_do_keyword_loc(repository); end # Save the keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#19068 + # source://prism//lib/prism/node.rb#19076 def save_keyword_loc(repository); end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#19114 + # source://prism//lib/prism/node.rb#19122 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#19137 + # source://prism//lib/prism/node.rb#19145 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#19142 + # source://prism//lib/prism/node.rb#19150 def type; end end end @@ -42541,13 +42676,13 @@ end # ^^^^^^^^^ # end # -# source://prism//lib/prism/node.rb#19165 +# source://prism//lib/prism/node.rb#19173 class Prism::WhenNode < ::Prism::Node # Initialize a new WhenNode node. # # @return [WhenNode] a new instance of WhenNode # - # source://prism//lib/prism/node.rb#19167 + # source://prism//lib/prism/node.rb#19175 sig do params( source: Prism::Source, @@ -42565,42 +42700,42 @@ class Prism::WhenNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#19287 + # source://prism//lib/prism/node.rb#19295 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#19179 + # source://prism//lib/prism/node.rb#19187 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#19184 + # source://prism//lib/prism/node.rb#19192 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#19205 + # source://prism//lib/prism/node.rb#19213 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#19197 + # source://prism//lib/prism/node.rb#19205 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # attr_reader conditions: Array[Prism::node] # - # source://prism//lib/prism/node.rb#19236 + # source://prism//lib/prism/node.rb#19244 sig { returns(T::Array[Prism::Node]) } def conditions; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?conditions: Array[Prism::node], ?then_keyword_loc: Location?, ?statements: StatementsNode?) -> WhenNode # - # source://prism//lib/prism/node.rb#19210 + # source://prism//lib/prism/node.rb#19218 sig do params( node_id: Integer, @@ -42617,13 +42752,13 @@ class Prism::WhenNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#19215 + # source://prism//lib/prism/node.rb#19223 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, conditions: Array[Prism::node], then_keyword_loc: Location?, statements: StatementsNode? } # - # source://prism//lib/prism/node.rb#19218 + # source://prism//lib/prism/node.rb#19226 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -42631,7 +42766,7 @@ class Prism::WhenNode < ::Prism::Node # # @yield [statements] # - # source://prism//lib/prism/node.rb#19189 + # source://prism//lib/prism/node.rb#19197 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -42639,62 +42774,62 @@ class Prism::WhenNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#19271 + # source://prism//lib/prism/node.rb#19279 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#19261 + # source://prism//lib/prism/node.rb#19269 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#19223 + # source://prism//lib/prism/node.rb#19231 sig { returns(Prism::Location) } def keyword_loc; end # Save the keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#19231 + # source://prism//lib/prism/node.rb#19239 def save_keyword_loc(repository); end # Save the then_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#19253 + # source://prism//lib/prism/node.rb#19261 def save_then_keyword_loc(repository); end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#19258 + # source://prism//lib/prism/node.rb#19266 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # def then_keyword: () -> String? # - # source://prism//lib/prism/node.rb#19266 + # source://prism//lib/prism/node.rb#19274 sig { returns(T.nilable(String)) } def then_keyword; end # attr_reader then_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#19239 + # source://prism//lib/prism/node.rb#19247 sig { returns(T.nilable(Prism::Location)) } def then_keyword_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#19276 + # source://prism//lib/prism/node.rb#19284 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#19281 + # source://prism//lib/prism/node.rb#19289 def type; end end end @@ -42707,13 +42842,13 @@ end # while foo do bar end # ^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#19304 +# source://prism//lib/prism/node.rb#19312 class Prism::WhileNode < ::Prism::Node # Initialize a new WhileNode node. # # @return [WhileNode] a new instance of WhileNode # - # source://prism//lib/prism/node.rb#19306 + # source://prism//lib/prism/node.rb#19314 sig do params( source: Prism::Source, @@ -42732,12 +42867,12 @@ class Prism::WhileNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#19456 + # source://prism//lib/prism/node.rb#19464 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#19319 + # source://prism//lib/prism/node.rb#19327 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -42745,43 +42880,43 @@ class Prism::WhileNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#19363 + # source://prism//lib/prism/node.rb#19371 sig { returns(T::Boolean) } def begin_modifier?; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#19324 + # source://prism//lib/prism/node.rb#19332 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#19435 + # source://prism//lib/prism/node.rb#19443 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#19400 + # source://prism//lib/prism/node.rb#19408 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#19345 + # source://prism//lib/prism/node.rb#19353 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#19337 + # source://prism//lib/prism/node.rb#19345 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?do_keyword_loc: Location?, ?closing_loc: Location?, ?predicate: Prism::node, ?statements: StatementsNode?) -> WhileNode # - # source://prism//lib/prism/node.rb#19350 + # source://prism//lib/prism/node.rb#19358 sig do params( node_id: Integer, @@ -42799,25 +42934,25 @@ class Prism::WhileNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#19355 + # source://prism//lib/prism/node.rb#19363 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, do_keyword_loc: Location?, closing_loc: Location?, predicate: Prism::node, statements: StatementsNode? } # - # source://prism//lib/prism/node.rb#19358 + # source://prism//lib/prism/node.rb#19366 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#19430 + # source://prism//lib/prism/node.rb#19438 sig { returns(T.nilable(String)) } def do_keyword; end # attr_reader do_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#19381 + # source://prism//lib/prism/node.rb#19389 sig { returns(T.nilable(Prism::Location)) } def do_keyword_loc; end @@ -42825,7 +42960,7 @@ class Prism::WhileNode < ::Prism::Node # # @yield [predicate] # - # source://prism//lib/prism/node.rb#19329 + # source://prism//lib/prism/node.rb#19337 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -42833,19 +42968,19 @@ class Prism::WhileNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#19440 + # source://prism//lib/prism/node.rb#19448 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#19425 + # source://prism//lib/prism/node.rb#19433 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#19368 + # source://prism//lib/prism/node.rb#19376 sig { returns(Prism::Location) } def keyword_loc; end @@ -42854,44 +42989,44 @@ class Prism::WhileNode < ::Prism::Node # attr_reader predicate: Prism::node # - # source://prism//lib/prism/node.rb#19419 + # source://prism//lib/prism/node.rb#19427 sig { returns(Prism::Node) } def predicate; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#19414 + # source://prism//lib/prism/node.rb#19422 def save_closing_loc(repository); end # Save the do_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#19395 + # source://prism//lib/prism/node.rb#19403 def save_do_keyword_loc(repository); end # Save the keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#19376 + # source://prism//lib/prism/node.rb#19384 def save_keyword_loc(repository); end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#19422 + # source://prism//lib/prism/node.rb#19430 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#19445 + # source://prism//lib/prism/node.rb#19453 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#19450 + # source://prism//lib/prism/node.rb#19458 def type; end end end @@ -42901,7 +43036,7 @@ end # `foo` # ^^^^^ # -# source://prism//lib/prism/node.rb#19471 +# source://prism//lib/prism/node.rb#19479 class Prism::XStringNode < ::Prism::Node include ::Prism::HeredocQuery @@ -42909,7 +43044,7 @@ class Prism::XStringNode < ::Prism::Node # # @return [XStringNode] a new instance of XStringNode # - # source://prism//lib/prism/node.rb#19473 + # source://prism//lib/prism/node.rb#19481 sig do params( source: Prism::Source, @@ -42927,60 +43062,60 @@ class Prism::XStringNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#19607 + # source://prism//lib/prism/node.rb#19615 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#19485 + # source://prism//lib/prism/node.rb#19493 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#19490 + # source://prism//lib/prism/node.rb#19498 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#19586 + # source://prism//lib/prism/node.rb#19594 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#19560 + # source://prism//lib/prism/node.rb#19568 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#19506 + # source://prism//lib/prism/node.rb#19514 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#19501 + # source://prism//lib/prism/node.rb#19509 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def content: () -> String # - # source://prism//lib/prism/node.rb#19581 + # source://prism//lib/prism/node.rb#19589 sig { returns(String) } def content; end # attr_reader content_loc: Location # - # source://prism//lib/prism/node.rb#19547 + # source://prism//lib/prism/node.rb#19555 sig { returns(Prism::Location) } def content_loc; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String) -> XStringNode # - # source://prism//lib/prism/node.rb#19511 + # source://prism//lib/prism/node.rb#19519 sig do params( node_id: Integer, @@ -42997,19 +43132,19 @@ class Prism::XStringNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#19516 + # source://prism//lib/prism/node.rb#19524 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String } # - # source://prism//lib/prism/node.rb#19519 + # source://prism//lib/prism/node.rb#19527 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#19495 + # source://prism//lib/prism/node.rb#19503 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -43019,7 +43154,7 @@ class Prism::XStringNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#19529 + # source://prism//lib/prism/node.rb#19537 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -43027,7 +43162,7 @@ class Prism::XStringNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#19524 + # source://prism//lib/prism/node.rb#19532 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -43036,38 +43171,38 @@ class Prism::XStringNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#19591 + # source://prism//lib/prism/node.rb#19599 sig { override.returns(String) } def inspect; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#19576 + # source://prism//lib/prism/node.rb#19584 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#19534 + # source://prism//lib/prism/node.rb#19542 sig { returns(Prism::Location) } def opening_loc; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#19568 + # source://prism//lib/prism/node.rb#19576 def save_closing_loc(repository); end # Save the content_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#19555 + # source://prism//lib/prism/node.rb#19563 def save_content_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#19542 + # source://prism//lib/prism/node.rb#19550 def save_opening_loc(repository); end # Occasionally it's helpful to treat a string as if it were interpolated so @@ -43079,20 +43214,20 @@ class Prism::XStringNode < ::Prism::Node # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#19596 + # source://prism//lib/prism/node.rb#19604 sig { override.returns(Symbol) } def type; end # attr_reader unescaped: String # - # source://prism//lib/prism/node.rb#19573 + # source://prism//lib/prism/node.rb#19581 sig { returns(String) } def unescaped; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#19601 + # source://prism//lib/prism/node.rb#19609 def type; end end end @@ -43102,13 +43237,13 @@ end # yield 1 # ^^^^^^^ # -# source://prism//lib/prism/node.rb#19621 +# source://prism//lib/prism/node.rb#19629 class Prism::YieldNode < ::Prism::Node # Initialize a new YieldNode node. # # @return [YieldNode] a new instance of YieldNode # - # source://prism//lib/prism/node.rb#19623 + # source://prism//lib/prism/node.rb#19631 sig do params( source: Prism::Source, @@ -43126,42 +43261,42 @@ class Prism::YieldNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#19762 + # source://prism//lib/prism/node.rb#19770 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#19635 + # source://prism//lib/prism/node.rb#19643 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#19709 + # source://prism//lib/prism/node.rb#19717 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#19640 + # source://prism//lib/prism/node.rb#19648 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#19659 + # source://prism//lib/prism/node.rb#19667 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#19652 + # source://prism//lib/prism/node.rb#19660 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?lparen_loc: Location?, ?arguments: ArgumentsNode?, ?rparen_loc: Location?) -> YieldNode # - # source://prism//lib/prism/node.rb#19664 + # source://prism//lib/prism/node.rb#19672 sig do params( node_id: Integer, @@ -43178,13 +43313,13 @@ class Prism::YieldNode < ::Prism::Node # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#19669 + # source://prism//lib/prism/node.rb#19677 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location? } # - # source://prism//lib/prism/node.rb#19672 + # source://prism//lib/prism/node.rb#19680 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -43192,7 +43327,7 @@ class Prism::YieldNode < ::Prism::Node # # @yield [arguments] # - # source://prism//lib/prism/node.rb#19645 + # source://prism//lib/prism/node.rb#19653 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -43200,74 +43335,74 @@ class Prism::YieldNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#19746 + # source://prism//lib/prism/node.rb#19754 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#19731 + # source://prism//lib/prism/node.rb#19739 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#19677 + # source://prism//lib/prism/node.rb#19685 sig { returns(Prism::Location) } def keyword_loc; end # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#19736 + # source://prism//lib/prism/node.rb#19744 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://prism//lib/prism/node.rb#19690 + # source://prism//lib/prism/node.rb#19698 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#19741 + # source://prism//lib/prism/node.rb#19749 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://prism//lib/prism/node.rb#19712 + # source://prism//lib/prism/node.rb#19720 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end # Save the keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#19685 + # source://prism//lib/prism/node.rb#19693 def save_keyword_loc(repository); end # Save the lparen_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#19704 + # source://prism//lib/prism/node.rb#19712 def save_lparen_loc(repository); end # Save the rparen_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#19726 + # source://prism//lib/prism/node.rb#19734 def save_rparen_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#19751 + # source://prism//lib/prism/node.rb#19759 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#19756 + # source://prism//lib/prism/node.rb#19764 def type; end end end diff --git a/sorbet/rbi/gems/rbs@4.0.0.dev.5.rbi b/sorbet/rbi/gems/rbs@4.0.0.dev.5.rbi index 8af4bd7a4a..135596e0a1 100644 --- a/sorbet/rbi/gems/rbs@4.0.0.dev.5.rbi +++ b/sorbet/rbi/gems/rbs@4.0.0.dev.5.rbi @@ -5942,6 +5942,7 @@ class RBS::Prototype::Runtime::DataGenerator < ::RBS::Prototype::Runtime::ValueO def add_decl_members(decl); end # def self.new: (untyped foo, untyped bar) -> instance + # | (foo: untyped, bar: untyped) -> instance # # source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#237 def build_s_new; end @@ -6009,6 +6010,7 @@ class RBS::Prototype::Runtime::StructGenerator < ::RBS::Prototype::Runtime::Valu def build_s_keyword_init_p; end # def self.new: (?untyped foo, ?untyped bar) -> instance + # | (?foo: untyped, ?bar: untyped) -> instance # # source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#117 def build_s_new; end diff --git a/sorbet/rbi/gems/regexp_parser@2.10.0.rbi b/sorbet/rbi/gems/regexp_parser@2.10.0.rbi index dc2a2711e2..2ef2b52b13 100644 --- a/sorbet/rbi/gems/regexp_parser@2.10.0.rbi +++ b/sorbet/rbi/gems/regexp_parser@2.10.0.rbi @@ -806,7 +806,6 @@ Regexp::Expression::Escape = Regexp::Expression::EscapeSequence # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#2 module Regexp::Expression::EscapeSequence; end -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#22 class Regexp::Expression::EscapeSequence::AbstractMetaControlSequence < ::Regexp::Expression::EscapeSequence::Base private @@ -818,22 +817,17 @@ class Regexp::Expression::EscapeSequence::AbstractMetaControlSequence < ::Regexp end # \e -# -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#5 class Regexp::Expression::EscapeSequence::AsciiEscape < ::Regexp::Expression::EscapeSequence::Base # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#2 def codepoint; end end # \b -# -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#6 class Regexp::Expression::EscapeSequence::Backspace < ::Regexp::Expression::EscapeSequence::Base # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#3 def codepoint; end end -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#3 class Regexp::Expression::EscapeSequence::Base < ::Regexp::Expression::Base # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_char.rb#2 def char; end @@ -843,22 +837,18 @@ class Regexp::Expression::EscapeSequence::Base < ::Regexp::Expression::Base end # \a -# -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#7 class Regexp::Expression::EscapeSequence::Bell < ::Regexp::Expression::EscapeSequence::Base # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#4 def codepoint; end end # e.g. \u000A -# -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#18 class Regexp::Expression::EscapeSequence::Codepoint < ::Regexp::Expression::EscapeSequence::Base # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#16 def codepoint; end end -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#20 +# source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#163 class Regexp::Expression::EscapeSequence::CodepointList < ::Regexp::Expression::EscapeSequence::Base # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#20 def char; end @@ -877,88 +867,66 @@ class Regexp::Expression::EscapeSequence::CodepointList < ::Regexp::Expression:: end # e.g. \cB -# -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#23 class Regexp::Expression::EscapeSequence::Control < ::Regexp::Expression::EscapeSequence::AbstractMetaControlSequence # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#52 def codepoint; end end # \f -# -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#8 class Regexp::Expression::EscapeSequence::FormFeed < ::Regexp::Expression::EscapeSequence::Base # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#5 def codepoint; end end # e.g. \x0A -# -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#17 class Regexp::Expression::EscapeSequence::Hex < ::Regexp::Expression::EscapeSequence::Base # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#15 def codepoint; end end # e.g. \j, \@, \😀 (ineffectual escapes) -# -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#14 class Regexp::Expression::EscapeSequence::Literal < ::Regexp::Expression::EscapeSequence::Base # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#11 def codepoint; end end # e.g. \M-Z -# -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#24 class Regexp::Expression::EscapeSequence::Meta < ::Regexp::Expression::EscapeSequence::AbstractMetaControlSequence # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#58 def codepoint; end end # e.g. \M-\cX -# -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#25 class Regexp::Expression::EscapeSequence::MetaControl < ::Regexp::Expression::EscapeSequence::AbstractMetaControlSequence # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#64 def codepoint; end end # \n -# -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#9 class Regexp::Expression::EscapeSequence::Newline < ::Regexp::Expression::EscapeSequence::Base # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#6 def codepoint; end end # e.g. \012 -# -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#16 class Regexp::Expression::EscapeSequence::Octal < ::Regexp::Expression::EscapeSequence::Base # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#13 def codepoint; end end # \r -# -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#10 class Regexp::Expression::EscapeSequence::Return < ::Regexp::Expression::EscapeSequence::Base # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#7 def codepoint; end end # \t -# -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#11 class Regexp::Expression::EscapeSequence::Tab < ::Regexp::Expression::EscapeSequence::Base # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#8 def codepoint; end end # \v -# -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#12 class Regexp::Expression::EscapeSequence::VerticalTab < ::Regexp::Expression::EscapeSequence::Base # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#9 def codepoint; end diff --git a/sorbet/rbi/gems/require-hooks@0.2.2.rbi b/sorbet/rbi/gems/require-hooks@0.2.3.rbi similarity index 100% rename from sorbet/rbi/gems/require-hooks@0.2.2.rbi rename to sorbet/rbi/gems/require-hooks@0.2.3.rbi diff --git a/sorbet/rbi/gems/rexml@3.4.4.rbi b/sorbet/rbi/gems/rexml@3.4.4.rbi index 203c364a82..ca61e29292 100644 --- a/sorbet/rbi/gems/rexml@3.4.4.rbi +++ b/sorbet/rbi/gems/rexml@3.4.4.rbi @@ -3756,8 +3756,8 @@ class REXML::Instruction < ::REXML::Child # 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 + # @param target can be one of a number of things. If String, then # @return [Instruction] a new instance of Instruction # # source://rexml//lib/rexml/instruction.rb#25 @@ -4005,9 +4005,9 @@ class REXML::Parent < ::REXML::Child # Set an index entry. See Array.[]= # + # @param child if opt is an Integer, this is the child to set # @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 @@ -4092,8 +4092,8 @@ class REXML::Parent < ::REXML::Child # 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 + # @param to_replace the child to replace (must be a Child) # # source://rexml//lib/rexml/parent.rb#140 def replace_child(to_replace, replacement); end @@ -4474,6 +4474,9 @@ class REXML::Parsers::XPathParser def FunctionCall(rest, parsed); end # LocationPath + # | RelativeLocationPath + # | '/' RelativeLocationPath? + # | '//' RelativeLocationPath # # source://rexml//lib/rexml/parsers/xpathparser.rb#243 def LocationPath(path, parsed); end @@ -4530,6 +4533,11 @@ REXML::Parsers::XPathParser::LOCAL_NAME_WILDCARD = T.let(T.unsafe(nil), Regexp) # 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) diff --git a/sorbet/rbi/gems/rubocop-ast@1.46.0.rbi b/sorbet/rbi/gems/rubocop-ast@1.46.0.rbi index 84a5161d21..3d106a759b 100644 --- a/sorbet/rbi/gems/rubocop-ast@1.46.0.rbi +++ b/sorbet/rbi/gems/rubocop-ast@1.46.0.rbi @@ -979,6 +979,9 @@ module RuboCop::AST::CollectionNode # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 def reverse_each(*_arg0, **_arg1, &_arg2); end + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def rfind(*_arg0, **_arg1, &_arg2); end + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 def rindex(*_arg0, **_arg1, &_arg2); end @@ -4650,7 +4653,6 @@ class RuboCop::AST::NodePattern::Compiler::Subcompiler end end -# source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#53 class RuboCop::AST::NodePattern::Invalid < ::StandardError; end # Lexer class for `NodePattern` diff --git a/sorbet/rbi/gems/rubocop-minitest@0.38.1.rbi b/sorbet/rbi/gems/rubocop-minitest@0.38.1.rbi index 6bb2fc046d..d553e43cf3 100644 --- a/sorbet/rbi/gems/rubocop-minitest@0.38.1.rbi +++ b/sorbet/rbi/gems/rubocop-minitest@0.38.1.rbi @@ -979,17 +979,12 @@ RuboCop::Cop::Minitest::Focus::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for deprecated global expectations # and autocorrects them to use expect format. # -# @example EnforcedStyle: any (default) +# @example EnforcedStyle: _ # # bad # musts.must_equal expected_musts # wonts.wont_match expected_wonts # musts.must_raise TypeError # -# # good -# _(musts).must_equal expected_musts -# _(wonts).wont_match expected_wonts -# _ { musts }.must_raise TypeError -# # expect(musts).must_equal expected_musts # expect(wonts).wont_match expected_wonts # expect { musts }.must_raise TypeError @@ -997,12 +992,22 @@ RuboCop::Cop::Minitest::Focus::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # value(musts).must_equal expected_musts # value(wonts).wont_match expected_wonts # value { musts }.must_raise TypeError -# @example EnforcedStyle: _ +# +# # good +# _(musts).must_equal expected_musts +# _(wonts).wont_match expected_wonts +# _ { musts }.must_raise TypeError +# @example EnforcedStyle: any (default) # # bad # musts.must_equal expected_musts # wonts.wont_match expected_wonts # musts.must_raise TypeError # +# # good +# _(musts).must_equal expected_musts +# _(wonts).wont_match expected_wonts +# _ { musts }.must_raise TypeError +# # expect(musts).must_equal expected_musts # expect(wonts).wont_match expected_wonts # expect { musts }.must_raise TypeError @@ -1010,11 +1015,6 @@ RuboCop::Cop::Minitest::Focus::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # value(musts).must_equal expected_musts # value(wonts).wont_match expected_wonts # value { musts }.must_raise TypeError -# -# # good -# _(musts).must_equal expected_musts -# _(wonts).wont_match expected_wonts -# _ { musts }.must_raise TypeError # @example EnforcedStyle: expect # # bad # musts.must_equal expected_musts @@ -2486,13 +2486,13 @@ module RuboCop::Cop::MinitestCopRule # define_rule :assert, target_method: %i[match match? =~], # preferred_method: :assert_match, inverse: 'regexp_type?' # @param assertion_method [Symbol] Assertion method like `assert` or `refute`. - # @param target_method [Symbol, Array] Method name(s) offensed by assertion method arguments. + # @param inverse [Boolean, String] An optional param. Order of arguments replaced by autocorrection. + # If string is passed, it becomes a predicate method for the first argument node. # @param preferred_method [Symbol] Is required if passing multiple target methods. Custom method name replaced by # autocorrection. The preferred method name that connects # `assertion_method` and `target_method` with `_` is # the default name. - # @param inverse [Boolean, String] An optional param. Order of arguments replaced by autocorrection. - # If string is passed, it becomes a predicate method for the first argument node. + # @param target_method [Symbol, Array] Method name(s) offensed by assertion method arguments. # # source://rubocop-minitest//lib/rubocop/cop/mixin/minitest_cop_rule.rb#31 def define_rule(assertion_method, target_method:, preferred_method: T.unsafe(nil), inverse: T.unsafe(nil)); end diff --git a/sorbet/rbi/gems/rubocop@1.78.0.rbi b/sorbet/rbi/gems/rubocop@1.78.0.rbi index 11a4ec1bf1..672f9ae08c 100644 --- a/sorbet/rbi/gems/rubocop@1.78.0.rbi +++ b/sorbet/rbi/gems/rubocop@1.78.0.rbi @@ -3853,24 +3853,6 @@ RuboCop::Cop::Bundler::DuplicatedGroup::SOURCE_BLOCK_NAMES = T.let(T.unsafe(nil) # see https://bundler.io/man/gemfile.5.html # . # -# @example OnlyFor: [] (default) -# # bad -# -# gem 'foo' -# -# # good -# -# # Helpers for the foo things. -# gem 'foo' -# @example OnlyFor: ['version_specifiers'] -# # bad -# -# gem 'foo', '< 2.1' -# -# # good -# -# # Version 2.1 introduces breaking change baz -# gem 'foo', '< 2.1' # @example OnlyFor: ['restrictive_version_specifiers'] # # bad # @@ -3896,6 +3878,24 @@ RuboCop::Cop::Bundler::DuplicatedGroup::SOURCE_BLOCK_NAMES = T.let(T.unsafe(nil) # # # Version 2.1 introduces breaking change baz # gem 'bar', '< 2.1' +# @example OnlyFor: ['version_specifiers'] +# # bad +# +# gem 'foo', '< 2.1' +# +# # good +# +# # Version 2.1 introduces breaking change baz +# gem 'foo', '< 2.1' +# @example OnlyFor: [] (default) +# # bad +# +# gem 'foo' +# +# # good +# +# # Helpers for the foo things. +# gem 'foo' # # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#83 class RuboCop::Cop::Bundler::GemComment < ::RuboCop::Cop::Base @@ -4074,47 +4074,47 @@ RuboCop::Cop::Bundler::GemFilename::MSG_GEMS_RB_REQUIRED = T.let(T.unsafe(nil), # Enforce that Gem version specifications or a commit reference (branch, # ref, or tag) are either required or forbidden. # -# @example EnforcedStyle: required (default) -# # bad +# @example EnforcedStyle: forbidden +# # good # gem 'rubocop' # -# # good +# # bad # gem 'rubocop', '~> 1.12' # -# # good +# # bad # gem 'rubocop', '>= 1.10.0' # -# # good +# # bad # gem 'rubocop', '>= 1.5.0', '< 1.10.0' # -# # good +# # bad # gem 'rubocop', branch: 'feature-branch' # -# # good +# # bad # gem 'rubocop', ref: '74b5bfbb2c4b6fd6cdbbc7254bd7084b36e0c85b' # -# # good +# # bad # gem 'rubocop', tag: 'v1.17.0' -# @example EnforcedStyle: forbidden -# # good +# @example EnforcedStyle: required (default) +# # bad # gem 'rubocop' # -# # bad +# # good # gem 'rubocop', '~> 1.12' # -# # bad +# # good # gem 'rubocop', '>= 1.10.0' # -# # bad +# # good # gem 'rubocop', '>= 1.5.0', '< 1.10.0' # -# # bad +# # good # gem 'rubocop', branch: 'feature-branch' # -# # bad +# # good # gem 'rubocop', ref: '74b5bfbb2c4b6fd6cdbbc7254bd7084b36e0c85b' # -# # bad +# # good # gem 'rubocop', tag: 'v1.17.0' # # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#53 @@ -4211,14 +4211,14 @@ RuboCop::Cop::Bundler::GemVersion::VERSION_SPECIFICATION_REGEX = T.let(T.unsafe( # # # good # source 'https://rubygems.org' # strongly recommended -# @example AllowHttpProtocol: true (default) -# -# # good -# source 'http://rubygems.org' # use only if HTTPS is unavailable # @example AllowHttpProtocol: false # # # bad # source 'http://rubygems.org' +# @example AllowHttpProtocol: true (default) +# +# # good +# source 'http://rubygems.org' # use only if HTTPS is unavailable # # source://rubocop//lib/rubocop/cop/bundler/insecure_protocol_source.rb#41 class RuboCop::Cop::Bundler::InsecureProtocolSource < ::RuboCop::Cop::Base @@ -4262,14 +4262,14 @@ RuboCop::Cop::Bundler::InsecureProtocolSource::RESTRICT_ON_SEND = T.let(T.unsafe # gem 'rubocop' # # gem 'rspec' -# @example TreatCommentsAsGroupSeparators: true (default) -# # good +# @example TreatCommentsAsGroupSeparators: false +# # bad # # For code quality # gem 'rubocop' # # For tests # gem 'rspec' -# @example TreatCommentsAsGroupSeparators: false -# # bad +# @example TreatCommentsAsGroupSeparators: true (default) +# # good # # For code quality # gem 'rubocop' # # For tests @@ -6232,47 +6232,47 @@ RuboCop::Cop::Gemspec::AttributeAssignment::MSG = T.let(T.unsafe(nil), String) # Enforce that gem dependency version specifications or a commit reference (branch, # ref, or tag) are either required or forbidden. # -# @example EnforcedStyle: required (default) +# @example EnforcedStyle: forbidden # # # bad # Gem::Specification.new do |spec| -# spec.add_dependency 'parser' +# spec.add_dependency 'parser', '>= 2.3.3.1', '< 3.0' # end # # # bad # Gem::Specification.new do |spec| -# spec.add_development_dependency 'parser' +# spec.add_development_dependency 'parser', '>= 2.3.3.1', '< 3.0' # end # # # good # Gem::Specification.new do |spec| -# spec.add_dependency 'parser', '>= 2.3.3.1', '< 3.0' +# spec.add_dependency 'parser' # end # # # good # Gem::Specification.new do |spec| -# spec.add_development_dependency 'parser', '>= 2.3.3.1', '< 3.0' +# spec.add_development_dependency 'parser' # end -# @example EnforcedStyle: forbidden +# @example EnforcedStyle: required (default) # # # bad # Gem::Specification.new do |spec| -# spec.add_dependency 'parser', '>= 2.3.3.1', '< 3.0' +# spec.add_dependency 'parser' # end # # # bad # Gem::Specification.new do |spec| -# spec.add_development_dependency 'parser', '>= 2.3.3.1', '< 3.0' +# spec.add_development_dependency 'parser' # end # # # good # Gem::Specification.new do |spec| -# spec.add_dependency 'parser' +# spec.add_dependency 'parser', '>= 2.3.3.1', '< 3.0' # end # # # good # Gem::Specification.new do |spec| -# spec.add_development_dependency 'parser' +# spec.add_development_dependency 'parser', '>= 2.3.3.1', '< 3.0' # end # # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#53 @@ -6617,14 +6617,14 @@ RuboCop::Cop::Gemspec::DuplicatedAssignment::MSG = T.let(T.unsafe(nil), String) # spec.add_runtime_dependency 'rubocop' # # spec.add_runtime_dependency 'rspec' -# @example TreatCommentsAsGroupSeparators: true (default) -# # good +# @example TreatCommentsAsGroupSeparators: false +# # bad # # For code quality # spec.add_dependency 'rubocop' # # For tests # spec.add_dependency 'rspec' -# @example TreatCommentsAsGroupSeparators: false -# # bad +# @example TreatCommentsAsGroupSeparators: true (default) +# # good # # For code quality # spec.add_dependency 'rubocop' # # For tests @@ -8281,7 +8281,7 @@ RuboCop::Cop::Layout::AssignmentIndentation::MSG = T.let(T.unsafe(nil), String) # align with the start of the line, it defaults to `EnforcedStyleAlignWith: start_of_line`. # These style can be configured by each cop. # -# @example EnforcedStyleAlignWith: start_of_line (default) +# @example EnforcedStyleAlignWith: begin # # bad # foo ||= begin # do_something @@ -8291,7 +8291,7 @@ RuboCop::Cop::Layout::AssignmentIndentation::MSG = T.let(T.unsafe(nil), String) # foo ||= begin # do_something # end -# @example EnforcedStyleAlignWith: begin +# @example EnforcedStyleAlignWith: start_of_line (default) # # bad # foo ||= begin # do_something @@ -9348,7 +9348,7 @@ RuboCop::Cop::Layout::ConditionPosition::MSG = T.let(T.unsafe(nil), String) # keyword is. If it's set to `def`, the `end` shall be aligned with the # `def` keyword. # -# @example EnforcedStyleAlignWith: start_of_line (default) +# @example EnforcedStyleAlignWith: def # # bad # # private def foo @@ -9358,7 +9358,7 @@ RuboCop::Cop::Layout::ConditionPosition::MSG = T.let(T.unsafe(nil), String) # # private def foo # end -# @example EnforcedStyleAlignWith: def +# @example EnforcedStyleAlignWith: start_of_line (default) # # bad # # private def foo @@ -9565,8 +9565,8 @@ RuboCop::Cop::Layout::ElseAlignment::MSG = T.let(T.unsafe(nil), String) # # # class Foo # end -# @example AllowBorderComment: true (default) -# # good +# @example AllowBorderComment: false +# # bad # # def foo # end @@ -9575,8 +9575,8 @@ RuboCop::Cop::Layout::ElseAlignment::MSG = T.let(T.unsafe(nil), String) # # def bar # end -# @example AllowBorderComment: false -# # bad +# @example AllowBorderComment: true (default) +# # good # # def foo # end @@ -9585,16 +9585,16 @@ RuboCop::Cop::Layout::ElseAlignment::MSG = T.let(T.unsafe(nil), String) # # def bar # end -# @example AllowMarginComment: true (default) -# # good +# @example AllowMarginComment: false +# # bad # # # # # Description of `Foo` class. # # # class Foo # end -# @example AllowMarginComment: false -# # bad +# @example AllowMarginComment: true (default) +# # good # # # # # Description of `Foo` class. @@ -9959,21 +9959,32 @@ RuboCop::Cop::Layout::EmptyLineAfterMultilineCondition::MSG = T.let(T.unsafe(nil # `AllowAdjacentOneLineDefs` configures whether adjacent # one-line definitions are considered an offense. # -# @example EmptyLineBetweenMethodDefs: true (default) -# # checks for empty lines between method definitions. +# @example AllowAdjacentOneLineDefs: false # # # bad -# def a -# end -# def b -# end +# class ErrorA < BaseError; end +# class ErrorB < BaseError; end +# class ErrorC < BaseError; end # # # good -# def a -# end +# class ErrorA < BaseError; end # -# def b -# end +# class ErrorB < BaseError; end +# +# class ErrorC < BaseError; end +# @example AllowAdjacentOneLineDefs: true (default) +# +# # good +# class ErrorA < BaseError; end +# class ErrorB < BaseError; end +# class ErrorC < BaseError; end +# +# # good +# class ErrorA < BaseError; end +# +# class ErrorB < BaseError; end +# +# class ErrorC < BaseError; end # @example EmptyLineBetweenClassDefs: true (default) # # checks for empty lines between class definitions. # @@ -9994,6 +10005,21 @@ RuboCop::Cop::Layout::EmptyLineAfterMultilineCondition::MSG = T.let(T.unsafe(nil # # def b # end +# @example EmptyLineBetweenMethodDefs: true (default) +# # checks for empty lines between method definitions. +# +# # bad +# def a +# end +# def b +# end +# +# # good +# def a +# end +# +# def b +# end # @example EmptyLineBetweenModuleDefs: true (default) # # checks for empty lines between module definitions. # @@ -10014,32 +10040,6 @@ RuboCop::Cop::Layout::EmptyLineAfterMultilineCondition::MSG = T.let(T.unsafe(nil # # def b # end -# @example AllowAdjacentOneLineDefs: true (default) -# -# # good -# class ErrorA < BaseError; end -# class ErrorB < BaseError; end -# class ErrorC < BaseError; end -# -# # good -# class ErrorA < BaseError; end -# -# class ErrorB < BaseError; end -# -# class ErrorC < BaseError; end -# @example AllowAdjacentOneLineDefs: false -# -# # bad -# class ErrorA < BaseError; end -# class ErrorB < BaseError; end -# class ErrorC < BaseError; end -# -# # good -# class ErrorA < BaseError; end -# -# class ErrorB < BaseError; end -# -# class ErrorC < BaseError; end # # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#102 class RuboCop::Cop::Layout::EmptyLineBetweenDefs < ::RuboCop::Cop::Base @@ -10467,24 +10467,24 @@ RuboCop::Cop::Layout::EmptyLinesAroundArguments::MSG = T.let(T.unsafe(nil), Stri # # def do_something # end -# @example AllowAliasSyntax: true (default) -# # good +# @example AllowAliasSyntax: false +# # bad # attr_accessor :foo # alias :foo? :foo # # def do_something # end -# @example AllowAliasSyntax: false -# # bad +# +# # good # attr_accessor :foo +# # alias :foo? :foo # # def do_something # end -# +# @example AllowAliasSyntax: true (default) # # good # attr_accessor :foo -# # alias :foo? :foo # # def do_something @@ -10592,19 +10592,19 @@ RuboCop::Cop::Layout::EmptyLinesAroundBeginBody::KIND = T.let(T.unsafe(nil), Str # Checks if empty lines around the bodies of blocks match # the configuration. # -# @example EnforcedStyle: no_empty_lines (default) +# @example EnforcedStyle: empty_lines # # good # # foo do |bar| +# # # ... +# # end -# @example EnforcedStyle: empty_lines +# @example EnforcedStyle: no_empty_lines (default) # # good # # foo do |bar| -# # # ... -# # end # # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_block_body.rb#24 @@ -10711,10 +10711,11 @@ RuboCop::Cop::Layout::EmptyLinesAroundBody::MSG_MISSING = T.let(T.unsafe(nil), S # Checks if empty lines around the bodies of classes match # the configuration. # -# @example EnforcedStyle: no_empty_lines (default) +# @example EnforcedStyle: beginning_only # # good # # class Foo +# # def bar # # ... # end @@ -10746,23 +10747,22 @@ RuboCop::Cop::Layout::EmptyLinesAroundBody::MSG_MISSING = T.let(T.unsafe(nil), S # def bar; end # # end -# @example EnforcedStyle: beginning_only +# @example EnforcedStyle: ending_only # # good # # class Foo -# # def bar # # ... # end +# # end -# @example EnforcedStyle: ending_only +# @example EnforcedStyle: no_empty_lines (default) # # good # # class Foo # def bar # # ... # end -# # end # # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_class_body.rb#67 @@ -10940,14 +10940,6 @@ RuboCop::Cop::Layout::EmptyLinesAroundMethodBody::KIND = T.let(T.unsafe(nil), St # Checks if empty lines around the bodies of modules match # the configuration. # -# @example EnforcedStyle: no_empty_lines (default) -# # good -# -# module Foo -# def bar -# # ... -# end -# end # @example EnforcedStyle: empty_lines # # good # @@ -10975,6 +10967,14 @@ RuboCop::Cop::Layout::EmptyLinesAroundMethodBody::KIND = T.let(T.unsafe(nil), St # def bar; end # # end +# @example EnforcedStyle: no_empty_lines (default) +# # good +# +# module Foo +# def bar +# # ... +# end +# end # # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_module_body.rb#47 class RuboCop::Cop::Layout::EmptyLinesAroundModuleBody < ::RuboCop::Cop::Base @@ -11025,37 +11025,37 @@ RuboCop::Cop::Layout::EmptyLinesAroundModuleBody::KIND = T.let(T.unsafe(nil), St # variable = # if true # end -# @example EnforcedStyleAlignWith: variable +# @example EnforcedStyleAlignWith: start_of_line # # bad # # variable = if true # end # +# puts(if true +# end) +# # # good # # variable = if true # end # +# puts(if true +# end) +# # variable = # if true # end -# @example EnforcedStyleAlignWith: start_of_line +# @example EnforcedStyleAlignWith: variable # # bad # # variable = if true # end # -# puts(if true -# end) -# # # good # # variable = if true # end # -# puts(if true -# end) -# # variable = # if true # end @@ -11121,17 +11121,15 @@ end # Checks for Windows-style line endings in the source code. # -# @example EnforcedStyle: native (default) -# # The `native` style means that CR+LF (Carriage Return + Line Feed) is -# # enforced on Windows, and LF is enforced on other platforms. +# @example EnforcedStyle: crlf +# # The `crlf` style means that CR+LF (Carriage Return + Line Feed) is +# # enforced on all platforms. # # # bad -# puts 'Hello' # Return character is LF on Windows. -# puts 'Hello' # Return character is CR+LF on other than Windows. +# puts 'Hello' # Return character is LF on all platforms. # # # good -# puts 'Hello' # Return character is CR+LF on Windows. -# puts 'Hello' # Return character is LF on other than Windows. +# puts 'Hello' # Return character is CR+LF on all platforms. # @example EnforcedStyle: lf # # The `lf` style means that LF (Line Feed) is enforced on # # all platforms. @@ -11141,15 +11139,17 @@ end # # # good # puts 'Hello' # Return character is LF on all platforms. -# @example EnforcedStyle: crlf -# # The `crlf` style means that CR+LF (Carriage Return + Line Feed) is -# # enforced on all platforms. +# @example EnforcedStyle: native (default) +# # The `native` style means that CR+LF (Carriage Return + Line Feed) is +# # enforced on Windows, and LF is enforced on other platforms. # # # bad -# puts 'Hello' # Return character is LF on all platforms. +# puts 'Hello' # Return character is LF on Windows. +# puts 'Hello' # Return character is CR+LF on other than Windows. # # # good -# puts 'Hello' # Return character is CR+LF on all platforms. +# puts 'Hello' # Return character is CR+LF on Windows. +# puts 'Hello' # Return character is LF on other than Windows. # # source://rubocop//lib/rubocop/cop/layout/end_of_line.rb#40 class RuboCop::Cop::Layout::EndOfLine < ::RuboCop::Cop::Base @@ -11314,10 +11314,9 @@ RuboCop::Cop::Layout::ExtraSpacing::MSG_UNNECESSARY = T.let(T.unsafe(nil), Strin # some_method nested_call( # nested_first_param), # second_param -# @example EnforcedStyle: special_for_inner_method_call_in_parentheses (default) -# # Same as `special_for_inner_method_call` except that the special rule -# # only applies if the outer method call encloses its arguments in -# # parentheses. +# @example EnforcedStyle: consistent +# # The first argument should always be indented one step more than the +# # preceding line. # # # good # some_method( @@ -11340,9 +11339,9 @@ RuboCop::Cop::Layout::ExtraSpacing::MSG_UNNECESSARY = T.let(T.unsafe(nil), Strin # some_method nested_call( # nested_first_param), # second_param -# @example EnforcedStyle: consistent -# # The first argument should always be indented one step more than the -# # preceding line. +# @example EnforcedStyle: consistent_relative_to_receiver +# # The first argument should always be indented one level relative to +# # the parent that is receiving the argument # # # good # some_method( @@ -11364,10 +11363,12 @@ RuboCop::Cop::Layout::ExtraSpacing::MSG_UNNECESSARY = T.let(T.unsafe(nil), Strin # # some_method nested_call( # nested_first_param), -# second_param -# @example EnforcedStyle: consistent_relative_to_receiver -# # The first argument should always be indented one level relative to -# # the parent that is receiving the argument +# second_params +# @example EnforcedStyle: special_for_inner_method_call +# # The first argument should normally be indented one step more than +# # the preceding line, but if it's an argument for a method call that +# # is itself an argument in a method call, then the inner argument +# # should be indented relative to the inner method. # # # good # some_method( @@ -11389,12 +11390,11 @@ RuboCop::Cop::Layout::ExtraSpacing::MSG_UNNECESSARY = T.let(T.unsafe(nil), Strin # # some_method nested_call( # nested_first_param), -# second_params -# @example EnforcedStyle: special_for_inner_method_call -# # The first argument should normally be indented one step more than -# # the preceding line, but if it's an argument for a method call that -# # is itself an argument in a method call, then the inner argument -# # should be indented relative to the inner method. +# second_param +# @example EnforcedStyle: special_for_inner_method_call_in_parentheses (default) +# # Same as `special_for_inner_method_call` except that the special rule +# # only applies if the outer method call encloses its arguments in +# # parentheses. # # # good # some_method( @@ -11518,27 +11518,19 @@ RuboCop::Cop::Layout::FirstArgumentIndentation::MSG = T.let(T.unsafe(nil), Strin # This default style is called 'special_inside_parentheses'. Alternative # styles are 'consistent' and 'align_brackets'. Here are examples: # -# @example EnforcedStyle: special_inside_parentheses (default) -# # The `special_inside_parentheses` style enforces that the first -# # element in an array literal where the opening bracket and first -# # element are on separate lines is indented one step (two spaces) more -# # than the position inside the opening parenthesis. +# @example EnforcedStyle: align_brackets +# # The `align_brackets` style enforces that the opening and closing +# # brackets are indented to the same position. # # # bad -# array = [ -# :value +# and_now_for_something = [ +# :completely_different # ] -# and_in_a_method_call([ -# :no_difference -# ]) # # # good -# array = [ -# :value +# and_now_for_something = [ +# :completely_different # ] -# but_in_a_method_call([ -# :its_like_this -# ]) # @example EnforcedStyle: consistent # # The `consistent` style enforces that the first element in an array # # literal where the opening bracket and the first element are on @@ -11560,19 +11552,27 @@ RuboCop::Cop::Layout::FirstArgumentIndentation::MSG = T.let(T.unsafe(nil), Strin # and_in_a_method_call([ # :no_difference # ]) -# @example EnforcedStyle: align_brackets -# # The `align_brackets` style enforces that the opening and closing -# # brackets are indented to the same position. +# @example EnforcedStyle: special_inside_parentheses (default) +# # The `special_inside_parentheses` style enforces that the first +# # element in an array literal where the opening bracket and first +# # element are on separate lines is indented one step (two spaces) more +# # than the position inside the opening parenthesis. # # # bad -# and_now_for_something = [ -# :completely_different +# array = [ +# :value # ] +# and_in_a_method_call([ +# :no_difference +# ]) # # # good -# and_now_for_something = [ -# :completely_different +# array = [ +# :value # ] +# but_in_a_method_call([ +# :its_like_this +# ]) # # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#82 class RuboCop::Cop::Layout::FirstArrayElementIndentation < ::RuboCop::Cop::Base @@ -11699,19 +11699,14 @@ RuboCop::Cop::Layout::FirstArrayElementLineBreak::MSG = T.let(T.unsafe(nil), Str # This default style is called 'special_inside_parentheses'. Alternative # styles are 'consistent' and 'align_braces'. Here are examples: # -# @example EnforcedStyle: special_inside_parentheses (default) -# # The `special_inside_parentheses` style enforces that the first key -# # in a hash literal where the opening brace and the first key are on -# # separate lines is indented one step (two spaces) more than the -# # position inside the opening parentheses. +# @example EnforcedStyle: align_braces +# # The `align_brackets` style enforces that the opening and closing +# # braces are indented to the same position. # # # bad -# hash = { -# key: :value +# and_now_for_something = { +# completely: :different # } -# and_in_a_method_call({ -# no: :difference -# }) # takes_multi_pairs_hash(x: { # a: 1, # b: 2 @@ -11722,13 +11717,9 @@ RuboCop::Cop::Layout::FirstArrayElementLineBreak::MSG = T.let(T.unsafe(nil), Str # }) # # # good -# special_inside_parentheses -# hash = { -# key: :value +# and_now_for_something = { +# completely: :different # } -# but_in_a_method_call({ -# its_like: :this -# }) # takes_multi_pairs_hash(x: { # a: 1, # b: 2 @@ -11758,14 +11749,19 @@ RuboCop::Cop::Layout::FirstArrayElementLineBreak::MSG = T.let(T.unsafe(nil), Str # and_in_a_method_call({ # no: :difference # }) -# @example EnforcedStyle: align_braces -# # The `align_brackets` style enforces that the opening and closing -# # braces are indented to the same position. +# @example EnforcedStyle: special_inside_parentheses (default) +# # The `special_inside_parentheses` style enforces that the first key +# # in a hash literal where the opening brace and the first key are on +# # separate lines is indented one step (two spaces) more than the +# # position inside the opening parentheses. # # # bad -# and_now_for_something = { -# completely: :different +# hash = { +# key: :value # } +# and_in_a_method_call({ +# no: :difference +# }) # takes_multi_pairs_hash(x: { # a: 1, # b: 2 @@ -11776,9 +11772,13 @@ RuboCop::Cop::Layout::FirstArrayElementLineBreak::MSG = T.let(T.unsafe(nil), Str # }) # # # good -# and_now_for_something = { -# completely: :different +# special_inside_parentheses +# hash = { +# key: :value # } +# but_in_a_method_call({ +# its_like: :this +# }) # takes_multi_pairs_hash(x: { # a: 1, # b: 2 @@ -12078,9 +12078,9 @@ RuboCop::Cop::Layout::FirstMethodParameterLineBreak::MSG = T.let(T.unsafe(nil), # second_param) # 123 # end -# @example EnforcedStyle: consistent (default) +# @example EnforcedStyle: align_parentheses # # The first parameter should always be indented one step more than the -# # preceding line. +# # opening parenthesis. # # # good # def some_method( @@ -12088,9 +12088,9 @@ RuboCop::Cop::Layout::FirstMethodParameterLineBreak::MSG = T.let(T.unsafe(nil), # second_param) # 123 # end -# @example EnforcedStyle: align_parentheses +# @example EnforcedStyle: consistent (default) # # The first parameter should always be indented one step more than the -# # opening parenthesis. +# # preceding line. # # # good # def some_method( @@ -12153,84 +12153,100 @@ RuboCop::Cop::Layout::FirstParameterIndentation::MSG = T.let(T.unsafe(nil), Stri # Alternatively you can specify multiple allowed styles. That's done by # passing a list of styles to EnforcedHashRocketStyle and EnforcedColonStyle. # -# @example EnforcedLastArgumentHashStyle: ignore_explicit -# # Ignore only explicit hashes. -# -# # bad -# do_something(foo: 1, -# bar: 2) -# -# # good -# do_something({foo: 1, -# bar: 2}) -# @example EnforcedHashRocketStyle: separator +# @example EnforcedColonStyle: key (default) # # bad # { -# :foo => bar, -# :ba => baz +# foo: bar, +# ba: baz # } # { -# :foo => bar, -# :ba => baz +# foo: bar, +# ba: baz # } # # # good # { -# :foo => bar, -# :ba => baz +# foo: bar, +# ba: baz # } -# @example EnforcedHashRocketStyle: table +# @example EnforcedColonStyle: separator # # bad # { -# :foo => bar, -# :ba => baz +# foo: bar, +# ba: baz # } # # # good # { -# :foo => bar, -# :ba => baz +# foo: bar, +# ba: baz # } -# @example EnforcedColonStyle: key (default) +# @example EnforcedColonStyle: table # # bad # { # foo: bar, # ba: baz # } +# +# # good # { # foo: bar, # ba: baz # } +# @example EnforcedHashRocketStyle: key (default) +# # bad +# { +# :foo => bar, +# :ba => baz +# } +# { +# :foo => bar, +# :ba => baz +# } # # # good # { -# foo: bar, -# ba: baz +# :foo => bar, +# :ba => baz # } -# @example EnforcedColonStyle: separator +# @example EnforcedHashRocketStyle: separator # # bad # { -# foo: bar, -# ba: baz +# :foo => bar, +# :ba => baz +# } +# { +# :foo => bar, +# :ba => baz # } # # # good # { -# foo: bar, -# ba: baz +# :foo => bar, +# :ba => baz # } -# @example EnforcedColonStyle: table +# @example EnforcedHashRocketStyle: table # # bad # { -# foo: bar, -# ba: baz +# :foo => bar, +# :ba => baz # } # # # good # { -# foo: bar, -# ba: baz +# :foo => bar, +# :ba => baz # } +# @example EnforcedLastArgumentHashStyle: always_ignore +# # Ignore both implicit and explicit hashes. +# +# # good +# do_something(foo: 1, +# bar: 2) +# +# # good +# do_something({foo: 1, +# bar: 2}) # @example EnforcedLastArgumentHashStyle: always_inspect (default) # # Inspect both implicit and explicit hashes. # @@ -12261,10 +12277,10 @@ RuboCop::Cop::Layout::FirstParameterIndentation::MSG = T.let(T.unsafe(nil), Stri # foo: 1, # bar: 2 # }) -# @example EnforcedLastArgumentHashStyle: always_ignore -# # Ignore both implicit and explicit hashes. +# @example EnforcedLastArgumentHashStyle: ignore_explicit +# # Ignore only explicit hashes. # -# # good +# # bad # do_something(foo: 1, # bar: 2) # @@ -12281,22 +12297,6 @@ RuboCop::Cop::Layout::FirstParameterIndentation::MSG = T.let(T.unsafe(nil), Stri # # good # do_something(foo: 1, # bar: 2) -# @example EnforcedHashRocketStyle: key (default) -# # bad -# { -# :foo => bar, -# :ba => baz -# } -# { -# :foo => bar, -# :ba => baz -# } -# -# # good -# { -# :foo => bar, -# :ba => baz -# } # # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#178 class RuboCop::Cop::Layout::HashAlignment < ::RuboCop::Cop::Base @@ -12729,7 +12729,7 @@ RuboCop::Cop::Layout::HeredocIndentation::WIDTH_MSG = T.let(T.unsafe(nil), Strin # Other than that, both styles mean that entities on the same logical # depth shall have the same indentation. # -# @example EnforcedStyle: normal (default) +# @example EnforcedStyle: indented_internal_methods # # bad # class A # def test @@ -12781,7 +12781,7 @@ RuboCop::Cop::Layout::HeredocIndentation::WIDTH_MSG = T.let(T.unsafe(nil), Strin # def bar # end # end -# @example EnforcedStyle: indented_internal_methods +# @example EnforcedStyle: normal (default) # # bad # class A # def test @@ -12952,38 +12952,38 @@ RuboCop::Cop::Layout::IndentationStyle::MSG = T.let(T.unsafe(nil), String) # # See also the `Layout/IndentationConsistency` cop which is the companion to this one. # -# @example Width: 2 (default) +# @example AllowedPatterns: ['^\s*module'] # # bad -# class A +# module A +# class B # def test # puts 'hello' # end # end +# end # # # good -# class A +# module A +# class B # def test # puts 'hello' # end # end -# @example AllowedPatterns: ['^\s*module'] +# end +# @example Width: 2 (default) # # bad -# module A -# class B +# class A # def test # puts 'hello' # end # end -# end # # # good -# module A -# class B +# class A # def test # puts 'hello' # end # end -# end # # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#44 class RuboCop::Cop::Layout::IndentationWidth < ::RuboCop::Cop::Base @@ -13192,15 +13192,13 @@ RuboCop::Cop::Layout::InitialIndentation::MSG = T.let(T.unsafe(nil), String) # `#:nodoc`, `=begin`- and `=end` comments, "shebang" directives, # or rackup options. # -# @example AllowSteepAnnotation: true -# -# # good +# @example # -# [1, 2, 3].each_with_object([]) do |n, list| #$ Array[Integer] -# list << n -# end +# # bad +# #Some comment # -# name = 'John' #: String +# # good +# # Some comment # @example AllowDoxygenCommentStyle: false (default) # # # bad @@ -13265,13 +13263,15 @@ RuboCop::Cop::Layout::InitialIndentation::MSG = T.let(T.unsafe(nil), String) # end # # name = 'John' #: String -# @example -# -# # bad -# #Some comment +# @example AllowSteepAnnotation: true # # # good -# # Some comment +# +# [1, 2, 3].each_with_object([]) do |n, list| #$ Array[Integer] +# list << n +# end +# +# name = 'John' #: String # # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#101 class RuboCop::Cop::Layout::LeadingCommentSpace < ::RuboCop::Cop::Base @@ -13405,22 +13405,6 @@ RuboCop::Cop::Layout::LeadingEmptyLines::MSG = T.let(T.unsafe(nil), String) # trailing spaces instead of leading spaces (default) or leading spaces # instead of trailing spaces. # -# @example EnforcedStyle: trailing (default) -# # bad -# 'this text contains a lot of' \ -# ' spaces' -# -# # good -# 'this text contains a lot of ' \ -# 'spaces' -# -# # bad -# 'this text is too' \ -# ' long' -# -# # good -# 'this text is too ' \ -# 'long' # @example EnforcedStyle: leading # # bad # 'this text contains a lot of ' \ @@ -13437,6 +13421,22 @@ RuboCop::Cop::Layout::LeadingEmptyLines::MSG = T.let(T.unsafe(nil), String) # # good # 'this text is too' \ # ' long' +# @example EnforcedStyle: trailing (default) +# # bad +# 'this text contains a lot of' \ +# ' spaces' +# +# # good +# 'this text contains a lot of ' \ +# 'spaces' +# +# # bad +# 'this text is too' \ +# ' long' +# +# # good +# 'this text is too ' \ +# 'long' # # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#43 class RuboCop::Cop::Layout::LineContinuationLeadingSpace < ::RuboCop::Cop::Base @@ -13509,25 +13509,25 @@ RuboCop::Cop::Layout::LineContinuationLeadingSpace::TRAILING_STYLE_OFFENSE = T.l # Checks that the backslash of a line continuation is separated from # preceding text by exactly one space (default) or zero spaces. # -# @example EnforcedStyle: space (default) +# @example EnforcedStyle: no_space # # bad -# 'a'\ +# 'a' \ # 'b' \ # 'c' # # # good -# 'a' \ -# 'b' \ +# 'a'\ +# 'b'\ # 'c' -# @example EnforcedStyle: no_space +# @example EnforcedStyle: space (default) # # bad -# 'a' \ +# 'a'\ # 'b' \ # 'c' # # # good -# 'a'\ -# 'b'\ +# 'a' \ +# 'b' \ # 'c' # # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#30 @@ -13975,26 +13975,6 @@ RuboCop::Cop::Layout::LineLength::MSG = T.let(T.unsafe(nil), String) # The closing brace of a multi-line array literal must be on the same # line as the last element of the array. # -# @example EnforcedStyle: symmetrical (default) -# # bad -# [ :a, -# :b -# ] -# -# # bad -# [ -# :a, -# :b ] -# -# # good -# [ :a, -# :b ] -# -# # good -# [ -# :a, -# :b -# ] # @example EnforcedStyle: new_line # # bad # [ @@ -14035,6 +14015,26 @@ RuboCop::Cop::Layout::LineLength::MSG = T.let(T.unsafe(nil), String) # # good # [ :a, # :b ] +# @example EnforcedStyle: symmetrical (default) +# # bad +# [ :a, +# :b +# ] +# +# # bad +# [ +# :a, +# :b ] +# +# # good +# [ :a, +# :b ] +# +# # good +# [ +# :a, +# :b +# ] # # source://rubocop//lib/rubocop/cop/layout/multiline_array_brace_layout.rb#91 class RuboCop::Cop::Layout::MultilineArrayBraceLayout < ::RuboCop::Cop::Base @@ -14329,26 +14329,6 @@ RuboCop::Cop::Layout::MultilineBlockLayout::PIPE_SIZE = T.let(T.unsafe(nil), Int # The closing brace of a multi-line hash literal must be on the same # line as the last element of the hash. # -# @example EnforcedStyle: symmetrical (default) -# -# # bad -# { a: 1, -# b: 2 -# } -# # bad -# { -# a: 1, -# b: 2 } -# -# # good -# { a: 1, -# b: 2 } -# -# # good -# { -# a: 1, -# b: 2 -# } # @example EnforcedStyle: new_line # # bad # { @@ -14389,6 +14369,26 @@ RuboCop::Cop::Layout::MultilineBlockLayout::PIPE_SIZE = T.let(T.unsafe(nil), Int # # good # { a: 1, # b: 2 } +# @example EnforcedStyle: symmetrical (default) +# +# # bad +# { a: 1, +# b: 2 +# } +# # bad +# { +# a: 1, +# b: 2 } +# +# # good +# { a: 1, +# b: 2 } +# +# # good +# { +# a: 1, +# b: 2 +# } # # source://rubocop//lib/rubocop/cop/layout/multiline_hash_brace_layout.rb#91 class RuboCop::Cop::Layout::MultilineHashBraceLayout < ::RuboCop::Cop::Base @@ -14591,26 +14591,6 @@ RuboCop::Cop::Layout::MultilineMethodArgumentLineBreaks::MSG = T.let(T.unsafe(ni # The closing brace of a multi-line method call must be on the same # line as the last argument of the call. # -# @example EnforcedStyle: symmetrical (default) -# # bad -# foo(a, -# b -# ) -# -# # bad -# foo( -# a, -# b) -# -# # good -# foo(a, -# b) -# -# # good -# foo( -# a, -# b -# ) # @example EnforcedStyle: new_line # # bad # foo( @@ -14651,6 +14631,26 @@ RuboCop::Cop::Layout::MultilineMethodArgumentLineBreaks::MSG = T.let(T.unsafe(ni # # good # foo(a, # b) +# @example EnforcedStyle: symmetrical (default) +# # bad +# foo(a, +# b +# ) +# +# # bad +# foo( +# a, +# b) +# +# # good +# foo(a, +# b) +# +# # good +# foo( +# a, +# b +# ) # # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#91 class RuboCop::Cop::Layout::MultilineMethodCallBraceLayout < ::RuboCop::Cop::Base @@ -14855,30 +14855,6 @@ end # The closing brace of a multi-line method definition must be on the same # line as the last parameter of the definition. # -# @example EnforcedStyle: symmetrical (default) -# # bad -# def foo(a, -# b -# ) -# end -# -# # bad -# def foo( -# a, -# b) -# end -# -# # good -# def foo(a, -# b) -# end -# -# # good -# def foo( -# a, -# b -# ) -# end # @example EnforcedStyle: new_line # # bad # def foo( @@ -14927,6 +14903,30 @@ end # def foo(a, # b) # end +# @example EnforcedStyle: symmetrical (default) +# # bad +# def foo(a, +# b +# ) +# end +# +# # bad +# def foo( +# a, +# b) +# end +# +# # good +# def foo(a, +# b) +# end +# +# # good +# def foo( +# a, +# b +# ) +# end # # source://rubocop//lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb#103 class RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout < ::RuboCop::Cop::Base @@ -15705,24 +15705,24 @@ end # Checks that the equals signs in parameter default assignments # have or don't have surrounding space depending on configuration. # -# @example EnforcedStyle: space (default) +# @example EnforcedStyle: no_space # # bad -# def some_method(arg1=:default, arg2=nil, arg3=[]) +# def some_method(arg1 = :default, arg2 = nil, arg3 = []) # # do something... # end # # # good -# def some_method(arg1 = :default, arg2 = nil, arg3 = []) +# def some_method(arg1=:default, arg2=nil, arg3=[]) # # do something... # end -# @example EnforcedStyle: no_space +# @example EnforcedStyle: space (default) # # bad -# def some_method(arg1 = :default, arg2 = nil, arg3 = []) +# def some_method(arg1=:default, arg2=nil, arg3=[]) # # do something... # end # # # good -# def some_method(arg1=:default, arg2=nil, arg3=[]) +# def some_method(arg1 = :default, arg2 = nil, arg3 = []) # # do something... # end # @@ -16060,14 +16060,14 @@ RuboCop::Cop::Layout::SpaceAroundMethodCallOperator::SPACES_REGEXP = T.let(T.uns # total = 3 * 4 # "apple" + "juice" # my_number = 38 / 4 -# @example AllowForAlignment: true (default) -# # good +# @example AllowForAlignment: false +# # bad # { # 1 => 2, # 11 => 3 # } -# @example AllowForAlignment: false -# # bad +# @example AllowForAlignment: true (default) +# # good # { # 1 => 2, # 11 => 3 @@ -16249,38 +16249,38 @@ RuboCop::Cop::Layout::SpaceAroundOperators::IRREGULAR_METHODS = T.let(T.unsafe(n # Checks that block braces have or don't have a space before the opening # brace depending on configuration. # -# @example EnforcedStyle: space (default) +# @example EnforcedStyle: no_space # # bad -# foo.map{ |a| +# foo.map { |a| # a.bar.to_s # } # # # good -# foo.map { |a| +# foo.map{ |a| # a.bar.to_s # } -# @example EnforcedStyle: no_space +# @example EnforcedStyle: space (default) # # bad -# foo.map { |a| +# foo.map{ |a| # a.bar.to_s # } # # # good -# foo.map{ |a| +# foo.map { |a| # a.bar.to_s # } -# @example EnforcedStyleForEmptyBraces: space (default) -# # bad -# 7.times{} -# -# # good -# 7.times {} # @example EnforcedStyleForEmptyBraces: no_space # # bad # 7.times {} # # # good # 7.times{} +# @example EnforcedStyleForEmptyBraces: space (default) +# # bad +# 7.times{} +# +# # good +# 7.times {} # # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#44 class RuboCop::Cop::Layout::SpaceBeforeBlockBraces < ::RuboCop::Cop::Base @@ -16548,6 +16548,24 @@ RuboCop::Cop::Layout::SpaceInLambdaLiteral::MSG_REQUIRE_SPACE = T.let(T.unsafe(n # # Array pattern matching is handled in the same way. # +# @example EnforcedStyle: compact +# # The `compact` style normally requires a space inside +# # array brackets, with the exception that successive left +# # or right brackets are collapsed together in nested arrays. +# +# # bad +# array = [a, b, c, d] +# array = [ a, [ b, c ] ] +# array = [ +# [ a ], +# [ b, c ] +# ] +# +# # good +# array = [ a, b, c, d ] +# array = [ a, [ b, c ]] +# array = [[ a ], +# [ b, c ]] # @example EnforcedStyle: no_space (default) # # The `no_space` style enforces that array literals have # # no surrounding space. @@ -16570,24 +16588,6 @@ RuboCop::Cop::Layout::SpaceInLambdaLiteral::MSG_REQUIRE_SPACE = T.let(T.unsafe(n # # good # array = [ a, b, c, d ] # array = [ a, [ b, c ] ] -# @example EnforcedStyle: compact -# # The `compact` style normally requires a space inside -# # array brackets, with the exception that successive left -# # or right brackets are collapsed together in nested arrays. -# -# # bad -# array = [a, b, c, d] -# array = [ a, [ b, c ] ] -# array = [ -# [ a ], -# [ b, c ] -# ] -# -# # good -# array = [ a, b, c, d ] -# array = [ a, [ b, c ]] -# array = [[ a ], -# [ b, c ]] # @example EnforcedStyleForEmptyBrackets: no_space (default) # # The `no_space` EnforcedStyleForEmptyBrackets style enforces that # # empty array brackets do not contain spaces. @@ -16739,15 +16739,6 @@ RuboCop::Cop::Layout::SpaceInsideArrayPercentLiteral::MULTIPLE_SPACES_BETWEEN_IT # left brace has or doesn't have trailing space depending on # configuration. # -# @example EnforcedStyle: space (default) -# # The `space` style enforces that block braces have -# # surrounding space. -# -# # bad -# some_array.each {puts e} -# -# # good -# some_array.each { puts e } # @example EnforcedStyle: no_space # # The `no_space` style enforces that block braces don't # # have surrounding space. @@ -16757,6 +16748,15 @@ RuboCop::Cop::Layout::SpaceInsideArrayPercentLiteral::MULTIPLE_SPACES_BETWEEN_IT # # # good # some_array.each {puts e} +# @example EnforcedStyle: space (default) +# # The `space` style enforces that block braces have +# # surrounding space. +# +# # bad +# some_array.each {puts e} +# +# # good +# some_array.each { puts e } # @example EnforcedStyleForEmptyBraces: no_space (default) # # The `no_space` EnforcedStyleForEmptyBraces style enforces that # # block braces don't have a space in between when empty. @@ -16779,16 +16779,6 @@ RuboCop::Cop::Layout::SpaceInsideArrayPercentLiteral::MULTIPLE_SPACES_BETWEEN_IT # some_array.each { } # some_array.each { } # some_array.each { } -# @example SpaceBeforeBlockParameters: true (default) -# # The SpaceBeforeBlockParameters style set to `true` enforces that -# # there is a space between `{` and `|`. Overrides `EnforcedStyle` -# # if there is a conflict. -# -# # bad -# [1, 2, 3].each {|n| n * 2 } -# -# # good -# [1, 2, 3].each { |n| n * 2 } # @example SpaceBeforeBlockParameters: false # # The SpaceBeforeBlockParameters style set to `false` enforces that # # there is no space between `{` and `|`. Overrides `EnforcedStyle` @@ -16799,6 +16789,16 @@ RuboCop::Cop::Layout::SpaceInsideArrayPercentLiteral::MULTIPLE_SPACES_BETWEEN_IT # # # good # [1, 2, 3].each {|n| n * 2 } +# @example SpaceBeforeBlockParameters: true (default) +# # The SpaceBeforeBlockParameters style set to `true` enforces that +# # there is a space between `{` and `|`. Overrides `EnforcedStyle` +# # if there is a conflict. +# +# # bad +# [1, 2, 3].each {|n| n * 2 } +# +# # good +# [1, 2, 3].each { |n| n * 2 } # # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#79 class RuboCop::Cop::Layout::SpaceInsideBlockBraces < ::RuboCop::Cop::Base @@ -16883,17 +16883,18 @@ end # # Hash pattern matching is handled in the same way. # -# @example EnforcedStyle: space (default) -# # The `space` style enforces that hash literals have -# # surrounding space. +# @example EnforcedStyle: compact +# # The `compact` style normally requires a space inside +# # hash braces, with the exception that successive left +# # braces or right braces are collapsed together in nested hashes. # # # bad -# h = {a: 1, b: 2} -# foo = {{ a: 1 } => { b: { c: 2 }}} +# h = { a: { b: 2 } } +# foo = { { a: 1 } => { b: { c: 2 } } } # # # good -# h = { a: 1, b: 2 } -# foo = { { a: 1 } => { b: { c: 2 } } } +# h = { a: { b: 2 }} +# foo = {{ a: 1 } => { b: { c: 2 }}} # @example EnforcedStyle: no_space # # The `no_space` style enforces that hash literals have # # no surrounding space. @@ -16905,18 +16906,17 @@ end # # good # h = {a: 1, b: 2} # foo = {{a: 1} => {b: {c: 2}}} -# @example EnforcedStyle: compact -# # The `compact` style normally requires a space inside -# # hash braces, with the exception that successive left -# # braces or right braces are collapsed together in nested hashes. +# @example EnforcedStyle: space (default) +# # The `space` style enforces that hash literals have +# # surrounding space. # # # bad -# h = { a: { b: 2 } } -# foo = { { a: 1 } => { b: { c: 2 } } } +# h = {a: 1, b: 2} +# foo = {{ a: 1 } => { b: { c: 2 }}} # # # good -# h = { a: { b: 2 }} -# foo = {{ a: 1 } => { b: { c: 2 }}} +# h = { a: 1, b: 2 } +# foo = { { a: 1 } => { b: { c: 2 } } } # @example EnforcedStyleForEmptyBraces: no_space (default) # # The `no_space` EnforcedStyleForEmptyBraces style enforces that # # empty hash braces do not contain spaces. @@ -17010,6 +17010,26 @@ RuboCop::Cop::Layout::SpaceInsideHashLiteralBraces::MSG = T.let(T.unsafe(nil), S # Checks for spaces inside ordinary round parentheses. # +# @example EnforcedStyle: compact +# # The `compact` style enforces that parentheses have a space at the +# # beginning with the exception that successive parentheses are allowed. +# # Note: Empty parentheses should not have spaces. +# +# # bad +# f(3) +# g = (a + 3) +# y( ) +# g( f( x ) ) +# g( f( x( 3 ) ), 5 ) +# g( ( ( 3 + 5 ) * f) ** x, 5 ) +# +# # good +# f( 3 ) +# g = ( a + 3 ) +# y() +# g( f( x )) +# g( f( x( 3 )), 5 ) +# g((( 3 + 5 ) * f ) ** x, 5 ) # @example EnforcedStyle: no_space (default) # # The `no_space` style enforces that parentheses do not have spaces. # @@ -17036,26 +17056,6 @@ RuboCop::Cop::Layout::SpaceInsideHashLiteralBraces::MSG = T.let(T.unsafe(nil), S # f( 3 ) # g = ( a + 3 ) # y() -# @example EnforcedStyle: compact -# # The `compact` style enforces that parentheses have a space at the -# # beginning with the exception that successive parentheses are allowed. -# # Note: Empty parentheses should not have spaces. -# -# # bad -# f(3) -# g = (a + 3) -# y( ) -# g( f( x ) ) -# g( f( x( 3 ) ), 5 ) -# g( ( ( 3 + 5 ) * f) ** x, 5 ) -# -# # good -# f( 3 ) -# g = ( a + 3 ) -# y() -# g( f( x )) -# g( f( x( 3 )), 5 ) -# g((( 3 + 5 ) * f ) ** x, 5 ) # # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#57 class RuboCop::Cop::Layout::SpaceInsideParens < ::RuboCop::Cop::Base @@ -17350,12 +17350,12 @@ RuboCop::Cop::Layout::SpaceInsideStringInterpolation::MSG = T.let(T.unsafe(nil), # Looks for trailing blank lines and a final newline in the # source code. # -# @example EnforcedStyle: final_newline (default) -# # `final_newline` looks for one newline at the end of files. +# @example EnforcedStyle: final_blank_line +# # `final_blank_line` looks for one blank line followed by a new line +# # at the end of files. # # # bad # class Foo; end -# # # EOF # # # bad @@ -17363,13 +17363,14 @@ RuboCop::Cop::Layout::SpaceInsideStringInterpolation::MSG = T.let(T.unsafe(nil), # # # good # class Foo; end +# # # EOF -# @example EnforcedStyle: final_blank_line -# # `final_blank_line` looks for one blank line followed by a new line -# # at the end of files. +# @example EnforcedStyle: final_newline (default) +# # `final_newline` looks for one newline at the end of files. # # # bad # class Foo; end +# # # EOF # # # bad @@ -17377,7 +17378,6 @@ RuboCop::Cop::Layout::SpaceInsideStringInterpolation::MSG = T.let(T.unsafe(nil), # # # good # class Foo; end -# # # EOF # # source://rubocop//lib/rubocop/cop/layout/trailing_empty_lines.rb#40 @@ -17747,15 +17747,15 @@ RuboCop::Cop::Lint::AmbiguousAssignment::SIMPLE_ASSIGNMENT_TYPES = T.let(T.unsaf # # # good # expect { do_something }.to change { object.attribute } -# @example AllowedPatterns: [] (default) -# -# # bad -# expect { do_something }.to change { object.attribute } # @example AllowedPatterns: ['change'] # # # good # expect { do_something }.to change { object.attribute } # expect { do_something }.to not_change { object.attribute } +# @example AllowedPatterns: [] (default) +# +# # bad +# expect { do_something }.to change { object.attribute } # # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#52 class RuboCop::Cop::Lint::AmbiguousBlockAssociation < ::RuboCop::Cop::Base @@ -18149,13 +18149,13 @@ RuboCop::Cop::Lint::ArrayLiteralInRegexp::MSG_UNKNOWN = T.let(T.unsafe(nil), Str # if some_var == value # do_something # end -# @example AllowSafeAssignment: true (default) -# # good +# @example AllowSafeAssignment: false +# # bad # if (some_var = value) # do_something # end -# @example AllowSafeAssignment: false -# # bad +# @example AllowSafeAssignment: true (default) +# # good # if (some_var = value) # do_something # end @@ -18635,28 +18635,28 @@ RuboCop::Cop::Lint::ConstantReassignment::RESTRICT_ON_SEND = T.let(T.unsafe(nil) # # # good # ::User::Login -# @example Only: ['Login'] -# # Restrict this cop to only being concerned about certain constants +# @example Ignore: ['Login'] +# # Restrict this cop not being concerned about certain constants # # # bad -# Login +# User # # # good -# ::Login +# ::User::Login # # # good -# User::Login -# @example Ignore: ['Login'] -# # Restrict this cop not being concerned about certain constants +# Login +# @example Only: ['Login'] +# # Restrict this cop to only being concerned about certain constants # # # bad -# User +# Login # # # good -# ::User::Login +# ::Login # # # good -# Login +# User::Login # # source://rubocop//lib/rubocop/cop/lint/constant_resolution.rb#62 class RuboCop::Cop::Lint::ConstantResolution < ::RuboCop::Cop::Base @@ -19174,14 +19174,6 @@ RuboCop::Cop::Lint::DisjunctiveAssignmentInConstructor::MSG = T.let(T.unsafe(nil # rescue FooError, BarError # handle_error # end -# @example IgnoreLiteralBranches: true -# # good -# case size -# when "small" then 100 -# when "medium" then 250 -# when "large" then 1000 -# else 250 -# end # @example IgnoreConstantBranches: true # # good # case size @@ -19199,6 +19191,14 @@ RuboCop::Cop::Lint::DisjunctiveAssignmentInConstructor::MSG = T.let(T.unsafe(nil # else # do_foo # end +# @example IgnoreLiteralBranches: true +# # good +# case size +# when "small" then 100 +# when "medium" then 250 +# when "large" then 1000 +# else 250 +# end # # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#99 class RuboCop::Cop::Lint::DuplicateBranch < ::RuboCop::Cop::Base @@ -19980,22 +19980,22 @@ RuboCop::Cop::Lint::ElseLayout::MSG = T.let(T.unsafe(nil), String) # # # good # items.each { |item| puts item } -# @example AllowComments: true (default) -# # good +# @example AllowComments: false +# # bad # items.each do |item| # # TODO: implement later (inner comment) # end # # items.each { |item| } # TODO: implement later (inline comment) -# @example AllowComments: false -# # bad +# @example AllowComments: true (default) +# # good # items.each do |item| # # TODO: implement later (inner comment) # end # # items.each { |item| } # TODO: implement later (inline comment) -# @example AllowEmptyLambdas: true (default) -# # good +# @example AllowEmptyLambdas: false +# # bad # allow(subject).to receive(:callable).and_return(-> {}) # # placeholder = lambda do @@ -20005,8 +20005,8 @@ RuboCop::Cop::Lint::ElseLayout::MSG = T.let(T.unsafe(nil), String) # proc { } # # Proc.new { } -# @example AllowEmptyLambdas: false -# # bad +# @example AllowEmptyLambdas: true (default) +# # good # allow(subject).to receive(:callable).and_return(-> {}) # # placeholder = lambda do @@ -20171,15 +20171,15 @@ RuboCop::Cop::Lint::EmptyClass::METACLASS_MSG = T.let(T.unsafe(nil), String) # elsif other_condition # do_something_else # end -# @example AllowComments: true (default) -# # good +# @example AllowComments: false +# # bad # if condition # do_something # elsif other_condition # # noop # end -# @example AllowComments: false -# # bad +# @example AllowComments: true (default) +# # good # if condition # do_something # elsif other_condition @@ -20313,12 +20313,12 @@ RuboCop::Cop::Lint::EmptyExpression::MSG = T.let(T.unsafe(nil), String) # # # good # # File containing non commented source lines -# @example AllowComments: true (default) -# # good -# # File consisting only of comments # @example AllowComments: false # # bad # # File consisting only of comments +# @example AllowComments: true (default) +# # good +# # File consisting only of comments # # source://rubocop//lib/rubocop/cop/lint/empty_file.rb#23 class RuboCop::Cop::Lint::EmptyFile < ::RuboCop::Cop::Base @@ -20364,18 +20364,18 @@ RuboCop::Cop::Lint::EmptyFile::MSG = T.let(T.unsafe(nil), String) # in [a, b] # nil # end -# @example AllowComments: true (default) +# @example AllowComments: false # -# # good +# # bad # case condition # in [a] # do_something # in [a, b] # # noop # end -# @example AllowComments: false +# @example AllowComments: true (default) # -# # bad +# # good # case condition # in [a] # do_something @@ -20435,23 +20435,23 @@ RuboCop::Cop::Lint::EmptyInterpolation::MSG = T.let(T.unsafe(nil), String) # when bar # nil # end -# @example AllowComments: true (default) +# @example AllowComments: false # -# # good +# # bad # case condition # when foo # do_something # when bar -# # noop +# # do nothing # end -# @example AllowComments: false +# @example AllowComments: true (default) # -# # bad +# # good # case condition # when foo # do_something # when bar -# # do nothing +# # noop # end # # source://rubocop//lib/rubocop/cop/lint/empty_when.rb#45 @@ -21301,7 +21301,7 @@ RuboCop::Cop::Lint::IneffectiveAccessModifier::MSG = T.let(T.unsafe(nil), String # It is configurable to suggest using either `StandardError` (default) or # `RuntimeError` instead. # -# @example EnforcedStyle: standard_error (default) +# @example EnforcedStyle: runtime_error # # bad # # class C < Exception; end @@ -21310,10 +21310,10 @@ RuboCop::Cop::Lint::IneffectiveAccessModifier::MSG = T.let(T.unsafe(nil), String # # # good # -# class C < StandardError; end +# class C < RuntimeError; end # -# C = Class.new(StandardError) -# @example EnforcedStyle: runtime_error +# C = Class.new(RuntimeError) +# @example EnforcedStyle: standard_error (default) # # bad # # class C < Exception; end @@ -21322,9 +21322,9 @@ RuboCop::Cop::Lint::IneffectiveAccessModifier::MSG = T.let(T.unsafe(nil), String # # # good # -# class C < RuntimeError; end +# class C < StandardError; end # -# C = Class.new(RuntimeError) +# C = Class.new(StandardError) # # source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#40 class RuboCop::Cop::Lint::InheritException < ::RuboCop::Cop::Base @@ -22202,7 +22202,7 @@ RuboCop::Cop::Lint::MultipleComparison::SET_OPERATION_OPERATORS = T.let(T.unsafe # end # end # end -# @example AllowedMethods: [] (default) +# @example AllowedMethods: ['has_many'] # # bad # def do_something # has_many :articles do @@ -22210,7 +22210,7 @@ RuboCop::Cop::Lint::MultipleComparison::SET_OPERATION_OPERATORS = T.let(T.unsafe # end # end # end -# @example AllowedMethods: ['has_many'] +# @example AllowedMethods: [] (default) # # bad # def do_something # has_many :articles do @@ -22218,16 +22218,16 @@ RuboCop::Cop::Lint::MultipleComparison::SET_OPERATION_OPERATORS = T.let(T.unsafe # end # end # end -# @example AllowedPatterns: [] (default) -# # bad +# @example AllowedPatterns: ['baz'] +# # good # def foo(obj) # obj.do_baz do # def bar # end # end # end -# @example AllowedPatterns: ['baz'] -# # good +# @example AllowedPatterns: [] (default) +# # bad # def foo(obj) # obj.do_baz do # def bar @@ -22762,14 +22762,14 @@ RuboCop::Cop::Lint::NonLocalExitFromIterator::MSG = T.let(T.unsafe(nil), String) # # # good # 10.minutes.to_i -# @example AllowedPatterns: [] (default) -# -# # bad -# 10.minutes.to_i # @example AllowedPatterns: ['min*'] # # # good # 10.minutes.to_i +# @example AllowedPatterns: [] (default) +# +# # bad +# 10.minutes.to_i # @example IgnoredClasses: [Time, DateTime] (default) # # # good @@ -23963,14 +23963,14 @@ RuboCop::Cop::Lint::RedundantSafeNavigation::SNAKE_CASE = T.let(T.unsafe(nil), R # else # baz # end -# @example AllowPercentLiteralArrayArgument: true (default) -# -# # good -# do_something(*%w[foo bar baz]) # @example AllowPercentLiteralArrayArgument: false # # # bad # do_something(*%w[foo bar baz]) +# @example AllowPercentLiteralArrayArgument: true (default) +# +# # good +# do_something(*%w[foo bar baz]) # # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#71 class RuboCop::Cop::Lint::RedundantSplatExpansion < ::RuboCop::Cop::Base @@ -25545,71 +25545,71 @@ RuboCop::Cop::Lint::StructNewOverride::STRUCT_METHOD_NAMES = T.let(T.unsafe(nil) # rescue # handle_exception # end -# @example AllowComments: true (default) +# @example AllowComments: false # -# # good +# # bad # def some_method # do_something # rescue # # do nothing # end # -# # good +# # bad # begin # do_something # rescue # # do nothing # end -# @example AllowComments: false +# @example AllowComments: true (default) # -# # bad +# # good # def some_method # do_something # rescue # # do nothing # end # -# # bad +# # good # begin # do_something # rescue # # do nothing # end -# @example AllowNil: true (default) +# @example AllowNil: false # -# # good +# # bad # def some_method # do_something # rescue # nil # end # -# # good +# # bad # begin # do_something # rescue -# # do nothing +# nil # end # -# # good +# # bad # do_something rescue nil -# @example AllowNil: false +# @example AllowNil: true (default) # -# # bad +# # good # def some_method # do_something # rescue # nil # end # -# # bad +# # good # begin # do_something # rescue -# nil +# # do nothing # end # -# # bad +# # good # do_something rescue nil # # source://rubocop//lib/rubocop/cop/lint/suppressed_exception.rb#105 @@ -25716,21 +25716,6 @@ RuboCop::Cop::Lint::SuppressedExceptionInNumberConversion::MSG = T.let(T.unsafe( # :underscored_symbol # :'hyphenated-string' # :"string_#{interpolation}" -# @example EnforcedStyle: strict (default) -# -# # bad -# { -# 'a': 1, -# "b": 2, -# 'c-d': 3 -# } -# -# # good (don't quote keys that don't require quoting) -# { -# a: 1, -# b: 2, -# 'c-d': 3 -# } # @example EnforcedStyle: consistent # # # bad @@ -25750,6 +25735,21 @@ RuboCop::Cop::Lint::SuppressedExceptionInNumberConversion::MSG = T.let(T.unsafe( # a: 1, # b: 2 # } +# @example EnforcedStyle: strict (default) +# +# # bad +# { +# 'a': 1, +# "b": 2, +# 'c-d': 3 +# } +# +# # good (don't quote keys that don't require quoting) +# { +# a: 1, +# b: 2, +# 'c-d': 3 +# } # # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#68 class RuboCop::Cop::Lint::SymbolConversion < ::RuboCop::Cop::Base @@ -26688,12 +26688,6 @@ end # define_method(:foo) do |_bar| # puts :baz # end -# @example IgnoreEmptyBlocks: true (default) -# # good -# do_something { |unused| } -# @example IgnoreEmptyBlocks: false -# # bad -# do_something { |unused| } # @example AllowUnusedKeywordArguments: false (default) # # bad # do_something do |unused: 42| @@ -26704,6 +26698,12 @@ end # do_something do |unused: 42| # foo # end +# @example IgnoreEmptyBlocks: false +# # bad +# do_something { |unused| } +# @example IgnoreEmptyBlocks: true (default) +# # good +# do_something { |unused| } # # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#55 class RuboCop::Cop::Lint::UnusedBlockArgument < ::RuboCop::Cop::Base @@ -26779,14 +26779,15 @@ end # Checks for unused method arguments. # -# @example IgnoreNotImplementedMethods: false +# @example # # bad -# def do_something(unused) -# raise NotImplementedError +# def some_method(used, unused, _unused_but_allowed) +# puts used # end # -# def do_something_else(unused) -# fail "TODO" +# # good +# def some_method(used, _unused, _unused_but_allowed) +# puts used # end # @example AllowUnusedKeywordArguments: false (default) # # bad @@ -26798,19 +26799,17 @@ end # def do_something(used, unused: 42) # used # end -# @example IgnoreEmptyMethods: true (default) -# # good -# def do_something(unused) -# end # @example IgnoreEmptyMethods: false # # bad # def do_something(unused) # end -# @example IgnoreNotImplementedMethods: true (default) -# # with default value of `NotImplementedExceptions: ['NotImplementedError']` -# +# @example IgnoreEmptyMethods: true (default) # # good # def do_something(unused) +# end +# @example IgnoreNotImplementedMethods: false +# # bad +# def do_something(unused) # raise NotImplementedError # end # @@ -26824,15 +26823,16 @@ end # def do_something(unused) # raise AbstractMethodError # end -# @example -# # bad -# def some_method(used, unused, _unused_but_allowed) -# puts used -# end +# @example IgnoreNotImplementedMethods: true (default) +# # with default value of `NotImplementedExceptions: ['NotImplementedError']` # # # good -# def some_method(used, _unused, _unused_but_allowed) -# puts used +# def do_something(unused) +# raise NotImplementedError +# end +# +# def do_something_else(unused) +# fail "TODO" # end # # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#70 @@ -28213,8 +28213,8 @@ class RuboCop::Cop::MessageAnnotator # :DisplayStyleGuide [Boolean] Include styleguide and reference URLs # :ExtraDetails [Boolean] Include cop details # :DisplayCopNames [Boolean] Include cop name - # @param cop_name [String] for specific cop name # @param cop_config [Hash] configs for specific cop, from config#for_cop + # @param cop_name [String] for specific cop name # @param options [Hash, nil] optional # @return [MessageAnnotator] a new instance of MessageAnnotator # @@ -28877,13 +28877,11 @@ end # This cop also checks for the maximum number of optional parameters. # This can be configured using the `MaxOptionalParameters` config option. # -# @example Max: 3 -# # good -# def foo(a, b, c = 1) -# end -# @example Max: 2 -# # bad -# def foo(a, b, c = 1) +# @example CountKeywordArgs: false +# # don't count keyword args towards the maximum +# +# # good (assuming Max is 3) +# def foo(a, b, c, d: 1) # end # @example CountKeywordArgs: true (default) # # counts keyword args towards the maximum @@ -28895,20 +28893,22 @@ end # # good (assuming Max is 3) # def foo(a, b, c: 1) # end -# @example CountKeywordArgs: false -# # don't count keyword args towards the maximum -# -# # good (assuming Max is 3) -# def foo(a, b, c, d: 1) +# @example Max: 2 +# # bad +# def foo(a, b, c = 1) # end -# @example MaxOptionalParameters: 3 (default) +# @example Max: 3 # # good -# def foo(a = 1, b = 2, c = 3) +# def foo(a, b, c = 1) # end # @example MaxOptionalParameters: 2 # # bad # def foo(a = 1, b = 2, c = 3) # end +# @example MaxOptionalParameters: 3 (default) +# # good +# def foo(a = 1, b = 2, c = 3) +# end # # source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#70 class RuboCop::Cop::Metrics::ParameterLists < ::RuboCop::Cop::Base @@ -29903,14 +29903,14 @@ RuboCop::Cop::Naming::AccessorMethodName::MSG_WRITER = T.let(T.unsafe(nil), Stri # # # good # params[:width_gteq] -# @example AsciiConstants: true (default) -# # bad +# @example AsciiConstants: false +# # good # class Foö # end # # FOÖ = "foo" -# @example AsciiConstants: false -# # good +# @example AsciiConstants: true (default) +# # bad # class Foö # end # @@ -30379,16 +30379,6 @@ RuboCop::Cop::Naming::FileName::SNAKE_CASE = T.let(T.unsafe(nil), Regexp) # Checks that your heredocs are using the configured case. # By default it is configured to enforce uppercase heredocs. # -# @example EnforcedStyle: uppercase (default) -# # bad -# <<-sql -# SELECT * FROM foo -# sql -# -# # good -# <<-SQL -# SELECT * FROM foo -# SQL # @example EnforcedStyle: lowercase # # bad # <<-SQL @@ -30399,6 +30389,16 @@ RuboCop::Cop::Naming::FileName::SNAKE_CASE = T.let(T.unsafe(nil), Regexp) # <<-sql # SELECT * FROM foo # sql +# @example EnforcedStyle: uppercase (default) +# # bad +# <<-sql +# SELECT * FROM foo +# sql +# +# # good +# <<-SQL +# SELECT * FROM foo +# SQL # # source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_case.rb#30 class RuboCop::Cop::Naming::HeredocDelimiterCase < ::RuboCop::Cop::Base @@ -30492,14 +30492,14 @@ RuboCop::Cop::Naming::HeredocDelimiterNaming::MSG = T.let(T.unsafe(nil), String) # The cop supports autocorrection when there is only one suggestion. When there are multiple # suggestions, the best suggestion cannot be identified and will not be autocorrected. # -# @example FlaggedTerms: { whitelist: { Suggestions: ['allowlist'] } } -# # Suggest replacing identifier whitelist with allowlist +# @example FlaggedTerms: { master: { AllowedRegex: 'master\'?s degree' } } +# # Specify allowed uses of the flagged term as a string or regexp. # # # bad -# whitelist_users = %w(user1 user1) +# # They had a masters # # # good -# allowlist_users = %w(user1 user2) +# # They had a master's degree # @example FlaggedTerms: { master: { Suggestions: ['main', 'primary', 'leader'] } } # # Suggest replacing master in an instance variable name with main, primary, or leader # @@ -30508,6 +30508,14 @@ RuboCop::Cop::Naming::HeredocDelimiterNaming::MSG = T.let(T.unsafe(nil), String) # # # good # @primary_node = 'node1.example.com' +# @example FlaggedTerms: { slave: { WholeWord: true } } +# # Specify that only terms that are full matches will be flagged. +# +# # bad +# Slave +# +# # good (won't be flagged despite containing `slave`) +# TeslaVehicle # @example FlaggedTerms: { whitelist: { Regex: !ruby/regexp '/white[-_\s]?list' } } # # Identify problematic terms using a Regexp # @@ -30516,22 +30524,14 @@ RuboCop::Cop::Naming::HeredocDelimiterNaming::MSG = T.let(T.unsafe(nil), String) # # # good # allow_list = %w(user1 user2) -# @example FlaggedTerms: { master: { AllowedRegex: 'master\'?s degree' } } -# # Specify allowed uses of the flagged term as a string or regexp. +# @example FlaggedTerms: { whitelist: { Suggestions: ['allowlist'] } } +# # Suggest replacing identifier whitelist with allowlist # # # bad -# # They had a masters +# whitelist_users = %w(user1 user1) # # # good -# # They had a master's degree -# @example FlaggedTerms: { slave: { WholeWord: true } } -# # Specify that only terms that are full matches will be flagged. -# -# # bad -# Slave -# -# # good (won't be flagged despite containing `slave`) -# TeslaVehicle +# allowlist_users = %w(user1 user2) # # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#74 class RuboCop::Cop::Naming::InclusiveLanguage < ::RuboCop::Cop::Base @@ -30687,6 +30687,42 @@ end # convention that is used to implicitly indicate that an ivar should not # be set or referenced outside of the memoization method. # +# @example EnforcedStyleForLeadingUnderscores :optional +# # bad +# def foo +# @something ||= calculate_expensive_thing +# end +# +# # good +# def foo +# @foo ||= calculate_expensive_thing +# end +# +# # good +# def foo +# @_foo ||= calculate_expensive_thing +# end +# +# # good +# def _foo +# @_foo ||= calculate_expensive_thing +# end +# +# # good +# def foo +# return @_foo if defined?(@_foo) +# @_foo = calculate_expensive_thing +# end +# +# # good +# define_method(:foo) do +# @foo ||= calculate_expensive_thing +# end +# +# # good +# define_method(:foo) do +# @_foo ||= calculate_expensive_thing +# end # @example EnforcedStyleForLeadingUnderscores: disallowed (default) # # bad # # Method foo is memoized using an instance variable that is @@ -30774,42 +30810,6 @@ end # return @_foo if defined?(@_foo) # @_foo = calculate_expensive_thing # end -# @example EnforcedStyleForLeadingUnderscores :optional -# # bad -# def foo -# @something ||= calculate_expensive_thing -# end -# -# # good -# def foo -# @foo ||= calculate_expensive_thing -# end -# -# # good -# def foo -# @_foo ||= calculate_expensive_thing -# end -# -# # good -# def _foo -# @_foo ||= calculate_expensive_thing -# end -# -# # good -# def foo -# return @_foo if defined?(@_foo) -# @_foo = calculate_expensive_thing -# end -# -# # good -# define_method(:foo) do -# @foo ||= calculate_expensive_thing -# end -# -# # good -# define_method(:foo) do -# @_foo ||= calculate_expensive_thing -# end # # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#148 class RuboCop::Cop::Naming::MemoizedInstanceVariableName < ::RuboCop::Cop::Base @@ -30894,46 +30894,46 @@ RuboCop::Cop::Naming::MemoizedInstanceVariableName::UNDERSCORE_REQUIRED = T.let( # - '_gen1\z' # ---- # -# @example EnforcedStyle: snake_case (default) +# @example EnforcedStyle: camelCase # # bad -# def fooBar; end +# def foo_bar; end # # # good -# def foo_bar; end +# def fooBar; end # # # bad -# define_method :fooBar do +# define_method :foo_bar do # end # # # good -# define_method :foo_bar do +# define_method :fooBar do # end # # # bad -# Struct.new(:fooBar) +# Struct.new(:foo_bar) # # # good -# Struct.new(:foo_bar) -# @example EnforcedStyle: camelCase +# Struct.new(:fooBar) +# @example EnforcedStyle: snake_case (default) # # bad -# def foo_bar; end +# def fooBar; end # # # good -# def fooBar; end +# def foo_bar; end # # # bad -# define_method :foo_bar do +# define_method :fooBar do # end # # # good -# define_method :fooBar do +# define_method :foo_bar do # end # # # bad -# Struct.new(:foo_bar) +# Struct.new(:fooBar) # # # good -# Struct.new(:fooBar) +# Struct.new(:foo_bar) # @example ForbiddenIdentifiers: ['def', 'super'] # # bad # def def; end @@ -31092,6 +31092,22 @@ end # The cop can furthermore be configured to allow all bang methods (method names # ending with `!`), with `AllowBangMethods: true` (default false). # +# @example AllowBangMethods: false (default) +# # bad +# def save! +# true +# end +# @example AllowBangMethods: true +# # good +# def save! +# true +# end +# @example Mode: aggressive +# # bad - the method returns nil in some cases +# def foo? +# return unless bar? +# true +# end # @example Mode: conservative (default) # # bad # def foo @@ -31163,22 +31179,6 @@ end # def foo # bar? # end -# @example Mode: aggressive -# # bad - the method returns nil in some cases -# def foo? -# return unless bar? -# true -# end -# @example AllowBangMethods: false (default) -# # bad -# def save! -# true -# end -# @example AllowBangMethods: true -# # good -# def save! -# true -# end # # source://rubocop//lib/rubocop/cop/naming/predicate_method.rb#128 class RuboCop::Cop::Naming::PredicateMethod < ::RuboCop::Cop::Base @@ -31303,34 +31303,54 @@ RuboCop::Cop::Naming::PredicateMethod::MSG_PREDICATE = T.let(T.unsafe(nil), Stri # offenses if the method has a Sorbet `sig` with a return type of # `T::Boolean`. Dynamic methods are not supported with this configuration. # +# @example AllowedMethods: ['is_a?'] (default) +# # Despite starting with the `is_` prefix, this method is allowed +# # good +# def is_a?(value) +# end +# @example AllowedMethods: ['is_even?'] +# # good +# def is_even?(value) +# end # @example MethodDefinitionMacros: ['def_node_matcher'] # # bad # def_node_matcher(:is_even) { |value| } # # # good # def_node_matcher(:even?) { |value| } -# @example NamePrefix: ['seems_to_be_'] +# @example MethodDefinitionMacros: ['define_method', 'define_singleton_method'] (default) # # bad -# def seems_to_be_even(value) +# define_method(:is_even) { |value| } +# +# # good +# define_method(:even?) { |value| } +# @example NamePrefix: ['is_', 'has_', 'have_'] (default) +# # bad +# def is_even(value) # end # -# # When ForbiddenPrefixes: ['seems_to_be_'] +# # When ForbiddenPrefixes: ['is_', 'has_', 'have_'] (default) # # good # def even?(value) # end # # # When ForbiddenPrefixes: [] # # good -# def seems_to_be_even?(value) +# def is_even?(value) # end -# @example AllowedMethods: ['is_a?'] (default) -# # Despite starting with the `is_` prefix, this method is allowed +# @example NamePrefix: ['seems_to_be_'] +# # bad +# def seems_to_be_even(value) +# end +# +# # When ForbiddenPrefixes: ['seems_to_be_'] # # good -# def is_a?(value) +# def even?(value) # end -# @example AllowedMethods: ['is_even?'] +# +# # When ForbiddenPrefixes: [] # # good -# def is_even?(value) +# def seems_to_be_even?(value) # end # @example UseSorbetSigs: false (default) # # bad @@ -31354,26 +31374,6 @@ RuboCop::Cop::Naming::PredicateMethod::MSG_PREDICATE = T.let(T.unsafe(nil), Stri # sig { returns(T::Boolean) } # def odd?(value) # end -# @example MethodDefinitionMacros: ['define_method', 'define_singleton_method'] (default) -# # bad -# define_method(:is_even) { |value| } -# -# # good -# define_method(:even?) { |value| } -# @example NamePrefix: ['is_', 'has_', 'have_'] (default) -# # bad -# def is_even(value) -# end -# -# # When ForbiddenPrefixes: ['is_', 'has_', 'have_'] (default) -# # good -# def even?(value) -# end -# -# # When ForbiddenPrefixes: [] -# # good -# def is_even?(value) -# end # # source://rubocop//lib/rubocop/cop/naming/predicate_prefix.rb#103 class RuboCop::Cop::Naming::PredicatePrefix < ::RuboCop::Cop::Base @@ -31544,24 +31544,24 @@ RuboCop::Cop::Naming::RescuedExceptionsVariableName::MSG = T.let(T.unsafe(nil), # # Method definitions and method calls are not affected by this cop. # -# @example EnforcedStyle: snake_case (default) -# # bad +# @example AllowedIdentifiers: ['fooBar'] +# # good (with EnforcedStyle: snake_case) # fooBar = 1 -# -# # good -# foo_bar = 1 +# @example AllowedPatterns: ['_v\d+\z'] +# # good (with EnforcedStyle: camelCase) +# release_v1 = true # @example EnforcedStyle: camelCase # # bad # foo_bar = 1 # # # good # fooBar = 1 -# @example AllowedIdentifiers: ['fooBar'] -# # good (with EnforcedStyle: snake_case) +# @example EnforcedStyle: snake_case (default) +# # bad # fooBar = 1 -# @example AllowedPatterns: ['_v\d+\z'] -# # good (with EnforcedStyle: camelCase) -# release_v1 = true +# +# # good +# foo_bar = 1 # @example ForbiddenIdentifiers: ['fooBar'] # # bad (in all cases) # fooBar = 1 @@ -31656,25 +31656,24 @@ RuboCop::Cop::Naming::VariableName::MSG_FORBIDDEN = T.let(T.unsafe(nil), String) # can be used to specify whether method names and symbols should be checked. # Both are enabled by default. # +# @example AllowedIdentifiers: [capture3] +# # good +# expect(Open3).to receive(:capture3) # @example AllowedPatterns: ['_v\d+\z'] # # good # :some_sym_v1 -# @example EnforcedStyle: snake_case +# @example CheckMethodNames: false +# # good +# def some_method_1; end +# @example CheckMethodNames: true (default) # # bad -# :some_sym1 -# variable1 = 1 -# -# def some_method1; end -# -# def some_method_1(arg1); end -# +# def some_method_1; end +# @example CheckSymbols: false # # good # :some_sym_1 -# variable_1 = 1 -# -# def some_method_1; end -# -# def some_method_1(arg_1); end +# @example CheckSymbols: true (default) +# # bad +# :some_sym_1 # @example EnforcedStyle: non_integer # # bad # :some_sym1 @@ -31705,21 +31704,6 @@ RuboCop::Cop::Naming::VariableName::MSG_FORBIDDEN = T.let(T.unsafe(nil), String) # def some_methodone(arg_one); end # # # In the following examples, we assume `EnforcedStyle: normalcase` (default). -# @example CheckMethodNames: true (default) -# # bad -# def some_method_1; end -# @example CheckMethodNames: false -# # good -# def some_method_1; end -# @example CheckSymbols: true (default) -# # bad -# :some_sym_1 -# @example CheckSymbols: false -# # good -# :some_sym_1 -# @example AllowedIdentifiers: [capture3] -# # good -# expect(Open3).to receive(:capture3) # @example EnforcedStyle: normalcase (default) # # bad # :some_sym_1 @@ -31736,6 +31720,22 @@ RuboCop::Cop::Naming::VariableName::MSG_FORBIDDEN = T.let(T.unsafe(nil), String) # def some_method1; end # # def some_method1(arg1); end +# @example EnforcedStyle: snake_case +# # bad +# :some_sym1 +# variable1 = 1 +# +# def some_method1; end +# +# def some_method_1(arg1); end +# +# # good +# :some_sym_1 +# variable_1 = 1 +# +# def some_method_1; end +# +# def some_method_1(arg_1); end # # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#103 class RuboCop::Cop::Naming::VariableNumber < ::RuboCop::Cop::Base @@ -32273,8 +32273,8 @@ module RuboCop::Cop::PercentArray # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#26 def allowed_bracket_array?(node); end - # @param node [RuboCop::AST::ArrayNode] # @param elements [Array] + # @param node [RuboCop::AST::ArrayNode] # @return [String] # # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#83 @@ -32685,7 +32685,6 @@ end # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#7 RuboCop::Cop::RangeHelp::BYTE_ORDER_MARK = T.let(T.unsafe(nil), Integer) -# source://rubocop//lib/rubocop/cop/mixin/range_help.rb#8 module RuboCop::Cop::RangeHelp::NOT_GIVEN; end # Common functionality for handling Rational literals. @@ -32798,14 +32797,14 @@ class RuboCop::Cop::Registry # Convert a user provided cop name into a properly namespaced name # - # @example gives back a correctly qualified cop name - # - # registry = RuboCop::Cop::Registry - # registry.qualified_cop_name('Layout/EndOfLine', '') # => 'Layout/EndOfLine' # @example fixes incorrect namespaces # # registry = RuboCop::Cop::Registry # registry.qualified_cop_name('Lint/EndOfLine', '') # => 'Layout/EndOfLine' + # @example gives back a correctly qualified cop name + # + # registry = RuboCop::Cop::Registry + # registry.qualified_cop_name('Layout/EndOfLine', '') # => 'Layout/EndOfLine' # @example namespaces bare cop identifiers # # registry = RuboCop::Cop::Registry @@ -33603,42 +33602,23 @@ module RuboCop::Cop::Style; end # private alias_method :qux, :foo # # end -# @example EnforcedStyle: inline -# # bad -# class Foo -# -# private -# -# def bar; end -# def baz; end -# -# end -# -# # good -# class Foo -# -# private def bar; end -# private def baz; end -# -# end -# @example AllowModifiersOnSymbols: true (default) +# @example AllowModifiersOnAliasMethod: true (default) # # good # class Foo # -# private :bar, :baz -# private *%i[qux quux] -# private *METHOD_NAMES -# private *private_methods +# public alias_method :bar, :foo +# protected alias_method :baz, :foo +# private alias_method :qux, :foo # # end -# @example AllowModifiersOnSymbols: false +# @example AllowModifiersOnAttrs: false # # bad # class Foo # -# private :bar, :baz -# private *%i[qux quux] -# private *METHOD_NAMES -# private *private_methods +# public attr_reader :bar +# protected attr_writer :baz +# private attr_accessor :qux +# private attr :quux # # end # @example AllowModifiersOnAttrs: true (default) @@ -33657,23 +33637,24 @@ module RuboCop::Cop::Style; end # def private_method; end # # end -# @example AllowModifiersOnAttrs: false +# @example AllowModifiersOnSymbols: false # # bad # class Foo # -# public attr_reader :bar -# protected attr_writer :baz -# private attr_accessor :qux -# private attr :quux +# private :bar, :baz +# private *%i[qux quux] +# private *METHOD_NAMES +# private *private_methods # # end -# @example AllowModifiersOnAliasMethod: true (default) +# @example AllowModifiersOnSymbols: true (default) # # good # class Foo # -# public alias_method :bar, :foo -# protected alias_method :baz, :foo -# private alias_method :qux, :foo +# private :bar, :baz +# private *%i[qux quux] +# private *METHOD_NAMES +# private *private_methods # # end # @example EnforcedStyle: group (default) @@ -33694,6 +33675,24 @@ module RuboCop::Cop::Style; end # def baz; end # # end +# @example EnforcedStyle: inline +# # bad +# class Foo +# +# private +# +# def bar; end +# def baz; end +# +# end +# +# # good +# class Foo +# +# private def bar; end +# private def baz; end +# +# end # # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#135 class RuboCop::Cop::Style::AccessModifierDeclarations < ::RuboCop::Cop::Base @@ -34096,7 +34095,10 @@ RuboCop::Cop::Style::AmbiguousEndlessMethodDefinition::MSG = T.let(T.unsafe(nil) # `||` instead. It can be configured to check only in conditions or in # all contexts. # -# @example EnforcedStyle: conditionals (default) +# @example EnforcedStyle: always +# # bad +# foo.save and return +# # # bad # if foo and bar # end @@ -34105,15 +34107,9 @@ RuboCop::Cop::Style::AmbiguousEndlessMethodDefinition::MSG = T.let(T.unsafe(nil) # foo.save && return # # # good -# foo.save and return -# -# # good # if foo && bar # end -# @example EnforcedStyle: always -# # bad -# foo.save and return -# +# @example EnforcedStyle: conditionals (default) # # bad # if foo and bar # end @@ -34122,6 +34118,9 @@ RuboCop::Cop::Style::AmbiguousEndlessMethodDefinition::MSG = T.let(T.unsafe(nil) # foo.save && return # # # good +# foo.save and return +# +# # good # if foo && bar # end # @@ -34237,39 +34236,25 @@ RuboCop::Cop::Style::AndOr::MSG = T.let(T.unsafe(nil), String) # ---- # ==== # -# @example RedundantBlockArgumentNames: ['blk', 'block', 'proc'] (default) -# # bad - But it is good with `EnforcedStyle: explicit` set for `Naming/BlockForwarding`. -# def foo(&block) -# bar(&block) +# @example +# # bad +# def foo(*args, &block) +# bar(*args, &block) # end # -# # good -# def foo(&) -# bar(&) -# end -# @example UseAnonymousForwarding: true (default, only relevant for Ruby >= 3.2) # # bad # def foo(*args, **kwargs, &block) -# args_only(*args) -# kwargs_only(**kwargs) -# block_only(&block) +# bar(*args, **kwargs, &block) # end # # # good -# def foo(*, **, &) -# args_only(*) -# kwargs_only(**) -# block_only(&) -# end -# @example UseAnonymousForwarding: false (only relevant for Ruby >= 3.2) -# # good -# def foo(*args, **kwargs, &block) -# args_only(*args) -# kwargs_only(**kwargs) -# block_only(&block) +# def foo(...) +# bar(...) # end -# @example AllowOnlyRestArgument: true (default, only relevant for Ruby < 3.2) -# # good +# @example AllowOnlyRestArgument: false (only relevant for Ruby < 3.2) +# # bad +# # The following code can replace the arguments with `...`, +# # but it will change the behavior. Because `...` forwards block also. # def foo(*args) # bar(*args) # end @@ -34277,10 +34262,8 @@ RuboCop::Cop::Style::AndOr::MSG = T.let(T.unsafe(nil), String) # def foo(**kwargs) # bar(**kwargs) # end -# @example AllowOnlyRestArgument: false (only relevant for Ruby < 3.2) -# # bad -# # The following code can replace the arguments with `...`, -# # but it will change the behavior. Because `...` forwards block also. +# @example AllowOnlyRestArgument: true (default, only relevant for Ruby < 3.2) +# # good # def foo(*args) # bar(*args) # end @@ -34288,15 +34271,15 @@ RuboCop::Cop::Style::AndOr::MSG = T.let(T.unsafe(nil), String) # def foo(**kwargs) # bar(**kwargs) # end -# @example RedundantRestArgumentNames: ['args', 'arguments'] (default) -# # bad -# def foo(*args) -# bar(*args) +# @example RedundantBlockArgumentNames: ['blk', 'block', 'proc'] (default) +# # bad - But it is good with `EnforcedStyle: explicit` set for `Naming/BlockForwarding`. +# def foo(&block) +# bar(&block) # end # # # good -# def foo(*) -# bar(*) +# def foo(&) +# bar(&) # end # @example RedundantKeywordRestArgumentNames: ['kwargs', 'options', 'opts'] (default) # # bad @@ -34308,20 +34291,36 @@ RuboCop::Cop::Style::AndOr::MSG = T.let(T.unsafe(nil), String) # def foo(**) # bar(**) # end -# @example +# @example RedundantRestArgumentNames: ['args', 'arguments'] (default) # # bad -# def foo(*args, &block) -# bar(*args, &block) +# def foo(*args) +# bar(*args) # end # +# # good +# def foo(*) +# bar(*) +# end +# @example UseAnonymousForwarding: false (only relevant for Ruby >= 3.2) +# # good +# def foo(*args, **kwargs, &block) +# args_only(*args) +# kwargs_only(**kwargs) +# block_only(&block) +# end +# @example UseAnonymousForwarding: true (default, only relevant for Ruby >= 3.2) # # bad # def foo(*args, **kwargs, &block) -# bar(*args, **kwargs, &block) +# args_only(*args) +# kwargs_only(**kwargs) +# block_only(&block) # end # # # good -# def foo(...) -# bar(...) +# def foo(*, **, &) +# args_only(*) +# kwargs_only(**) +# block_only(&) # end # # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#141 @@ -35234,6 +35233,16 @@ RuboCop::Cop::Style::BlockComments::MSG = T.let(T.unsafe(nil), String) # `lambda`, `proc`, and `it` are their defaults. # Additional methods can be added to the `AllowedMethods`. # +# @example AllowedMethods: ['lambda', 'proc', 'it' ] (default) +# +# # good +# foo = lambda do |x| +# puts "Hello, #{x}" +# end +# +# foo = lambda do |x| +# x * 100 +# end # @example AllowedPatterns: ['map'] # # # good @@ -35241,6 +35250,76 @@ RuboCop::Cop::Style::BlockComments::MSG = T.let(T.unsafe(nil), String) # something = thing.some_method # process(something) # } +# @example AllowedPatterns: [] (default) +# +# # bad +# things.map { |thing| +# something = thing.some_method +# process(something) +# } +# @example BracesRequiredMethods: ['sig'] +# +# # Methods listed in the BracesRequiredMethods list, such as 'sig' +# # in this example, will require `{...}` braces. This option takes +# # precedence over all other configurations except AllowedMethods. +# +# # bad +# sig do +# params( +# foo: string, +# ).void +# end +# def bar(foo) +# puts foo +# end +# +# # good +# sig { +# params( +# foo: string, +# ).void +# } +# def bar(foo) +# puts foo +# end +# @example EnforcedStyle: always_braces +# # bad +# words.each do |word| +# word.flip.flop +# end +# +# # good +# words.each { |word| +# word.flip.flop +# } +# @example EnforcedStyle: braces_for_chaining +# # bad +# words.each do |word| +# word.flip.flop +# end.join("-") +# +# # good +# words.each { |word| +# word.flip.flop +# }.join("-") +# @example EnforcedStyle: line_count_based (default) +# # bad - single line block +# items.each do |item| item / 5 end +# +# # good - single line block +# items.each { |item| item / 5 } +# +# # bad - multi-line block +# things.map { |thing| +# something = thing.some_method +# process(something) +# } +# +# # good - multi-line block +# things.map do |thing| +# something = thing.some_method +# process(something) +# end # @example EnforcedStyle: semantic # # Prefer `do...end` over `{...}` for procedural blocks. # @@ -35299,86 +35378,6 @@ RuboCop::Cop::Style::BlockComments::MSG = T.let(T.unsafe(nil), String) # # # also good # collection.each do |element| puts element end -# @example EnforcedStyle: braces_for_chaining -# # bad -# words.each do |word| -# word.flip.flop -# end.join("-") -# -# # good -# words.each { |word| -# word.flip.flop -# }.join("-") -# @example EnforcedStyle: always_braces -# # bad -# words.each do |word| -# word.flip.flop -# end -# -# # good -# words.each { |word| -# word.flip.flop -# } -# @example BracesRequiredMethods: ['sig'] -# -# # Methods listed in the BracesRequiredMethods list, such as 'sig' -# # in this example, will require `{...}` braces. This option takes -# # precedence over all other configurations except AllowedMethods. -# -# # bad -# sig do -# params( -# foo: string, -# ).void -# end -# def bar(foo) -# puts foo -# end -# -# # good -# sig { -# params( -# foo: string, -# ).void -# } -# def bar(foo) -# puts foo -# end -# @example AllowedMethods: ['lambda', 'proc', 'it' ] (default) -# -# # good -# foo = lambda do |x| -# puts "Hello, #{x}" -# end -# -# foo = lambda do |x| -# x * 100 -# end -# @example AllowedPatterns: [] (default) -# -# # bad -# things.map { |thing| -# something = thing.some_method -# process(something) -# } -# @example EnforcedStyle: line_count_based (default) -# # bad - single line block -# items.each do |item| item / 5 end -# -# # good - single line block -# items.each { |item| item / 5 } -# -# # bad - multi-line block -# things.map { |thing| -# something = thing.some_method -# process(something) -# } -# -# # good - multi-line block -# things.map do |thing| -# something = thing.some_method -# process(something) -# end # # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#168 class RuboCop::Cop::Style::BlockDelimiters < ::RuboCop::Cop::Base @@ -35850,6 +35849,11 @@ RuboCop::Cop::Style::CharacterLiteral::MSG = T.let(T.unsafe(nil), String) # # The compact style is only forced for classes/modules with one child. # +# @example EnforcedStyle: compact +# # good +# # combine definitions as much as possible +# class Foo::Bar +# end # @example EnforcedStyle: nested (default) # # good # # have each child on its own line @@ -35857,11 +35861,6 @@ RuboCop::Cop::Style::CharacterLiteral::MSG = T.let(T.unsafe(nil), String) # class Bar # end # end -# @example EnforcedStyle: compact -# # good -# # combine definitions as much as possible -# class Foo::Bar -# end # # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#45 class RuboCop::Cop::Style::ClassAndModuleChildren < ::RuboCop::Cop::Base @@ -36022,13 +36021,13 @@ RuboCop::Cop::Style::ClassCheck::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # def eql?(other) # self.class.eql?(other.class) && name.eql?(other.name) # end -# @example AllowedPatterns: [] (default) -# # bad +# @example AllowedPatterns: ['eq'] +# # good # def eq(other) # self.class.eq(other.class) && name.eq(other.name) # end -# @example AllowedPatterns: ['eq'] -# # good +# @example AllowedPatterns: [] (default) +# # bad # def eq(other) # self.class.eq(other.class) && name.eq(other.name) # end @@ -36737,6 +36736,18 @@ RuboCop::Cop::Style::CombinableLoops::MSG = T.let(T.unsafe(nil), String) # Enforces using `` or %x around command literals. # +# @example AllowInnerBackticks: false (default) +# # If `false`, the cop will always recommend using `%x` if one or more +# # backticks are found in the command string. +# +# # bad +# `echo \`ls\`` +# +# # good +# %x(echo `ls`) +# @example AllowInnerBackticks: true +# # good +# `echo \`ls\`` # @example EnforcedStyle: backticks (default) # # bad # folders = %x(find . -type d).split @@ -36791,18 +36802,6 @@ RuboCop::Cop::Style::CombinableLoops::MSG = T.let(T.unsafe(nil), String) # ln -s foo.example.yml foo.example # ln -s bar.example.yml bar.example # ) -# @example AllowInnerBackticks: false (default) -# # If `false`, the cop will always recommend using `%x` if one or more -# # backticks are found in the command string. -# -# # bad -# `echo \`ls\`` -# -# # good -# %x(echo `ls`) -# @example AllowInnerBackticks: true -# # good -# `echo \`ls\`` # # source://rubocop//lib/rubocop/cop/style/command_literal.rb#78 class RuboCop::Cop::Style::CommandLiteral < ::RuboCop::Cop::Base @@ -36887,48 +36886,48 @@ RuboCop::Cop::Style::CommandLiteral::MSG_USE_PERCENT_X = T.let(T.unsafe(nil), St # incorrect registering of keywords (eg. `review`) inside a paragraph as an # annotation. # -# @example RequireColon: true (default) +# @example RequireColon: false # # bad -# # TODO make better -# -# # good # # TODO: make better # -# # bad -# # TODO:make better -# # # good -# # TODO: make better +# # TODO make better # # # bad -# # fixme: does not work +# # fixme does not work # # # good -# # FIXME: does not work +# # FIXME does not work # # # bad # # Optimize does not work # # # good -# # OPTIMIZE: does not work -# @example RequireColon: false +# # OPTIMIZE does not work +# @example RequireColon: true (default) # # bad +# # TODO make better +# +# # good # # TODO: make better # +# # bad +# # TODO:make better +# # # good -# # TODO make better +# # TODO: make better # # # bad -# # fixme does not work +# # fixme: does not work # # # good -# # FIXME does not work +# # FIXME: does not work # # # bad # # Optimize does not work # # # good -# # OPTIMIZE does not work +# # OPTIMIZE: does not work # # source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#61 class RuboCop::Cop::Style::CommentAnnotation < ::RuboCop::Cop::Base @@ -37227,30 +37226,8 @@ RuboCop::Cop::Style::ConcatArrayLiterals::RESTRICT_ON_SEND = T.let(T.unsafe(nil) # both the assignment and comparison of the same variable # when using the return of the condition can be used instead. # -# @example EnforcedStyle: assign_to_condition (default) +# @example EnforcedStyle: assign_inside_condition # # bad -# if foo -# bar = 1 -# else -# bar = 2 -# end -# -# case foo -# when 'a' -# bar += 1 -# else -# bar += 2 -# end -# -# if foo -# some_method -# bar = 1 -# else -# some_other_method -# bar = 2 -# end -# -# # good # bar = if foo # 1 # else @@ -37271,30 +37248,30 @@ RuboCop::Cop::Style::ConcatArrayLiterals::RESTRICT_ON_SEND = T.let(T.unsafe(nil) # some_other_method # 2 # end -# @example EnforcedStyle: assign_inside_condition -# # bad -# bar = if foo -# 1 +# +# # good +# if foo +# bar = 1 # else -# 2 +# bar = 2 # end # -# bar += case foo +# case foo # when 'a' -# 1 +# bar += 1 # else -# 2 +# bar += 2 # end # -# bar << if foo +# if foo # some_method -# 1 +# bar = 1 # else # some_other_method -# 2 +# bar = 2 # end -# -# # good +# @example EnforcedStyle: assign_to_condition (default) +# # bad # if foo # bar = 1 # else @@ -37316,6 +37293,28 @@ RuboCop::Cop::Style::ConcatArrayLiterals::RESTRICT_ON_SEND = T.let(T.unsafe(nil) # bar = 2 # end # +# # good +# bar = if foo +# 1 +# else +# 2 +# end +# +# bar += case foo +# when 'a' +# 1 +# else +# 2 +# end +# +# bar << if foo +# some_method +# 1 +# else +# some_other_method +# 2 +# end +# # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#207 class RuboCop::Cop::Style::ConditionalAssignment < ::RuboCop::Cop::Base include ::RuboCop::Cop::Style::ConditionalAssignmentHelper @@ -38389,6 +38388,16 @@ RuboCop::Cop::Style::Documentation::MSG = T.let(T.unsafe(nil), String) # def foo.bar # puts baz # end +# @example AllowedMethods: ['method_missing', 'respond_to_missing?'] +# +# # good +# class Foo +# def method_missing(name, *args) +# end +# +# def respond_to_missing?(symbol, include_private) +# end +# end # @example RequireForNonPublicMethods: false (default) # # good # class Foo @@ -38430,16 +38439,6 @@ RuboCop::Cop::Style::Documentation::MSG = T.let(T.unsafe(nil), String) # def do_something # end # end -# @example AllowedMethods: ['method_missing', 'respond_to_missing?'] -# -# # good -# class Foo -# def method_missing(name, *args) -# end -# -# def respond_to_missing?(symbol, include_private) -# end -# end # # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#109 class RuboCop::Cop::Style::DocumentationMethod < ::RuboCop::Cop::Base @@ -38829,6 +38828,38 @@ RuboCop::Cop::Style::EmptyCaseCondition::NOT_SUPPORTED_PARENT_TYPES = T.let(T.un # Checks for empty else-clauses, possibly including comments and/or an # explicit `nil` depending on the EnforcedStyle. # +# @example AllowComments: false (default) +# +# # bad +# if condition +# statement +# else +# # something comment +# nil +# end +# +# # bad +# if condition +# statement +# else +# # something comment +# end +# @example AllowComments: true +# +# # good +# if condition +# statement +# else +# # something comment +# nil +# end +# +# # good +# if condition +# statement +# else +# # something comment +# end # @example EnforcedStyle: both (default) # # warn on empty else and else with nil in it # @@ -38910,38 +38941,6 @@ RuboCop::Cop::Style::EmptyCaseCondition::NOT_SUPPORTED_PARENT_TYPES = T.let(T.un # if condition # statement # end -# @example AllowComments: false (default) -# -# # bad -# if condition -# statement -# else -# # something comment -# nil -# end -# -# # bad -# if condition -# statement -# else -# # something comment -# end -# @example AllowComments: true -# -# # good -# if condition -# statement -# else -# # something comment -# nil -# end -# -# # good -# if condition -# statement -# else -# # something comment -# end # # source://rubocop//lib/rubocop/cop/style/empty_else.rb#127 class RuboCop::Cop::Style::EmptyElse < ::RuboCop::Cop::Base @@ -39283,30 +39282,30 @@ RuboCop::Cop::Style::EmptyMethod::MSG_EXPANDED = T.let(T.unsafe(nil), String) # While this cop would also apply to variables that are only going to be used as strings, # RuboCop can't detect that, so we only check inside of string interpolation. # -# @example EnforcedStyle: trailing_conditional (default) +# @example EnforcedStyle: ternary # # bad -# "#{condition ? 'foo' : ''}" +# "#{'foo' if condition}" # # # good -# "#{'foo' if condition}" +# "#{condition ? 'foo' : ''}" # # # bad -# "#{condition ? '' : 'foo'}" +# "#{'foo' unless condition}" # # # good -# "#{'foo' unless condition}" -# @example EnforcedStyle: ternary +# "#{condition ? '' : 'foo'}" +# @example EnforcedStyle: trailing_conditional (default) # # bad -# "#{'foo' if condition}" +# "#{condition ? 'foo' : ''}" # # # good -# "#{condition ? 'foo' : ''}" +# "#{'foo' if condition}" # # # bad -# "#{'foo' unless condition}" +# "#{condition ? '' : 'foo'}" # # # good -# "#{condition ? '' : 'foo'}" +# "#{'foo' unless condition}" # # source://rubocop//lib/rubocop/cop/style/empty_string_inside_interpolation.rb#40 class RuboCop::Cop::Style::EmptyStringInsideInterpolation < ::RuboCop::Cop::Base @@ -39424,12 +39423,7 @@ RuboCop::Cop::Style::EndBlock::MSG = T.let(T.unsafe(nil), String) # NOTE: Incorrect endless method definitions will always be # corrected to a multi-line definition. # -# @example EnforcedStyle: allow_single_line (default) -# # bad, multi-line endless method -# def my_method = x.foo -# .bar -# .baz -# +# @example EnforcedStyle: allow_always # # good # def my_method # x @@ -39439,12 +39433,22 @@ RuboCop::Cop::Style::EndBlock::MSG = T.let(T.unsafe(nil), String) # def my_method = x # # # good +# def my_method = x.foo +# .bar +# .baz +# +# # good # def my_method # x.foo # .bar # .baz # end -# @example EnforcedStyle: allow_always +# @example EnforcedStyle: allow_single_line (default) +# # bad, multi-line endless method +# def my_method = x.foo +# .bar +# .baz +# # # good # def my_method # x @@ -39454,11 +39458,6 @@ RuboCop::Cop::Style::EndBlock::MSG = T.let(T.unsafe(nil), String) # def my_method = x # # # good -# def my_method = x.foo -# .bar -# .baz -# -# # good # def my_method # x.foo # .bar @@ -39484,46 +39483,46 @@ RuboCop::Cop::Style::EndBlock::MSG = T.let(T.unsafe(nil), String) # .bar # .baz # end -# @example EnforcedStyle: require_single_line +# @example EnforcedStyle: require_always # # bad # def my_method # x # end # # # bad -# def my_method = x.foo +# def my_method +# x.foo # .bar # .baz +# end # # # good # def my_method = x # # # good -# def my_method -# x.foo +# def my_method = x.foo # .bar # .baz -# end -# @example EnforcedStyle: require_always +# @example EnforcedStyle: require_single_line # # bad # def my_method # x # end # # # bad -# def my_method -# x.foo +# def my_method = x.foo # .bar # .baz -# end # # # good # def my_method = x # # # good -# def my_method = x.foo +# def my_method +# x.foo # .bar # .baz +# end # # source://rubocop//lib/rubocop/cop/style/endless_method.rb#132 class RuboCop::Cop::Style::EndlessMethod < ::RuboCop::Cop::Base @@ -40038,20 +40037,6 @@ RuboCop::Cop::Style::ExplicitBlockArgument::MSG = T.let(T.unsafe(nil), String) # * `integral` which enforces the mantissa to always be a whole number without # trailing zeroes. # -# @example EnforcedStyle: scientific (default) -# # Enforces a mantissa between 1 (inclusive) and 10 (exclusive). -# -# # bad -# 10e6 -# 0.3e4 -# 11.7e5 -# 3.14e0 -# -# # good -# 1e7 -# 3e3 -# 1.17e6 -# 3.14 # @example EnforcedStyle: engineering # # Enforces using multiple of 3 exponents, # # mantissa should be between 0.1 (inclusive) and 1000 (exclusive) @@ -40080,6 +40065,20 @@ RuboCop::Cop::Style::ExplicitBlockArgument::MSG = T.let(T.unsafe(nil), String) # 32e6 # 1e4 # 12e5 +# @example EnforcedStyle: scientific (default) +# # Enforces a mantissa between 1 (inclusive) and 10 (exclusive). +# +# # bad +# 10e6 +# 0.3e4 +# 11.7e5 +# 3.14e0 +# +# # good +# 1e7 +# 3e3 +# 1.17e6 +# 3.14 # # source://rubocop//lib/rubocop/cop/style/exponential_notation.rb#60 class RuboCop::Cop::Style::ExponentialNotation < ::RuboCop::Cop::Base @@ -40123,26 +40122,26 @@ RuboCop::Cop::Style::ExponentialNotation::MESSAGES = T.let(T.unsafe(nil), Hash) # On the other hand, `ENV.fetch` raises `KeyError` or returns the explicitly # specified default value. # -# @example DefaultToNil: true (default) +# @example DefaultToNil: false # # bad # ENV['X'] # x = ENV['X'] # # # good -# ENV.fetch('X', nil) -# x = ENV.fetch('X', nil) +# ENV.fetch('X') +# x = ENV.fetch('X') # # # also good # !ENV['X'] # ENV['X'].some_method # (e.g. `.nil?`) -# @example DefaultToNil: false +# @example DefaultToNil: true (default) # # bad # ENV['X'] # x = ENV['X'] # # # good -# ENV.fetch('X') -# x = ENV.fetch('X') +# ENV.fetch('X', nil) +# x = ENV.fetch('X', nil) # # # also good # !ENV['X'] @@ -40560,13 +40559,14 @@ RuboCop::Cop::Style::FileWrite::TRUNCATING_WRITE_MODES = T.let(T.unsafe(nil), Se # It is recommended to either always use `fdiv` or coerce one side only. # This cop also provides other options for code consistency. # -# @example EnforcedStyle: single_coerce (default) +# @example EnforcedStyle: fdiv # # bad +# a / b.to_f +# a.to_f / b # a.to_f / b.to_f # # # good -# a.to_f / b -# a / b.to_f +# a.fdiv(b) # @example EnforcedStyle: left_coerce # # bad # a / b.to_f @@ -40581,14 +40581,13 @@ RuboCop::Cop::Style::FileWrite::TRUNCATING_WRITE_MODES = T.let(T.unsafe(nil), Se # # # good # a / b.to_f -# @example EnforcedStyle: fdiv +# @example EnforcedStyle: single_coerce (default) # # bad -# a / b.to_f -# a.to_f / b # a.to_f / b.to_f # # # good -# a.fdiv(b) +# a.to_f / b +# a / b.to_f # # source://rubocop//lib/rubocop/cop/style/float_division.rb#53 class RuboCop::Cop::Style::FloatDivision < ::RuboCop::Cop::Base @@ -40737,20 +40736,20 @@ RuboCop::Cop::Style::For::PREFER_FOR = T.let(T.unsafe(nil), String) # # # good # puts format('%10s', 'foo') -# @example EnforcedStyle: sprintf +# @example EnforcedStyle: percent # # bad # puts format('%10s', 'foo') -# puts '%10s' % 'foo' +# puts sprintf('%10s', 'foo') # # # good -# puts sprintf('%10s', 'foo') -# @example EnforcedStyle: percent +# puts '%10s' % 'foo' +# @example EnforcedStyle: sprintf # # bad # puts format('%10s', 'foo') -# puts sprintf('%10s', 'foo') +# puts '%10s' % 'foo' # # # good -# puts '%10s' % 'foo' +# puts sprintf('%10s', 'foo') # # source://rubocop//lib/rubocop/cop/style/format_string.rb#50 class RuboCop::Cop::Style::FormatString < ::RuboCop::Cop::Base @@ -40826,19 +40825,30 @@ RuboCop::Cop::Style::FormatString::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array # if the number of them is less than or equals to # `MaxUnannotatedPlaceholdersAllowed`. # -# @example Mode: conservative, EnforcedStyle: annotated -# # In `conservative` mode, offenses are only registered for strings -# # given to a known formatting method. +# @example AllowedMethods: [] (default) +# +# # bad +# redirect('foo/%{bar_id}') +# @example AllowedMethods: [redirect] # # # good -# "%{greeting}" -# foo("%{greeting}") +# redirect('foo/%{bar_id}') +# @example AllowedPatterns: ['redirect'] +# +# # good +# redirect('foo/%{bar_id}') +# @example AllowedPatterns: [] (default) # # # bad -# format("%{greeting}", greeting: 'Hello') -# printf("%{greeting}", greeting: 'Hello') -# sprintf("%{greeting}", greeting: 'Hello') -# "%{greeting}" % { greeting: 'Hello' } +# redirect('foo/%{bar_id}') +# @example EnforcedStyle: annotated (default) +# +# # bad +# format('%{greeting}', greeting: 'Hello') +# format('%s', 'Hello') +# +# # good +# format('%s', greeting: 'Hello') # @example EnforcedStyle: template # # # bad @@ -40870,30 +40880,19 @@ RuboCop::Cop::Style::FormatString::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array # # # good # format('%06d', 10) -# @example AllowedMethods: [] (default) -# -# # bad -# redirect('foo/%{bar_id}') -# @example AllowedMethods: [redirect] -# -# # good -# redirect('foo/%{bar_id}') -# @example AllowedPatterns: [] (default) -# -# # bad -# redirect('foo/%{bar_id}') -# @example AllowedPatterns: ['redirect'] +# @example Mode: conservative, EnforcedStyle: annotated +# # In `conservative` mode, offenses are only registered for strings +# # given to a known formatting method. # # # good -# redirect('foo/%{bar_id}') -# @example EnforcedStyle: annotated (default) +# "%{greeting}" +# foo("%{greeting}") # # # bad -# format('%{greeting}', greeting: 'Hello') -# format('%s', 'Hello') -# -# # good -# format('%s', greeting: 'Hello') +# format("%{greeting}", greeting: 'Hello') +# printf("%{greeting}", greeting: 'Hello') +# sprintf("%{greeting}", greeting: 'Hello') +# "%{greeting}" % { greeting: 'Hello' } # # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#107 class RuboCop::Cop::Style::FormatStringToken < ::RuboCop::Cop::Base @@ -41002,20 +41001,6 @@ end # module Bar # # ... # end -# @example EnforcedStyle: never -# # The `never` will enforce that the frozen string literal comment does -# # not exist in a file. -# # bad -# # frozen_string_literal: true -# -# module Baz -# # ... -# end -# -# # good -# module Baz -# # ... -# end # @example EnforcedStyle: always_true # # The `always_true` style enforces that the frozen string literal # # comment is set to `true`. This is a stricter option than `always` @@ -41038,6 +41023,20 @@ end # module Bar # # ... # end +# @example EnforcedStyle: never +# # The `never` will enforce that the frozen string literal comment does +# # not exist in a file. +# # bad +# # frozen_string_literal: true +# +# module Baz +# # ... +# end +# +# # good +# module Baz +# # ... +# end # # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#84 class RuboCop::Cop::Style::FrozenStringLiteralComment < ::RuboCop::Cop::Base @@ -41507,12 +41506,12 @@ end # # # good # {key1 => value1, key2 => value2} -# @example AllowSplatArgument: true (default) -# # good -# Hash[*ary] # @example AllowSplatArgument: false # # bad # Hash[*ary] +# @example AllowSplatArgument: true (default) +# # good +# Hash[*ary] # # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#44 class RuboCop::Cop::Style::HashConversion < ::RuboCop::Cop::Base @@ -41975,62 +41974,32 @@ end # * either_consistent - accepts both shorthand and explicit use of hash literal value, # but they must be consistent # -# @example EnforcedShorthandSyntax: either_consistent +# @example EnforcedShorthandSyntax: always # -# # good - `foo` and `bar` values can be omitted, but they are consistent, so it's accepted +# # bad # {foo: foo, bar: bar} # -# # bad - `bar` value can be omitted -# {foo:, bar: bar} -# -# # bad - mixed syntaxes -# {foo:, bar: baz} -# # # good # {foo:, bar:} # -# # good - can't omit `baz` -# {foo: foo, bar: baz} -# @example EnforcedStyle: hash_rockets -# # bad -# {a: 1, b: 2} -# {c: 1, 'd' => 5} -# -# # good -# {:a => 1, :b => 2} -# @example EnforcedStyle: no_mixed_keys -# # bad -# {:a => 1, b: 2} -# {c: 1, 'd' => 2} -# -# # good -# {:a => 1, :b => 2} -# {c: 1, d: 2} -# @example EnforcedStyle: ruby19_no_mixed_keys -# # bad -# {:a => 1, :b => 2} -# {c: 2, 'd' => 3} # should just use hash rockets -# -# # good -# {a: 1, b: 2} -# {:c => 3, 'd' => 4} -# @example EnforcedShorthandSyntax: always +# # good - allowed to mix syntaxes +# {foo:, bar: baz} +# @example EnforcedShorthandSyntax: consistent # -# # bad +# # bad - `foo` and `bar` values can be omitted # {foo: foo, bar: bar} # -# # good -# {foo:, bar:} +# # bad - `bar` value can be omitted +# {foo:, bar: bar} # -# # good - allowed to mix syntaxes +# # bad - mixed syntaxes # {foo:, bar: baz} -# @example EnforcedShorthandSyntax: never # -# # bad +# # good # {foo:, bar:} # -# # good -# {foo: foo, bar: bar} +# # good - can't omit `baz` +# {foo: foo, bar: baz} # @example EnforcedShorthandSyntax: either (default) # # # good @@ -42041,9 +42010,9 @@ end # # # good # {foo:, bar:} -# @example EnforcedShorthandSyntax: consistent +# @example EnforcedShorthandSyntax: either_consistent # -# # bad - `foo` and `bar` values can be omitted +# # good - `foo` and `bar` values can be omitted, but they are consistent, so it's accepted # {foo: foo, bar: bar} # # # bad - `bar` value can be omitted @@ -42057,6 +42026,28 @@ end # # # good - can't omit `baz` # {foo: foo, bar: baz} +# @example EnforcedShorthandSyntax: never +# +# # bad +# {foo:, bar:} +# +# # good +# {foo: foo, bar: bar} +# @example EnforcedStyle: hash_rockets +# # bad +# {a: 1, b: 2} +# {c: 1, 'd' => 5} +# +# # good +# {:a => 1, :b => 2} +# @example EnforcedStyle: no_mixed_keys +# # bad +# {:a => 1, b: 2} +# {c: 1, 'd' => 2} +# +# # good +# {:a => 1, :b => 2} +# {c: 1, d: 2} # @example EnforcedStyle: ruby19 (default) # # bad # {:a => 2} @@ -42066,6 +42057,14 @@ end # {a: 2, b: 1} # {:c => 2, 'd' => 2} # acceptable since 'd' isn't a symbol # {d: 1, 'e' => 2} # technically not forbidden +# @example EnforcedStyle: ruby19_no_mixed_keys +# # bad +# {:a => 1, :b => 2} +# {c: 2, 'd' => 3} # should just use hash rockets +# +# # good +# {a: 1, b: 2} +# {:c => 3, 'd' => 4} # # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#134 class RuboCop::Cop::Style::HashSyntax < ::RuboCop::Cop::Base @@ -43429,13 +43428,6 @@ RuboCop::Cop::Style::ItAssignment::MSG = T.let(T.unsafe(nil), String) # # good # block { do_something(it) } # block { |named_param| do_something(named_param) } -# @example EnforcedStyle: only_numbered_parameters -# # bad -# block { do_something(_1) } -# -# # good -# block { do_something(it) } -# block { |named_param| do_something(named_param) } # @example EnforcedStyle: always # # bad # block { do_something(_1) } @@ -43450,6 +43442,13 @@ RuboCop::Cop::Style::ItAssignment::MSG = T.let(T.unsafe(nil), String) # # good # block { do_something(_1) } # block { |named_param| do_something(named_param) } +# @example EnforcedStyle: only_numbered_parameters +# # bad +# block { do_something(_1) } +# +# # good +# block { do_something(it) } +# block { |named_param| do_something(named_param) } # # source://rubocop//lib/rubocop/cop/style/it_block_parameter.rb#53 class RuboCop::Cop::Style::ItBlockParameter < ::RuboCop::Cop::Base @@ -43571,27 +43570,27 @@ RuboCop::Cop::Style::KeywordParametersOrder::MSG = T.let(T.unsafe(nil), String) # It is configurable to enforce one of the styles for both single line # and multiline lambdas as well. # -# @example EnforcedStyle: line_count_dependent (default) +# @example EnforcedStyle: lambda # # bad -# f = lambda { |x| x } +# f = ->(x) { x } # f = ->(x) do # x # end # # # good -# f = ->(x) { x } +# f = lambda { |x| x } # f = lambda do |x| # x # end -# @example EnforcedStyle: lambda +# @example EnforcedStyle: line_count_dependent (default) # # bad -# f = ->(x) { x } +# f = lambda { |x| x } # f = ->(x) do # x # end # # # good -# f = lambda { |x| x } +# f = ->(x) { x } # f = lambda do |x| # x # end @@ -43656,18 +43655,18 @@ RuboCop::Cop::Style::Lambda::OFFENDING_SELECTORS = T.let(T.unsafe(nil), Hash) # Checks for use of the lambda.(args) syntax. # -# @example EnforcedStyle: call (default) -# # bad -# lambda.(x, y) -# -# # good -# lambda.call(x, y) # @example EnforcedStyle: braces # # bad # lambda.call(x, y) # # # good # lambda.(x, y) +# @example EnforcedStyle: call (default) +# # bad +# lambda.(x, y) +# +# # good +# lambda.call(x, y) # # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#21 class RuboCop::Cop::Style::LambdaCall < ::RuboCop::Cop::Base @@ -43811,12 +43810,26 @@ RuboCop::Cop::Style::LineEndConcatenation::SIMPLE_STRING_TOKEN_TYPE = T.let(T.un # # NOTE: If one of these configuration is set to nil, any capitalization is allowed. # -# @example ValueCapitalization: uppercase +# @example DirectiveCapitalization: lowercase (default) # # bad +# # FROZEN-STRING-LITERAL: true +# +# # good # # frozen-string-literal: true +# @example DirectiveCapitalization: nil +# # any capitalization is accepted # # # good -# # frozen-string-literal: TRUE +# # frozen-string-literal: true +# +# # good +# # FROZEN-STRING-LITERAL: true +# @example DirectiveCapitalization: uppercase +# # bad +# # frozen-string-literal: true +# +# # good +# # FROZEN-STRING-LITERAL: true # @example EnforcedStyle: kebab_case # # The `kebab_case` style will enforce that the frozen string literal # # comment is written in kebab case. (Words separated by hyphens) @@ -43833,26 +43846,30 @@ RuboCop::Cop::Style::LineEndConcatenation::SIMPLE_STRING_TOKEN_TYPE = T.let(T.un # module Baz # # ... # end -# @example DirectiveCapitalization: lowercase (default) -# # bad -# # FROZEN-STRING-LITERAL: true -# -# # good -# # frozen-string-literal: true -# @example DirectiveCapitalization: uppercase +# @example EnforcedStyle: snake_case (default) +# # The `snake_case` style will enforce that the frozen string literal +# # comment is written in snake case. (Words separated by underscores) # # bad # # frozen-string-literal: true # -# # good -# # FROZEN-STRING-LITERAL: true -# @example DirectiveCapitalization: nil -# # any capitalization is accepted +# module Bar +# # ... +# end # # # good -# # frozen-string-literal: true +# # frozen_string_literal: false +# +# module Bar +# # ... +# end +# @example ValueCapitalization: lowercase +# # when a value is not given, any capitalization is accepted +# +# # bad +# # frozen-string-literal: TRUE # # # good -# # FROZEN-STRING-LITERAL: true +# # frozen-string-literal: TRUE # @example ValueCapitalization: nil (default) # # any capitalization is accepted # @@ -43861,30 +43878,12 @@ RuboCop::Cop::Style::LineEndConcatenation::SIMPLE_STRING_TOKEN_TYPE = T.let(T.un # # # good # # frozen-string-literal: TRUE -# @example ValueCapitalization: lowercase -# # when a value is not given, any capitalization is accepted -# -# # bad -# # frozen-string-literal: TRUE -# -# # good -# # frozen-string-literal: TRUE -# @example EnforcedStyle: snake_case (default) -# # The `snake_case` style will enforce that the frozen string literal -# # comment is written in snake case. (Words separated by underscores) +# @example ValueCapitalization: uppercase # # bad # # frozen-string-literal: true # -# module Bar -# # ... -# end -# # # good -# # frozen_string_literal: false -# -# module Bar -# # ... -# end +# # frozen-string-literal: TRUE # # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#97 class RuboCop::Cop::Style::MagicCommentFormat < ::RuboCop::Cop::Base @@ -44395,6 +44394,61 @@ RuboCop::Cop::Style::MapToSet::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # - Parentheses are required when the first argument is a beginless range or # the last argument is an endless range. # +# @example AllowParenthesesInCamelCaseMethod: false (default) +# +# # bad +# Array(1) +# +# # good +# Array 1 +# @example AllowParenthesesInCamelCaseMethod: true +# +# # good +# Array(1) +# +# # good +# Array 1 +# @example AllowParenthesesInChaining: false (default) +# +# # bad +# foo().bar(1) +# +# # good +# foo().bar 1 +# @example AllowParenthesesInChaining: true +# +# # good +# foo().bar(1) +# +# # good +# foo().bar 1 +# @example AllowParenthesesInMultilineCall: false (default) +# +# # bad +# foo.enforce( +# strict: true +# ) +# +# # good +# foo.enforce \ +# strict: true +# @example AllowParenthesesInMultilineCall: true +# +# # good +# foo.enforce( +# strict: true +# ) +# +# # good +# foo.enforce \ +# strict: true +# @example AllowParenthesesInStringInterpolation: false (default) +# +# # bad +# "#{t('this.is.bad')}" +# +# # good +# "#{t 'this.is.better'}" # @example AllowParenthesesInStringInterpolation: true # # # good @@ -44402,6 +44456,20 @@ RuboCop::Cop::Style::MapToSet::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # # # good # "#{t 'this.is.also.good'}" +# @example AllowedMethods: ["puts", "print"] +# +# # good +# puts "Hello world" +# print "Hello world" +# # still enforces parentheses on other methods +# array.delete(e) +# @example AllowedPatterns: ["^assert"] +# +# # good +# assert_equal 'test', x +# assert_match(/foo/, bar) +# # still enforces parentheses on other methods +# array.delete(e) # @example EnforcedStyle: omit_parentheses # # # bad @@ -44433,87 +44501,6 @@ RuboCop::Cop::Style::MapToSet::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # if meets(criteria:, action:) # safe_action(action) || dangerous_action(action) # end -# @example IgnoreMacros: true (default) -# -# # good -# class Foo -# bar :baz -# end -# @example IgnoreMacros: false -# -# # bad -# class Foo -# bar :baz -# end -# @example AllowedMethods: ["puts", "print"] -# -# # good -# puts "Hello world" -# print "Hello world" -# # still enforces parentheses on other methods -# array.delete(e) -# @example AllowedPatterns: ["^assert"] -# -# # good -# assert_equal 'test', x -# assert_match(/foo/, bar) -# # still enforces parentheses on other methods -# array.delete(e) -# @example AllowParenthesesInMultilineCall: false (default) -# -# # bad -# foo.enforce( -# strict: true -# ) -# -# # good -# foo.enforce \ -# strict: true -# @example AllowParenthesesInMultilineCall: true -# -# # good -# foo.enforce( -# strict: true -# ) -# -# # good -# foo.enforce \ -# strict: true -# @example AllowParenthesesInChaining: false (default) -# -# # bad -# foo().bar(1) -# -# # good -# foo().bar 1 -# @example AllowParenthesesInChaining: true -# -# # good -# foo().bar(1) -# -# # good -# foo().bar 1 -# @example AllowParenthesesInCamelCaseMethod: false (default) -# -# # bad -# Array(1) -# -# # good -# Array 1 -# @example AllowParenthesesInCamelCaseMethod: true -# -# # good -# Array(1) -# -# # good -# Array 1 -# @example AllowParenthesesInStringInterpolation: false (default) -# -# # bad -# "#{t('this.is.bad')}" -# -# # good -# "#{t 'this.is.better'}" # @example EnforcedStyle: require_parentheses (default) # # # bad @@ -44535,6 +44522,18 @@ RuboCop::Cop::Style::MapToSet::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # # # okay with `^assert` listed in `AllowedPatterns` # assert_equal 'test', x +# @example IgnoreMacros: false +# +# # bad +# class Foo +# bar :baz +# end +# @example IgnoreMacros: true (default) +# +# # good +# class Foo +# bar :baz +# end # # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#220 class RuboCop::Cop::Style::MethodCallWithArgsParentheses < ::RuboCop::Cop::Base @@ -44943,43 +44942,44 @@ RuboCop::Cop::Style::MethodCalledOnDoEndBlock::MSG = T.let(T.unsafe(nil), String # # Removing the parens would be a syntax error here. # -# @example EnforcedStyle: require_parentheses (default) -# # The `require_parentheses` style requires method definitions -# # to always use parentheses +# @example EnforcedStyle: require_no_parentheses +# # The `require_no_parentheses` style requires method definitions +# # to never use parentheses # # # bad -# def bar num1, num2 +# def bar(num1, num2) # num1 + num2 # end # -# def foo descriptive_var_name, +# def foo(descriptive_var_name, # another_descriptive_var_name, -# last_descriptive_var_name +# last_descriptive_var_name) # do_something # end # # # good -# def bar(num1, num2) +# def bar num1, num2 # num1 + num2 # end # -# def foo(descriptive_var_name, +# def foo descriptive_var_name, # another_descriptive_var_name, -# last_descriptive_var_name) +# last_descriptive_var_name # do_something # end -# @example EnforcedStyle: require_no_parentheses -# # The `require_no_parentheses` style requires method definitions -# # to never use parentheses +# @example EnforcedStyle: require_no_parentheses_except_multiline +# # The `require_no_parentheses_except_multiline` style prefers no +# # parentheses when method definition arguments fit on single line, +# # but prefers parentheses when arguments span multiple lines. # # # bad # def bar(num1, num2) # num1 + num2 # end # -# def foo(descriptive_var_name, +# def foo descriptive_var_name, # another_descriptive_var_name, -# last_descriptive_var_name) +# last_descriptive_var_name # do_something # end # @@ -44988,18 +44988,17 @@ RuboCop::Cop::Style::MethodCalledOnDoEndBlock::MSG = T.let(T.unsafe(nil), String # num1 + num2 # end # -# def foo descriptive_var_name, +# def foo(descriptive_var_name, # another_descriptive_var_name, -# last_descriptive_var_name +# last_descriptive_var_name) # do_something # end -# @example EnforcedStyle: require_no_parentheses_except_multiline -# # The `require_no_parentheses_except_multiline` style prefers no -# # parentheses when method definition arguments fit on single line, -# # but prefers parentheses when arguments span multiple lines. +# @example EnforcedStyle: require_parentheses (default) +# # The `require_parentheses` style requires method definitions +# # to always use parentheses # # # bad -# def bar(num1, num2) +# def bar num1, num2 # num1 + num2 # end # @@ -45010,7 +45009,7 @@ RuboCop::Cop::Style::MethodCalledOnDoEndBlock::MSG = T.let(T.unsafe(nil), String # end # # # good -# def bar num1, num2 +# def bar(num1, num2) # num1 + num2 # end # @@ -45204,58 +45203,58 @@ RuboCop::Cop::Style::MinMaxComparison::MSG = T.let(T.unsafe(nil), String) # else # # the content of `else` branch will be determined by Style/EmptyElse # end -# @example EnforcedStyle: if -# # warn when an `if` expression is missing an `else` branch. +# @example EnforcedStyle: case +# # warn when a `case` expression is missing an `else` branch. # # # bad -# if condition +# case var +# when condition # statement # end # # # good -# if condition +# case var +# when condition # statement # else # # the content of `else` branch will be determined by Style/EmptyElse # end # # # good -# case var -# when condition +# if condition # statement # end # # # good -# case var -# when condition +# if condition # statement # else # # the content of `else` branch will be determined by Style/EmptyElse # end -# @example EnforcedStyle: case -# # warn when a `case` expression is missing an `else` branch. +# @example EnforcedStyle: if +# # warn when an `if` expression is missing an `else` branch. # # # bad -# case var -# when condition +# if condition # statement # end # # # good -# case var -# when condition +# if condition # statement # else # # the content of `else` branch will be determined by Style/EmptyElse # end # # # good -# if condition +# case var +# when condition # statement # end # # # good -# if condition +# case var +# when condition # statement # else # # the content of `else` branch will be determined by Style/EmptyElse @@ -45392,27 +45391,27 @@ RuboCop::Cop::Style::MissingRespondToMissing::MSG = T.let(T.unsafe(nil), String) # By default it enforces mixins to be placed in separate declarations, # but it can be configured to enforce grouping them in one declaration. # -# @example EnforcedStyle: separated (default) +# @example EnforcedStyle: grouped # # bad # class Foo -# include Bar, Qox +# extend Bar +# extend Qox # end # # # good # class Foo -# include Qox -# include Bar +# extend Qox, Bar # end -# @example EnforcedStyle: grouped +# @example EnforcedStyle: separated (default) # # bad # class Foo -# extend Bar -# extend Qox +# include Bar, Qox # end # # # good # class Foo -# extend Qox, Bar +# include Qox +# include Bar # end # # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#33 @@ -45532,15 +45531,9 @@ RuboCop::Cop::Style::MixinUsage::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # - in default mode (`module_function`), the cop won't be activated when the module # contains any private methods # -# @example EnforcedStyle: module_function (default) +# @example EnforcedStyle: extend_self # # bad # module Test -# extend self -# # ... -# end -# -# # good -# module Test # module_function # # ... # end @@ -45549,8 +45542,6 @@ RuboCop::Cop::Style::MixinUsage::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # module Test # extend self # # ... -# private -# # ... # end # # # good @@ -45559,39 +45550,47 @@ RuboCop::Cop::Style::MixinUsage::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # # ... # end # end -# @example EnforcedStyle: extend_self +# @example EnforcedStyle: forbidden # # bad # module Test # module_function # # ... # end # -# # good +# # bad # module Test # extend self # # ... # end # +# # bad +# module Test +# extend self +# # ... +# private +# # ... +# end +# # # good # module Test # class << self # # ... # end # end -# @example EnforcedStyle: forbidden +# @example EnforcedStyle: module_function (default) # # bad # module Test -# module_function +# extend self # # ... # end # -# # bad +# # good # module Test -# extend self +# module_function # # ... # end # -# # bad +# # good # module Test # extend self # # ... @@ -45806,30 +45805,30 @@ RuboCop::Cop::Style::MultilineInPatternThen::MSG = T.let(T.unsafe(nil), String) # Checks expressions wrapping styles for multiline memoization. # -# @example EnforcedStyle: keyword (default) +# @example EnforcedStyle: braces # # bad -# foo ||= ( +# foo ||= begin # bar # baz -# ) +# end # # # good -# foo ||= begin +# foo ||= ( # bar # baz -# end -# @example EnforcedStyle: braces +# ) +# @example EnforcedStyle: keyword (default) # # bad -# foo ||= begin +# foo ||= ( # bar # baz -# end +# ) # # # good -# foo ||= ( +# foo ||= begin # bar # baz -# ) +# end # # source://rubocop//lib/rubocop/cop/style/multiline_memoization.rb#33 class RuboCop::Cop::Style::MultilineMemoization < ::RuboCop::Cop::Base @@ -46070,15 +46069,15 @@ RuboCop::Cop::Style::MultilineWhenThen::MSG = T.let(T.unsafe(nil), String) # # # accepted (but consider `case` as above) # foo if a == b.lightweight || a == b.heavyweight -# @example AllowMethodComparison: true (default) -# # good -# foo if a == b.lightweight || a == b.heavyweight # @example AllowMethodComparison: false # # bad # foo if a == b.lightweight || a == b.heavyweight # # # good # foo if [b.lightweight, b.heavyweight].include?(a) +# @example AllowMethodComparison: true (default) +# # good +# foo if a == b.lightweight || a == b.heavyweight # @example ComparisonsThreshold: 2 (default) # # bad # foo if a == 'a' || a == 'b' @@ -46166,6 +46165,15 @@ RuboCop::Cop::Style::MultipleComparison::MSG = T.let(T.unsafe(nil), String) # NOTE: From Ruby 3.0, this cop allows explicit freezing of constants when # the `shareable_constant_value` directive is used. # +# @example +# # Magic comment - shareable_constant_value: literal +# +# # bad +# CONST = [1, 2, 3] +# +# # good +# # shareable_constant_value: literal +# CONST = [1, 2, 3] # @example EnforcedStyle: literals (default) # # bad # CONST = [1, 2, 3] @@ -46200,15 +46208,6 @@ RuboCop::Cop::Style::MultipleComparison::MSG = T.let(T.unsafe(nil), String) # puts 1 # end # end.freeze -# @example -# # Magic comment - shareable_constant_value: literal -# -# # bad -# CONST = [1, 2, 3] -# -# # good -# # shareable_constant_value: literal -# CONST = [1, 2, 3] # # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#83 class RuboCop::Cop::Style::MutableConstant < ::RuboCop::Cop::Base @@ -46345,40 +46344,40 @@ end # # good # # bar unless foo -# @example EnforcedStyle: prefix -# # enforces `unless` for just `prefix` conditionals +# @example EnforcedStyle: postfix +# # enforces `unless` for just `postfix` conditionals # # # bad # -# if !foo -# bar -# end +# bar if !foo # # # good # -# unless foo -# bar -# end +# bar unless foo # # # good # -# bar if !foo -# @example EnforcedStyle: postfix -# # enforces `unless` for just `postfix` conditionals +# if !foo +# bar +# end +# @example EnforcedStyle: prefix +# # enforces `unless` for just `prefix` conditionals # # # bad # -# bar if !foo +# if !foo +# bar +# end # # # good # -# bar unless foo +# unless foo +# bar +# end # # # good # -# if !foo -# bar -# end +# bar if !foo # # source://rubocop//lib/rubocop/cop/style/negated_if.rb#71 class RuboCop::Cop::Style::NegatedIf < ::RuboCop::Cop::Base @@ -46514,6 +46513,19 @@ RuboCop::Cop::Style::NegatedIfElseCondition::NEGATED_EQUALITY_METHODS = T.let(T. # # # good # bar if foo +# @example EnforcedStyle: postfix +# # enforces `if` for just `postfix` conditionals +# +# # bad +# bar unless !foo +# +# # good +# bar if foo +# +# # good +# unless !foo +# bar +# end # @example EnforcedStyle: prefix # # enforces `if` for just `prefix` conditionals # @@ -46529,19 +46541,6 @@ RuboCop::Cop::Style::NegatedIfElseCondition::NEGATED_EQUALITY_METHODS = T.let(T. # # # good # bar unless !foo -# @example EnforcedStyle: postfix -# # enforces `if` for just `postfix` conditionals -# -# # bad -# bar unless !foo -# -# # good -# bar if foo -# -# # good -# unless !foo -# bar -# end # # source://rubocop//lib/rubocop/cop/style/negated_unless.rb#61 class RuboCop::Cop::Style::NegatedUnless < ::RuboCop::Cop::Base @@ -46786,23 +46785,34 @@ RuboCop::Cop::Style::NestedTernaryOperator::MSG = T.let(T.unsafe(nil), String) # Use `next` to skip iteration instead of a condition at the end. # -# @example EnforcedStyle: skip_modifier_ifs (default) +# @example AllowConsecutiveConditionals: false (default) # # bad # [1, 2].each do |a| # if a == 1 # puts a # end +# if a == 2 +# puts a +# end # end # # # good # [1, 2].each do |a| -# next unless a == 1 +# if a == 1 # puts a # end -# +# next unless a == 2 +# puts a +# end +# @example AllowConsecutiveConditionals: true # # good # [1, 2].each do |a| -# puts a if a == 1 +# if a == 1 +# puts a +# end +# if a == 2 +# puts a +# end # end # @example EnforcedStyle: always # # With `always` all conditions at the end of an iteration needs to be @@ -46826,34 +46836,23 @@ RuboCop::Cop::Style::NestedTernaryOperator::MSG = T.let(T.unsafe(nil), String) # next unless a == 1 # puts a # end -# @example AllowConsecutiveConditionals: false (default) +# @example EnforcedStyle: skip_modifier_ifs (default) # # bad # [1, 2].each do |a| # if a == 1 # puts a # end -# if a == 2 -# puts a -# end # end # # # good # [1, 2].each do |a| -# if a == 1 -# puts a -# end -# next unless a == 2 +# next unless a == 1 # puts a # end -# @example AllowConsecutiveConditionals: true +# # # good # [1, 2].each do |a| -# if a == 1 -# puts a -# end -# if a == 2 -# puts a -# end +# puts a if a == 1 # end # # source://rubocop//lib/rubocop/cop/style/next.rb#81 @@ -46986,23 +46985,23 @@ RuboCop::Cop::Style::Next::MSG = T.let(T.unsafe(nil), String) # # Supported styles are: predicate, comparison. # -# @example EnforcedStyle: predicate (default) +# @example EnforcedStyle: comparison # # # bad -# if x == nil +# if x.nil? # end # # # good -# if x.nil? +# if x == nil # end -# @example EnforcedStyle: comparison +# @example EnforcedStyle: predicate (default) # # # bad -# if x.nil? +# if x == nil # end # # # good -# if x == nil +# if x.nil? # end # # source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#31 @@ -47330,6 +47329,13 @@ RuboCop::Cop::Style::NumberedParametersLimit::NUMBERED_PARAMETER_PATTERN = T.let # uppercase prefixes and corrects them to lowercase prefix # or no prefix (in case of decimals). # +# @example EnforcedOctalStyle: zero_only +# # bad +# num = 0o1234 +# num = 0O1234 +# +# # good +# num = 01234 # @example EnforcedOctalStyle: zero_with_o (default) # # bad - missing octal prefix # num = 01234 @@ -47348,13 +47354,6 @@ RuboCop::Cop::Style::NumberedParametersLimit::NUMBERED_PARAMETER_PATTERN = T.let # num = 0x12AB # num = 0b10101 # num = 1234 -# @example EnforcedOctalStyle: zero_only -# # bad -# num = 0o1234 -# num = 0O1234 -# -# # good -# num = 01234 # # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#36 class RuboCop::Cop::Style::NumericLiteralPrefix < ::RuboCop::Cop::Base @@ -47450,6 +47449,10 @@ RuboCop::Cop::Style::NumericLiteralPrefix::OCTAL_ZERO_ONLY_REGEX = T.let(T.unsaf # # good # 1_000_000 # 1000 +# @example AllowedNumbers: [3000] +# +# # good +# 3000 # You can specify allowed numbers. (e.g. port number) # @example Strict: false (default) # # # good @@ -47458,10 +47461,6 @@ RuboCop::Cop::Style::NumericLiteralPrefix::OCTAL_ZERO_ONLY_REGEX = T.let(T.unsaf # # # bad # 10_000_00 # typical representation of $10,000 in cents -# @example AllowedNumbers: [3000] -# -# # good -# 3000 # You can specify allowed numbers. (e.g. port number) # # source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#43 class RuboCop::Cop::Style::NumericLiterals < ::RuboCop::Cop::Base @@ -47529,13 +47528,28 @@ RuboCop::Cop::Style::NumericLiterals::MSG = T.let(T.unsafe(nil), String) # populated with objects which can be compared with integers, but are # not themselves `Integer` polymorphic. # -# @example EnforcedStyle: predicate (default) +# @example AllowedMethods: [==] with EnforcedStyle: predicate +# # good +# foo == 0 +# +# # bad +# 0 > foo +# bar.baz > 0 +# @example AllowedMethods: [] (default) with EnforcedStyle: predicate # # bad # foo == 0 # 0 > foo # bar.baz > 0 -# +# @example AllowedPatterns: ['zero'] with EnforcedStyle: predicate # # good +# # bad +# foo.zero? +# +# # bad +# foo.negative? +# bar.baz.positive? +# @example AllowedPatterns: [] (default) with EnforcedStyle: comparison +# # bad # foo.zero? # foo.negative? # bar.baz.positive? @@ -47549,29 +47563,14 @@ RuboCop::Cop::Style::NumericLiterals::MSG = T.let(T.unsafe(nil), String) # foo == 0 # 0 > foo # bar.baz > 0 -# @example AllowedMethods: [] (default) with EnforcedStyle: predicate +# @example EnforcedStyle: predicate (default) # # bad # foo == 0 # 0 > foo # bar.baz > 0 -# @example AllowedMethods: [==] with EnforcedStyle: predicate -# # good -# foo == 0 # -# # bad -# 0 > foo -# bar.baz > 0 -# @example AllowedPatterns: [] (default) with EnforcedStyle: comparison -# # bad -# foo.zero? -# foo.negative? -# bar.baz.positive? -# @example AllowedPatterns: ['zero'] with EnforcedStyle: predicate # # good -# # bad # foo.zero? -# -# # bad # foo.negative? # bar.baz.positive? # @@ -48303,12 +48302,6 @@ end # if x > 10 # elsif x < 3 # end -# @example AllowSafeAssignment: true (default) -# # good -# foo unless (bar = baz) -# @example AllowSafeAssignment: false -# # bad -# foo unless (bar = baz) # @example AllowInMultilineConditions: false (default) # # bad # if (x > 10 && @@ -48324,6 +48317,12 @@ end # if (x > 10 && # y > 10) # end +# @example AllowSafeAssignment: false +# # bad +# foo unless (bar = baz) +# @example AllowSafeAssignment: true (default) +# # good +# foo unless (bar = baz) # # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#56 class RuboCop::Cop::Style::ParenthesesAroundCondition < ::RuboCop::Cop::Base @@ -48692,20 +48691,20 @@ RuboCop::Cop::Style::Proc::MSG = T.let(T.unsafe(nil), String) # are not quoted that don't need to be. This cop is for configuring the quoting # style to use for symbols that require quotes. # -# @example EnforcedStyle: same_as_string_literals (default) / single_quotes +# @example EnforcedStyle: double_quotes # # bad -# :"abc-def" +# :'abc-def' # # # good -# :'abc-def' +# :"abc-def" # :"#{str}" # :"a\'b" -# @example EnforcedStyle: double_quotes +# @example EnforcedStyle: same_as_string_literals (default) / single_quotes # # bad -# :'abc-def' +# :"abc-def" # # # good -# :"abc-def" +# :'abc-def' # :"#{str}" # :"a\'b" # @@ -48773,6 +48772,16 @@ RuboCop::Cop::Style::QuotedSymbols::MSG_SINGLE = T.let(T.unsafe(nil), String) # The exploded style has an `AllowedCompactTypes` configuration # option that takes an `Array` of exception name Strings. # +# @example EnforcedStyle: compact +# # bad +# raise StandardError, 'message' +# raise RuntimeError, arg1, arg2, arg3 +# +# # good +# raise StandardError.new('message') +# raise MyCustomError +# raise MyCustomError.new(arg1, arg2, arg3) +# fail 'message' # @example EnforcedStyle: exploded (default) # # bad # raise StandardError.new('message') @@ -48787,16 +48796,6 @@ RuboCop::Cop::Style::QuotedSymbols::MSG_SINGLE = T.let(T.unsafe(nil), String) # # With `AllowedCompactTypes` set to ['MyWrappedError'] # raise MyWrappedError.new(obj) # raise MyWrappedError.new(obj), 'message' -# @example EnforcedStyle: compact -# # bad -# raise StandardError, 'message' -# raise RuntimeError, arg1, arg2, arg3 -# -# # good -# raise StandardError.new('message') -# raise MyCustomError -# raise MyCustomError.new(arg1, arg2, arg3) -# fail 'message' # # source://rubocop//lib/rubocop/cop/style/raise_args.rb#47 class RuboCop::Cop::Style::RaiseArgs < ::RuboCop::Cop::Base @@ -50383,15 +50382,15 @@ RuboCop::Cop::Style::RedundantHeredocDelimiterQuotes::STRING_INTERPOLATION_OR_ES # # good (changes the parameter requirements) # def initialize(...) # end -# @example AllowComments: true (default) +# @example AllowComments: false # -# # good +# # bad # def initialize # # Overriding to negate superclass `initialize` method. # end -# @example AllowComments: false +# @example AllowComments: true (default) # -# # bad +# # good # def initialize # # Overriding to negate superclass `initialize` method. # end @@ -51978,26 +51977,38 @@ RuboCop::Cop::Style::RedundantStringEscape::MSG = T.let(T.unsafe(nil), String) # do_something %r{=regexp} # `do_something /=regexp/` is an invalid syntax. # ---- # -# @example EnforcedStyle: slashes (default) +# @example AllowInnerSlashes: false (default) +# # If `false`, the cop will always recommend using `%r` if one or more +# # slashes are found in the regexp string. +# +# # bad +# x =~ /home\// +# +# # good +# x =~ %r{home/} +# @example AllowInnerSlashes: true +# # good +# x =~ /home\// +# @example EnforcedStyle: mixed # # bad # snake_case = %r{^[\dA-Z_]+$} # # # bad -# regex = %r{ +# regex = / # foo # (bar) # (baz) -# }x +# /x # # # good # snake_case = /^[\dA-Z_]+$/ # # # good -# regex = / +# regex = %r{ # foo # (bar) # (baz) -# /x +# }x # @example EnforcedStyle: percent_r # # bad # snake_case = /^[\dA-Z_]+$/ @@ -52018,38 +52029,26 @@ RuboCop::Cop::Style::RedundantStringEscape::MSG = T.let(T.unsafe(nil), String) # (bar) # (baz) # }x -# @example EnforcedStyle: mixed +# @example EnforcedStyle: slashes (default) # # bad # snake_case = %r{^[\dA-Z_]+$} # # # bad -# regex = / +# regex = %r{ # foo # (bar) # (baz) -# /x +# }x # # # good # snake_case = /^[\dA-Z_]+$/ # # # good -# regex = %r{ +# regex = / # foo # (bar) # (baz) -# }x -# @example AllowInnerSlashes: false (default) -# # If `false`, the cop will always recommend using `%r` if one or more -# # slashes are found in the regexp string. -# -# # bad -# x =~ /home\// -# -# # good -# x =~ %r{home/} -# @example AllowInnerSlashes: true -# # good -# x =~ /home\// +# /x # # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#93 class RuboCop::Cop::Style::RegexpLiteral < ::RuboCop::Cop::Base @@ -53224,12 +53223,6 @@ RuboCop::Cop::Style::Send::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # # # good # obj.method_name -# @example AllowSend: true (default) -# # good -# obj.send(:method_name) -# obj.send('method_name') -# obj.__send__(:method_name) -# obj.__send__('method_name') # @example AllowSend: false # # bad # obj.send(:method_name) @@ -53239,6 +53232,12 @@ RuboCop::Cop::Style::Send::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # # # good # obj.method_name +# @example AllowSend: true (default) +# # good +# obj.send(:method_name) +# obj.send('method_name') +# obj.__send__(:method_name) +# obj.__send__('method_name') # # source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#54 class RuboCop::Cop::Style::SendWithLiteralMethodName < ::RuboCop::Cop::Base @@ -53281,68 +53280,68 @@ RuboCop::Cop::Style::SendWithLiteralMethodName::STATIC_METHOD_NAME_NODE_TYPES = # Checks for uses of `fail` and `raise`. # -# @example EnforcedStyle: only_raise (default) -# # The `only_raise` style enforces the sole use of `raise`. +# @example EnforcedStyle: only_fail +# # The `only_fail` style enforces the sole use of `fail`. # # bad # begin -# fail +# raise # rescue Exception # # handle it # end # # def watch_out -# fail +# raise # rescue Exception # # handle it # end # -# Kernel.fail +# Kernel.raise # # # good # begin -# raise +# fail # rescue Exception # # handle it # end # # def watch_out -# raise +# fail # rescue Exception # # handle it # end # -# Kernel.raise -# @example EnforcedStyle: only_fail -# # The `only_fail` style enforces the sole use of `fail`. +# Kernel.fail +# @example EnforcedStyle: only_raise (default) +# # The `only_raise` style enforces the sole use of `raise`. # # bad # begin -# raise +# fail # rescue Exception # # handle it # end # # def watch_out -# raise +# fail # rescue Exception # # handle it # end # -# Kernel.raise +# Kernel.fail # # # good # begin -# fail +# raise # rescue Exception # # handle it # end # # def watch_out -# fail +# raise # rescue Exception # # handle it # end # -# Kernel.fail +# Kernel.raise # @example EnforcedStyle: semantic # # The `semantic` style enforces the use of `fail` to signal an # # exception, then will use `raise` to trigger an offense after @@ -53630,12 +53629,12 @@ RuboCop::Cop::Style::SingleLineDoEndBlock::MSG = T.let(T.unsafe(nil), String) # def self.resource_class=(klass); end # def @table.columns; end # def some_method() = body -# @example AllowIfMethodIsEmpty: true (default) -# # good -# def no_op; end # @example AllowIfMethodIsEmpty: false # # bad # def no_op; end +# @example AllowIfMethodIsEmpty: true (default) +# # good +# def no_op; end # # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#34 class RuboCop::Cop::Style::SingleLineMethods < ::RuboCop::Cop::Base @@ -53904,30 +53903,14 @@ RuboCop::Cop::Style::SoleNestedConditional::MSG = T.let(T.unsafe(nil), String) # will add a require statement to the top of the file if # enabled by RequireEnglish config. # -# @example EnforcedStyle: use_english_names (default) -# # good -# require 'English' # or this could be in another file. +# @example EnforcedStyle: use_builtin_english_names # +# # good +# # Like `use_perl_names` but allows builtin global vars. # puts $LOAD_PATH # puts $LOADED_FEATURES # puts $PROGRAM_NAME -# puts $ERROR_INFO -# puts $ERROR_POSITION -# puts $FIELD_SEPARATOR # or $FS -# puts $OUTPUT_FIELD_SEPARATOR # or $OFS -# puts $INPUT_RECORD_SEPARATOR # or $RS -# puts $OUTPUT_RECORD_SEPARATOR # or $ORS -# puts $INPUT_LINE_NUMBER # or $NR -# puts $LAST_READ_LINE -# puts $DEFAULT_OUTPUT -# puts $DEFAULT_INPUT -# puts $PROCESS_ID # or $PID -# puts $CHILD_STATUS -# puts $LAST_MATCH_INFO -# puts $IGNORECASE -# puts $ARGV # or ARGV -# @example EnforcedStyle: use_perl_names -# # good +# puts ARGV # puts $: # puts $" # puts $0 @@ -53946,14 +53929,30 @@ RuboCop::Cop::Style::SoleNestedConditional::MSG = T.let(T.unsafe(nil), String) # puts $~ # puts $= # puts $* -# @example EnforcedStyle: use_builtin_english_names -# +# @example EnforcedStyle: use_english_names (default) # # good -# # Like `use_perl_names` but allows builtin global vars. +# require 'English' # or this could be in another file. +# # puts $LOAD_PATH # puts $LOADED_FEATURES # puts $PROGRAM_NAME -# puts ARGV +# puts $ERROR_INFO +# puts $ERROR_POSITION +# puts $FIELD_SEPARATOR # or $FS +# puts $OUTPUT_FIELD_SEPARATOR # or $OFS +# puts $INPUT_RECORD_SEPARATOR # or $RS +# puts $OUTPUT_RECORD_SEPARATOR # or $ORS +# puts $INPUT_LINE_NUMBER # or $NR +# puts $LAST_READ_LINE +# puts $DEFAULT_OUTPUT +# puts $DEFAULT_INPUT +# puts $PROCESS_ID # or $PID +# puts $CHILD_STATUS +# puts $LAST_MATCH_INFO +# puts $IGNORECASE +# puts $ARGV # or ARGV +# @example EnforcedStyle: use_perl_names +# # good # puts $: # puts $" # puts $0 @@ -54060,18 +54059,18 @@ RuboCop::Cop::Style::SpecialGlobalVars::STYLE_VARS_MAP = T.let(T.unsafe(nil), Ha # Check for parentheses around stabby lambda arguments. # There are two different styles. Defaults to `require_parentheses`. # -# @example EnforcedStyle: require_parentheses (default) -# # bad -# ->a,b,c { a + b + c } -# -# # good -# ->(a,b,c) { a + b + c} # @example EnforcedStyle: require_no_parentheses # # bad # ->(a,b,c) { a + b + c } # # # good # ->a,b,c { a + b + c} +# @example EnforcedStyle: require_parentheses (default) +# # bad +# ->a,b,c { a + b + c } +# +# # good +# ->(a,b,c) { a + b + c} # # source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#22 class RuboCop::Cop::Style::StabbyLambdaParentheses < ::RuboCop::Cop::Base @@ -54413,6 +54412,15 @@ RuboCop::Cop::Style::StringHashKeys::MSG = T.let(T.unsafe(nil), String) # Checks if uses of quotes match the configured preference. # +# @example EnforcedStyle: double_quotes +# # bad +# 'Just some text' +# 'No special chars or interpolation' +# +# # good +# "Just some text" +# "No special chars or interpolation" +# "Every string in #{project} uses double_quotes" # @example EnforcedStyle: single_quotes (default) # # bad # "No special symbols" @@ -54424,15 +54432,6 @@ RuboCop::Cop::Style::StringHashKeys::MSG = T.let(T.unsafe(nil), String) # 'No string interpolation' # 'Just text' # "Wait! What's #{this}!" -# @example EnforcedStyle: double_quotes -# # bad -# 'Just some text' -# 'No special chars or interpolation' -# -# # good -# "Just some text" -# "No special chars or interpolation" -# "Every string in #{project} uses double_quotes" # # source://rubocop//lib/rubocop/cop/style/string_literals.rb#29 class RuboCop::Cop::Style::StringLiterals < ::RuboCop::Cop::Base @@ -54498,22 +54497,6 @@ RuboCop::Cop::Style::StringLiterals::MSG_INCONSISTENT = T.let(T.unsafe(nil), Str # Checks that quotes inside string, symbol, and regexp interpolations # match the configured preference. # -# @example EnforcedStyle: single_quotes (default) -# # bad -# string = "Tests #{success ? "PASS" : "FAIL"}" -# symbol = :"Tests #{success ? "PASS" : "FAIL"}" -# heredoc = <<~TEXT -# Tests #{success ? "PASS" : "FAIL"} -# TEXT -# regexp = /Tests #{success ? "PASS" : "FAIL"}/ -# -# # good -# string = "Tests #{success ? 'PASS' : 'FAIL'}" -# symbol = :"Tests #{success ? 'PASS' : 'FAIL'}" -# heredoc = <<~TEXT -# Tests #{success ? 'PASS' : 'FAIL'} -# TEXT -# regexp = /Tests #{success ? 'PASS' : 'FAIL'}/ # @example EnforcedStyle: double_quotes # # bad # string = "Tests #{success ? 'PASS' : 'FAIL'}" @@ -54530,6 +54513,22 @@ RuboCop::Cop::Style::StringLiterals::MSG_INCONSISTENT = T.let(T.unsafe(nil), Str # Tests #{success ? "PASS" : "FAIL"} # TEXT # regexp = /Tests #{success ? "PASS" : "FAIL"}/ +# @example EnforcedStyle: single_quotes (default) +# # bad +# string = "Tests #{success ? "PASS" : "FAIL"}" +# symbol = :"Tests #{success ? "PASS" : "FAIL"}" +# heredoc = <<~TEXT +# Tests #{success ? "PASS" : "FAIL"} +# TEXT +# regexp = /Tests #{success ? "PASS" : "FAIL"}/ +# +# # good +# string = "Tests #{success ? 'PASS' : 'FAIL'}" +# symbol = :"Tests #{success ? 'PASS' : 'FAIL'}" +# heredoc = <<~TEXT +# Tests #{success ? 'PASS' : 'FAIL'} +# TEXT +# regexp = /Tests #{success ? 'PASS' : 'FAIL'}/ # # source://rubocop//lib/rubocop/cop/style/string_literals_in_interpolation.rb#42 class RuboCop::Cop::Style::StringLiteralsInInterpolation < ::RuboCop::Cop::Base @@ -54912,6 +54911,12 @@ RuboCop::Cop::Style::SwapValues::SIMPLE_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), # cop. For example, a `MinSize` of `3` will not enforce a style on an # array of 2 or fewer elements. # +# @example EnforcedStyle: brackets +# # good +# [:foo, :bar, :baz] +# +# # bad +# %i[foo bar baz] # @example EnforcedStyle: percent (default) # # good # %i[foo bar baz] @@ -54927,12 +54932,6 @@ RuboCop::Cop::Style::SwapValues::SIMPLE_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), # # # bad (contains () with spaces) # %i(foo \( \)) -# @example EnforcedStyle: brackets -# # good -# [:foo, :bar, :baz] -# -# # bad -# %i[foo bar baz] # # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#40 class RuboCop::Cop::Style::SymbolArray < ::RuboCop::Cop::Base @@ -55027,20 +55026,28 @@ RuboCop::Cop::Style::SymbolLiteral::MSG = T.let(T.unsafe(nil), String) # `define_method?` methods are allowed by default. # These are customizable with `AllowedMethods` option. # -# @example AllCops:ActiveSupportExtensionsEnabled: true +# @example +# # bad +# something.map { |s| s.upcase } +# something.map { _1.upcase } +# # # good +# something.map(&:upcase) +# @example AllCops:ActiveSupportExtensionsEnabled: false (default) +# # bad # ->(x) { x.foo } # proc { |x| x.foo } # Proc.new { |x| x.foo } -# @example AllowMethodsWithArguments: false (default) -# # bad -# something.do_something(foo) { |o| o.bar } # # # good -# something.do_something(foo, &:bar) -# @example AllowMethodsWithArguments: true +# lambda(&:foo) +# proc(&:foo) +# Proc.new(&:foo) +# @example AllCops:ActiveSupportExtensionsEnabled: true # # good -# something.do_something(foo) { |o| o.bar } +# ->(x) { x.foo } +# proc { |x| x.foo } +# Proc.new { |x| x.foo } # @example AllowComments: false (default) # # bad # something.do_something do |s| # some comment @@ -55055,32 +55062,24 @@ RuboCop::Cop::Style::SymbolLiteral::MSG = T.let(T.unsafe(nil), String) # s.upcase # some comment # # some comment # end +# @example AllowMethodsWithArguments: false (default) +# # bad +# something.do_something(foo) { |o| o.bar } +# +# # good +# something.do_something(foo, &:bar) +# @example AllowMethodsWithArguments: true +# # good +# something.do_something(foo) { |o| o.bar } # @example AllowedMethods: [define_method] (default) # # good # define_method(:foo) { |foo| foo.bar } -# @example AllowedPatterns: [] (default) -# # bad -# something.map { |s| s.upcase } # @example AllowedPatterns: ['map'] (default) # # good # something.map { |s| s.upcase } -# @example AllCops:ActiveSupportExtensionsEnabled: false (default) -# # bad -# ->(x) { x.foo } -# proc { |x| x.foo } -# Proc.new { |x| x.foo } -# -# # good -# lambda(&:foo) -# proc(&:foo) -# Proc.new(&:foo) -# @example +# @example AllowedPatterns: [] (default) # # bad # something.map { |s| s.upcase } -# something.map { _1.upcase } -# -# # good -# something.map(&:upcase) # # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#140 class RuboCop::Cop::Style::SymbolProc < ::RuboCop::Cop::Base @@ -55226,6 +55225,12 @@ end # an assignment to indicate "I know I'm using an assignment # as a condition. It's not a mistake." # +# @example AllowSafeAssignment: false +# # bad +# foo = (bar = baz) ? a : b +# @example AllowSafeAssignment: true (default) +# # good +# foo = (bar = baz) ? a : b # @example EnforcedStyle: require_no_parentheses (default) # # bad # foo = (bar?) ? a : b @@ -55256,12 +55261,6 @@ end # foo = bar? ? a : b # foo = bar.baz? ? a : b # foo = (bar && baz) ? a : b -# @example AllowSafeAssignment: true (default) -# # good -# foo = (bar = baz) ? a : b -# @example AllowSafeAssignment: false -# # bad -# foo = (bar = baz) ? a : b # # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#57 class RuboCop::Cop::Style::TernaryParentheses < ::RuboCop::Cop::Base @@ -55574,14 +55573,14 @@ RuboCop::Cop::Style::TrailingBodyOnModule::MSG = T.let(T.unsafe(nil), String) # Regardless of style, trailing commas are not allowed in # single-line method calls. # -# @example EnforcedStyleForMultiline: consistent_comma +# @example EnforcedStyleForMultiline: comma # # bad # method(1, 2,) # # # good # method(1, 2) # -# # good +# # bad # method( # 1, 2, # 3, @@ -55589,22 +55588,33 @@ RuboCop::Cop::Style::TrailingBodyOnModule::MSG = T.let(T.unsafe(nil), String) # # # good # method( +# 1, 2, +# 3 +# ) +# +# # bad +# method( # 1, 2, 3, # ) # # # good # method( +# 1, 2, 3 +# ) +# +# # good +# method( # 1, # 2, # ) -# @example EnforcedStyleForMultiline: comma +# @example EnforcedStyleForMultiline: consistent_comma # # bad # method(1, 2,) # # # good # method(1, 2) # -# # bad +# # good # method( # 1, 2, # 3, @@ -55612,22 +55622,11 @@ RuboCop::Cop::Style::TrailingBodyOnModule::MSG = T.let(T.unsafe(nil), String) # # # good # method( -# 1, 2, -# 3 -# ) -# -# # bad -# method( # 1, 2, 3, # ) # # # good # method( -# 1, 2, 3 -# ) -# -# # good -# method( # 1, # 2, # ) @@ -55680,37 +55679,6 @@ end # followed by an immediate newline, even if there is an inline comment on the same line. # * `no_comma`: Does not require a comma after the last item in an array # -# @example EnforcedStyleForMultiline: consistent_comma -# # bad -# a = [1, 2,] -# -# # good -# a = [1, 2] -# -# # good -# a = [ -# 1, 2, -# 3, -# ] -# -# # good -# a = [ -# 1, 2, 3, -# ] -# -# # good -# a = [ -# 1, -# 2, -# ] -# -# # bad -# a = [1, 2, -# 3, 4] -# -# # good -# a = [1, 2, -# 3, 4,] # @example EnforcedStyleForMultiline: comma # # bad # a = [1, 2,] @@ -55745,6 +55713,37 @@ end # 1, # 2, # ] +# @example EnforcedStyleForMultiline: consistent_comma +# # bad +# a = [1, 2,] +# +# # good +# a = [1, 2] +# +# # good +# a = [ +# 1, 2, +# 3, +# ] +# +# # good +# a = [ +# 1, 2, 3, +# ] +# +# # good +# a = [ +# 1, +# 2, +# ] +# +# # bad +# a = [1, 2, +# 3, 4] +# +# # good +# a = [1, 2, +# 3, 4,] # @example EnforcedStyleForMultiline: diff_comma # # bad # a = [1, 2,] @@ -55878,7 +55877,7 @@ RuboCop::Cop::Style::TrailingCommaInBlockArgs::MSG = T.let(T.unsafe(nil), String # followed by an immediate newline, even if there is an inline comment on the same line. # * `no_comma`: Does not require a comma after the last item in a hash # -# @example EnforcedStyleForMultiline: consistent_comma +# @example EnforcedStyleForMultiline: comma # # # bad # a = { foo: 1, bar: 2, } @@ -55886,7 +55885,7 @@ RuboCop::Cop::Style::TrailingCommaInBlockArgs::MSG = T.let(T.unsafe(nil), String # # good # a = { foo: 1, bar: 2 } # -# # good +# # bad # a = { # foo: 1, bar: 2, # qux: 3, @@ -55894,23 +55893,26 @@ RuboCop::Cop::Style::TrailingCommaInBlockArgs::MSG = T.let(T.unsafe(nil), String # # # good # a = { +# foo: 1, bar: 2, +# qux: 3 +# } +# +# # bad +# a = { # foo: 1, bar: 2, qux: 3, # } # # # good # a = { -# foo: 1, -# bar: 2, +# foo: 1, bar: 2, qux: 3 # } # -# # bad -# a = { foo: 1, bar: 2, -# baz: 3, qux: 4 } -# # # good -# a = { foo: 1, bar: 2, -# baz: 3, qux: 4, } -# @example EnforcedStyleForMultiline: comma +# a = { +# foo: 1, +# bar: 2, +# } +# @example EnforcedStyleForMultiline: consistent_comma # # # bad # a = { foo: 1, bar: 2, } @@ -55918,7 +55920,7 @@ RuboCop::Cop::Style::TrailingCommaInBlockArgs::MSG = T.let(T.unsafe(nil), String # # good # a = { foo: 1, bar: 2 } # -# # bad +# # good # a = { # foo: 1, bar: 2, # qux: 3, @@ -55926,25 +55928,22 @@ RuboCop::Cop::Style::TrailingCommaInBlockArgs::MSG = T.let(T.unsafe(nil), String # # # good # a = { -# foo: 1, bar: 2, -# qux: 3 -# } -# -# # bad -# a = { # foo: 1, bar: 2, qux: 3, # } # # # good # a = { -# foo: 1, bar: 2, qux: 3 -# } -# -# # good -# a = { # foo: 1, # bar: 2, # } +# +# # bad +# a = { foo: 1, bar: 2, +# baz: 3, qux: 4 } +# +# # good +# a = { foo: 1, bar: 2, +# baz: 3, qux: 4, } # @example EnforcedStyleForMultiline: diff_comma # # # bad @@ -56068,12 +56067,12 @@ RuboCop::Cop::Style::TrailingMethodEndStatement::MSG = T.let(T.unsafe(nil), Stri # # => We need to know to not include 2 variables in a # a, *b, _ = foo() # # => The correction `a, *b, = foo()` is a syntax error -# @example AllowNamedUnderscoreVariables: true (default) -# # good -# a, b, _something = foo() # @example AllowNamedUnderscoreVariables: false # # bad # a, b, _something = foo() +# @example AllowNamedUnderscoreVariables: true (default) +# # good +# a, b, _something = foo() # # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#31 class RuboCop::Cop::Style::TrailingUnderscoreVariable < ::RuboCop::Cop::Base @@ -56139,25 +56138,39 @@ RuboCop::Cop::Style::TrailingUnderscoreVariable::UNDERSCORE = T.let(T.unsafe(nil # `to_open`, `to_path`, `to_proc`, `to_r`, `to_regexp`, `to_str`, `to_s`, and `to_sym` methods # are allowed by default. These are customizable with `AllowedMethods` option. # -# @example AllowedMethods: ['allowed_method'] -# # good -# def allowed_method +# @example +# # bad +# def foo # @foo # end -# @example ExactNameMatch: true (default) +# +# def bar=(val) +# @bar = val +# end +# +# def self.baz +# @baz +# end +# # # good -# def name -# @other_name +# attr_reader :foo +# attr_writer :bar +# +# class << self +# attr_reader :baz # end -# @example ExactNameMatch: false +# @example AllowDSLWriters: false # # bad -# def name -# @other_name +# def on_exception(action) +# @on_exception=action # end -# @example AllowPredicates: true (default) +# # # good -# def foo? -# @foo +# attr_writer :on_exception +# @example AllowDSLWriters: true (default) +# # good +# def on_exception(action) +# @on_exception=action # end # @example AllowPredicates: false # # bad @@ -56167,19 +56180,26 @@ RuboCop::Cop::Style::TrailingUnderscoreVariable::UNDERSCORE = T.let(T.unsafe(nil # # # good # attr_reader :foo -# @example AllowDSLWriters: true (default) +# @example AllowPredicates: true (default) # # good -# def on_exception(action) -# @on_exception=action +# def foo? +# @foo # end -# @example AllowDSLWriters: false +# @example AllowedMethods: ['allowed_method'] +# # good +# def allowed_method +# @foo +# end +# @example ExactNameMatch: false # # bad -# def on_exception(action) -# @on_exception=action +# def name +# @other_name # end -# +# @example ExactNameMatch: true (default) # # good -# attr_writer :on_exception +# def name +# @other_name +# end # @example IgnoreClassMethods: false (default) # # bad # def self.foo @@ -56195,27 +56215,6 @@ RuboCop::Cop::Style::TrailingUnderscoreVariable::UNDERSCORE = T.let(T.unsafe(nil # def self.foo # @foo # end -# @example -# # bad -# def foo -# @foo -# end -# -# def bar=(val) -# @bar = val -# end -# -# def self.baz -# @baz -# end -# -# # good -# attr_reader :foo -# attr_writer :bar -# -# class << self -# attr_reader :baz -# end # # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#98 class RuboCop::Cop::Style::TrivialAccessors < ::RuboCop::Cop::Base @@ -56381,6 +56380,16 @@ RuboCop::Cop::Style::UnlessElse::MSG = T.let(T.unsafe(nil), String) # This makes it even more easy to read the `unless` condition as # there is only one condition in the expression. # +# @example EnforcedStyle: forbid_logical_operators +# # bad +# return unless a || b +# return unless a && b +# return unless a or b +# return unless a and b +# +# # good +# return unless a +# return unless a? # @example EnforcedStyle: forbid_mixed_logical_operators (default) # # bad # return unless a || b && c @@ -56396,16 +56405,6 @@ RuboCop::Cop::Style::UnlessElse::MSG = T.let(T.unsafe(nil), String) # return unless a and b and c # return unless a or b or c # return unless a? -# @example EnforcedStyle: forbid_logical_operators -# # bad -# return unless a || b -# return unless a && b -# return unless a or b -# return unless a and b -# -# # good -# return unless a -# return unless a? # # source://rubocop//lib/rubocop/cop/style/unless_logical_operators.rb#50 class RuboCop::Cop::Style::UnlessLogicalOperators < ::RuboCop::Cop::Base @@ -56644,56 +56643,56 @@ RuboCop::Cop::Style::WhileUntilModifier::MSG = T.let(T.unsafe(nil), String) # cop. For example, a `MinSize` of `3` will not enforce a style on an # array of 2 or fewer elements. # -# @example EnforcedStyle: percent (default) +# @example EnforcedStyle: brackets # # good -# %w[foo bar baz] +# ['foo', 'bar', 'baz'] # # # bad -# ['foo', 'bar', 'baz'] +# %w[foo bar baz] # -# # bad (contains spaces) -# %w[foo\ bar baz\ quux] +# # good (contains spaces) +# ['foo bar', 'baz quux'] # -# # bad +# # good # [ # ['one', 'One'], # ['two', 'Two'] # ] # -# # good +# # bad # [ # %w[one One], # %w[two Two] # ] -# -# # good (2d array containing spaces) -# [ -# ['one', 'One'], -# ['two', 'Two'], -# ['forty two', 'Forty Two'] -# ] -# @example EnforcedStyle: brackets +# @example EnforcedStyle: percent (default) # # good -# ['foo', 'bar', 'baz'] +# %w[foo bar baz] # # # bad -# %w[foo bar baz] +# ['foo', 'bar', 'baz'] # -# # good (contains spaces) -# ['foo bar', 'baz quux'] +# # bad (contains spaces) +# %w[foo\ bar baz\ quux] # -# # good +# # bad # [ # ['one', 'One'], # ['two', 'Two'] # ] # -# # bad +# # good # [ # %w[one One], # %w[two Two] # ] # +# # good (2d array containing spaces) +# [ +# ['one', 'One'], +# ['two', 'Two'], +# ['forty two', 'Forty Two'] +# ] +# # source://rubocop//lib/rubocop/cop/style/word_array.rb#71 class RuboCop::Cop::Style::WordArray < ::RuboCop::Cop::Base include ::RuboCop::Cop::ArrayMinSize @@ -61358,8 +61357,8 @@ end # ) # # comment.encoding # => 'ascii-8bit' -# @see https://www.gnu.org/software/emacs/manual/html_node/emacs/Specify-Coding.html # @see https://github.com/ruby/ruby/blob/3f306dc/parse.y#L6873-L6892 Emacs handling in parse.y +# @see https://www.gnu.org/software/emacs/manual/html_node/emacs/Specify-Coding.html # # source://rubocop//lib/rubocop/magic_comment.rb#190 class RuboCop::MagicComment::EmacsComment < ::RuboCop::MagicComment::EditorComment @@ -61399,14 +61398,14 @@ RuboCop::MagicComment::KEYWORDS = T.let(T.unsafe(nil), Hash) # # Simple comments can only specify one setting per comment. # -# @example frozen string literal comments -# comment1 = RuboCop::MagicComment.parse('# frozen_string_literal: true') -# comment1.frozen_string_literal # => true -# comment1.encoding # => nil # @example encoding comments # comment2 = RuboCop::MagicComment.parse('# encoding: utf-8') # comment2.frozen_string_literal # => nil # comment2.encoding # => 'utf-8' +# @example frozen string literal comments +# comment1 = RuboCop::MagicComment.parse('# frozen_string_literal: true') +# comment1.frozen_string_literal # => true +# comment1.encoding # => nil # # source://rubocop//lib/rubocop/magic_comment.rb#265 class RuboCop::MagicComment::SimpleComment < ::RuboCop::MagicComment @@ -62267,14 +62266,6 @@ module RuboCop::RSpec; end # # If you need to specify an offense on a blank line, use the empty `^{}` marker: # -# @example Usage -# -# expect_offense(<<~RUBY) -# a do -# b -# end.c -# ^^^^^ Avoid chaining a method call on a do...end block. -# RUBY # @example Equivalent assertion without `expect_offense` # # inspect_source(<<~RUBY) @@ -62291,6 +62282,21 @@ module RuboCop::RSpec; end # expect(offense.message).to eql( # 'Avoid chaining a method call on a do...end block.' # ) +# @example Usage +# +# expect_offense(<<~RUBY) +# a do +# b +# end.c +# ^^^^^ Avoid chaining a method call on a do...end block. +# RUBY +# @example `^{}` empty line offense +# +# expect_offense(<<~RUBY) +# +# ^{} Missing frozen string literal comment. +# puts 1 +# RUBY # @example `expect_offense` and `expect_correction` # # expect_offense(<<~RUBY) @@ -62311,13 +62317,6 @@ module RuboCop::RSpec; end # RUBY # # expect_no_corrections -# @example `^{}` empty line offense -# -# expect_offense(<<~RUBY) -# -# ^{} Missing frozen string literal comment. -# puts 1 -# RUBY # # source://rubocop//lib/rubocop/rspec/expect_offense.rb#109 module RuboCop::RSpec::ExpectOffense @@ -62354,8 +62353,8 @@ end class RuboCop::RSpec::ExpectOffense::AnnotatedSource # @note annotations are sorted so that reconstructing the annotation # text via {#to_s} is deterministic - # @param lines [Array] # @param annotations [Array<(Integer, String)>] each entry is the annotated line number and the annotation text + # @param lines [Array] # @return [AnnotatedSource] a new instance of AnnotatedSource # # source://rubocop//lib/rubocop/rspec/expect_offense.rb#265 diff --git a/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi b/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi index 7300ec9662..f32c6ed8e7 100644 --- a/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +++ b/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi @@ -23,7 +23,7 @@ class ProgressBar::Base def initialize(options = T.unsafe(nil)); end # source://ruby-progressbar//lib/ruby-progressbar/base.rb#36 - def clear(*args, **_arg1, &block); end + def clear(*_arg0, **_arg1, &_arg2); end # source://ruby-progressbar//lib/ruby-progressbar/base.rb#137 def decrement; end @@ -49,7 +49,7 @@ class ProgressBar::Base def inspect; end # source://ruby-progressbar//lib/ruby-progressbar/base.rb#36 - def log(*args, **_arg1, &block); end + def log(*_arg0, **_arg1, &_arg2); end # source://ruby-progressbar//lib/ruby-progressbar/base.rb#102 def pause; end @@ -60,7 +60,7 @@ class ProgressBar::Base def paused?; end # source://ruby-progressbar//lib/ruby-progressbar/base.rb#41 - def progress(*args, **_arg1, &block); end + def progress(*_arg0, **_arg1, &_arg2); end # source://ruby-progressbar//lib/ruby-progressbar/base.rb#145 def progress=(new_progress); end @@ -69,7 +69,7 @@ class ProgressBar::Base def progress_mark=(mark); end # source://ruby-progressbar//lib/ruby-progressbar/base.rb#36 - def refresh(*args, **_arg1, &block); end + def refresh(*_arg0, **_arg1, &_arg2); end # source://ruby-progressbar//lib/ruby-progressbar/base.rb#157 def remainder_mark=(mark); end @@ -109,7 +109,7 @@ class ProgressBar::Base def to_s(new_format = T.unsafe(nil)); end # source://ruby-progressbar//lib/ruby-progressbar/base.rb#41 - def total(*args, **_arg1, &block); end + def total(*_arg0, **_arg1, &_arg2); end # source://ruby-progressbar//lib/ruby-progressbar/base.rb#149 def total=(new_total); end diff --git a/sorbet/rbi/gems/spoom@1.7.4.rbi b/sorbet/rbi/gems/spoom@1.7.11.rbi similarity index 94% rename from sorbet/rbi/gems/spoom@1.7.4.rbi rename to sorbet/rbi/gems/spoom@1.7.11.rbi index 21952b88e3..b020c15c4e 100644 --- a/sorbet/rbi/gems/spoom@1.7.4.rbi +++ b/sorbet/rbi/gems/spoom@1.7.11.rbi @@ -9,14 +9,14 @@ # DO NOT EDIT MANUALLY # This is an autogenerated file for types exported from the `spoom` gem. -# Please instead update this file by running `spoom srb sigs export`. +# Please instead update this file by running `bundle exec spoom srb sigs export`. # source://spoom//lib/spoom.rb#7 module Spoom class << self # source://spoom//lib/spoom/parse.rb#11 - sig { params(ruby: ::String, file: ::String, comments: T::Boolean).returns(::Prism::Node) } - def parse_ruby(ruby, file:, comments: T.unsafe(nil)); end + sig { params(ruby: ::String, file: ::String).returns([::Prism::Node, T::Array[::Prism::Comment]]) } + def parse_ruby(ruby, file:); end end end @@ -33,6 +33,22 @@ end # source://spoom//lib/spoom/backtrace_filter/minitest.rb#9 Spoom::BacktraceFilter::Minitest::SORBET_PATHS = T.let(T.unsafe(nil), Array) +# source://spoom//lib/spoom/bundler_helper.rb#5 +module Spoom::BundlerHelper + class << self + # Generate a gem requirement for the given gem name, using that gem's version in the "real" current bundle. + # + # This ensures that any child Spoom::Contexts use predictable gem versions, + # without having to manually specify them and bump them to stay in sync with Spoom's real Gemfile. + # + # Given `"foo"`, returns a string like 'gem "foo", "= 1.2.3"', suitable for inserting into a Gemfile. + # + # source://spoom//lib/spoom/bundler_helper.rb#16 + sig { params(gem_name: ::String).returns(::String) } + def gem_requirement_from_real_bundle(gem_name); end + end +end + # source://spoom//lib/spoom/cli/helper.rb#9 module Spoom::Cli; end @@ -202,10 +218,10 @@ class Spoom::Cli::Srb::Assertions < ::Thor # source://spoom//lib/spoom/cli/srb.rb#17 def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end - # source://spoom//lib/spoom/cli/srb/assertions.rb#29 + # source://spoom//lib/spoom/cli/srb/assertions.rb#42 def transform_files(files, &block); end - # source://spoom//lib/spoom/cli/srb/assertions.rb#13 + # source://spoom//lib/spoom/cli/srb/assertions.rb#18 def translate(*paths); end end @@ -361,27 +377,27 @@ class Spoom::Cli::Srb::Metrics < ::Thor def show(*paths); end end -# source://spoom//lib/spoom/cli/srb/sigs.rb#7 +# source://spoom//lib/spoom/cli/srb/sigs.rb#9 class Spoom::Cli::Srb::Sigs < ::Thor include ::Spoom::Colorize include ::Spoom::Cli::Helper - # source://spoom//lib/spoom/cli/srb/sigs.rb#216 + # source://spoom//lib/spoom/cli/srb/sigs.rb#226 def exec(context, command); end - # source://spoom//lib/spoom/cli/srb/sigs.rb#87 + # source://spoom//lib/spoom/cli/srb/sigs.rb#95 def export(output_path = T.unsafe(nil)); end # source://spoom//lib/spoom/cli/srb.rb#32 def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end - # source://spoom//lib/spoom/cli/srb/sigs.rb#68 + # source://spoom//lib/spoom/cli/srb/sigs.rb#76 def strip(*paths); end - # source://spoom//lib/spoom/cli/srb/sigs.rb#193 + # source://spoom//lib/spoom/cli/srb/sigs.rb#203 def transform_files(files, &block); end - # source://spoom//lib/spoom/cli/srb/sigs.rb#20 + # source://spoom//lib/spoom/cli/srb/sigs.rb#25 def translate(*paths); end end @@ -549,13 +565,13 @@ end # Execution features for a context # -# source://spoom//lib/spoom/context/exec.rb#26 +# source://spoom//lib/spoom/context/exec.rb#28 module Spoom::Context::Exec requires_ancestor { Spoom::Context } # Run a command in this context directory # - # source://spoom//lib/spoom/context/exec.rb#29 + # source://spoom//lib/spoom/context/exec.rb#31 sig { params(command: ::String, capture_err: T::Boolean).returns(::Spoom::ExecResult) } def exec(command, capture_err: T.unsafe(nil)); end end @@ -572,7 +588,7 @@ module Spoom::Context::FileSystem sig { params(relative_path: ::String).returns(::String) } def absolute_path_to(relative_path); end - # source://spoom//lib/spoom/context/file_system.rb#43 + # source://spoom//lib/spoom/context/file_system.rb#47 sig do params( allow_extensions: T::Array[::String], @@ -586,7 +602,7 @@ module Spoom::Context::FileSystem # # Warning: it will `rm -rf` the context directory on the file system. # - # source://spoom//lib/spoom/context/file_system.rb#95 + # source://spoom//lib/spoom/context/file_system.rb#99 sig { void } def destroy!; end @@ -602,7 +618,7 @@ module Spoom::Context::FileSystem # # @return [Boolean] # - # source://spoom//lib/spoom/context/file_system.rb#55 + # source://spoom//lib/spoom/context/file_system.rb#59 sig { params(relative_path: ::String).returns(T::Boolean) } def file?(relative_path); end @@ -626,7 +642,7 @@ module Spoom::Context::FileSystem # Move the file or directory from `from_relative_path` to `to_relative_path` # - # source://spoom//lib/spoom/context/file_system.rb#85 + # source://spoom//lib/spoom/context/file_system.rb#89 sig { params(from_relative_path: ::String, to_relative_path: ::String).void } def move!(from_relative_path, to_relative_path); end @@ -634,13 +650,13 @@ module Spoom::Context::FileSystem # # Will raise if the file doesn't exist. # - # source://spoom//lib/spoom/context/file_system.rb#63 + # source://spoom//lib/spoom/context/file_system.rb#67 sig { params(relative_path: ::String).returns(::String) } def read(relative_path); end # Remove the path at `relative_path` (recursive + force) in this context directory # - # source://spoom//lib/spoom/context/file_system.rb#79 + # source://spoom//lib/spoom/context/file_system.rb#83 sig { params(relative_path: ::String).void } def remove!(relative_path); end @@ -648,7 +664,7 @@ module Spoom::Context::FileSystem # # Append to the file if `append` is true. # - # source://spoom//lib/spoom/context/file_system.rb#71 + # source://spoom//lib/spoom/context/file_system.rb#75 sig { params(relative_path: ::String, contents: ::String, append: T::Boolean).void } def write!(relative_path, contents = T.unsafe(nil), append: T.unsafe(nil)); end end @@ -911,6 +927,7 @@ class Spoom::Coverage::Cards::Erb < ::Spoom::Coverage::Cards::Card def initialize; end # @abstract + # @raise [NotImplementedError] # # source://spoom//lib/spoom/coverage/report.rb#109 sig { abstract.returns(::String) } @@ -925,7 +942,7 @@ end class Spoom::Coverage::Cards::Map < ::Spoom::Coverage::Cards::Card # @return [Map] a new instance of Map # - # source://spoom//lib/spoom/coverage/report.rb#142 + # source://spoom//lib/spoom/coverage/report.rb#147 sig do params( file_tree: ::Spoom::FileTree, @@ -965,78 +982,78 @@ end # source://spoom//lib/spoom/coverage/report.rb#113 Spoom::Coverage::Cards::Snapshot::TEMPLATE = T.let(T.unsafe(nil), String) -# source://spoom//lib/spoom/coverage/report.rb#204 +# source://spoom//lib/spoom/coverage/report.rb#209 class Spoom::Coverage::Cards::SorbetIntro < ::Spoom::Coverage::Cards::Erb # @return [SorbetIntro] a new instance of SorbetIntro # - # source://spoom//lib/spoom/coverage/report.rb#206 + # source://spoom//lib/spoom/coverage/report.rb#211 sig { params(sorbet_intro_commit: T.nilable(::String), sorbet_intro_date: T.nilable(::Time)).void } def initialize(sorbet_intro_commit: T.unsafe(nil), sorbet_intro_date: T.unsafe(nil)); end - # source://spoom//lib/spoom/coverage/report.rb#213 + # source://spoom//lib/spoom/coverage/report.rb#218 sig { override.returns(::String) } def erb; end end -# source://spoom//lib/spoom/coverage/report.rb#155 +# source://spoom//lib/spoom/coverage/report.rb#160 class Spoom::Coverage::Cards::Timeline < ::Spoom::Coverage::Cards::Card # @return [Timeline] a new instance of Timeline # - # source://spoom//lib/spoom/coverage/report.rb#157 + # source://spoom//lib/spoom/coverage/report.rb#162 sig { params(title: ::String, timeline: ::Spoom::Coverage::D3::Timeline).void } def initialize(title:, timeline:); end end -# source://spoom//lib/spoom/coverage/report.rb#168 +# source://spoom//lib/spoom/coverage/report.rb#173 class Spoom::Coverage::Cards::Timeline::Calls < ::Spoom::Coverage::Cards::Timeline # @return [Calls] a new instance of Calls # - # source://spoom//lib/spoom/coverage/report.rb#170 + # source://spoom//lib/spoom/coverage/report.rb#175 sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void } def initialize(snapshots:, title: T.unsafe(nil)); end end -# source://spoom//lib/spoom/coverage/report.rb#182 +# source://spoom//lib/spoom/coverage/report.rb#187 class Spoom::Coverage::Cards::Timeline::RBIs < ::Spoom::Coverage::Cards::Timeline # @return [RBIs] a new instance of RBIs # - # source://spoom//lib/spoom/coverage/report.rb#184 + # source://spoom//lib/spoom/coverage/report.rb#189 sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void } def initialize(snapshots:, title: T.unsafe(nil)); end end -# source://spoom//lib/spoom/coverage/report.rb#196 +# source://spoom//lib/spoom/coverage/report.rb#201 class Spoom::Coverage::Cards::Timeline::Runtimes < ::Spoom::Coverage::Cards::Timeline # @return [Runtimes] a new instance of Runtimes # - # source://spoom//lib/spoom/coverage/report.rb#198 + # source://spoom//lib/spoom/coverage/report.rb#203 sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void } def initialize(snapshots:, title: T.unsafe(nil)); end end -# source://spoom//lib/spoom/coverage/report.rb#161 +# source://spoom//lib/spoom/coverage/report.rb#166 class Spoom::Coverage::Cards::Timeline::Sigils < ::Spoom::Coverage::Cards::Timeline # @return [Sigils] a new instance of Sigils # - # source://spoom//lib/spoom/coverage/report.rb#163 + # source://spoom//lib/spoom/coverage/report.rb#168 sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void } def initialize(snapshots:, title: T.unsafe(nil)); end end -# source://spoom//lib/spoom/coverage/report.rb#175 +# source://spoom//lib/spoom/coverage/report.rb#180 class Spoom::Coverage::Cards::Timeline::Sigs < ::Spoom::Coverage::Cards::Timeline # @return [Sigs] a new instance of Sigs # - # source://spoom//lib/spoom/coverage/report.rb#177 + # source://spoom//lib/spoom/coverage/report.rb#182 sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void } def initialize(snapshots:, title: T.unsafe(nil)); end end -# source://spoom//lib/spoom/coverage/report.rb#189 +# source://spoom//lib/spoom/coverage/report.rb#194 class Spoom::Coverage::Cards::Timeline::Versions < ::Spoom::Coverage::Cards::Timeline # @return [Versions] a new instance of Versions # - # source://spoom//lib/spoom/coverage/report.rb#191 + # source://spoom//lib/spoom/coverage/report.rb#196 sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void } def initialize(snapshots:, title: T.unsafe(nil)); end end @@ -1075,6 +1092,7 @@ class Spoom::Coverage::D3::Base def id; end # @abstract + # @raise [NotImplementedError] # # source://spoom//lib/spoom/coverage/d3/base.rb#45 sig { abstract.returns(::String) } @@ -1131,7 +1149,7 @@ end class Spoom::Coverage::D3::CircleMap::Sigils < ::Spoom::Coverage::D3::CircleMap # @return [Sigils] a new instance of Sigils # - # source://spoom//lib/spoom/coverage/d3/circle_map.rb#149 + # source://spoom//lib/spoom/coverage/d3/circle_map.rb#154 sig do params( id: ::String, @@ -1142,7 +1160,7 @@ class Spoom::Coverage::D3::CircleMap::Sigils < ::Spoom::Coverage::D3::CircleMap end def initialize(id, file_tree, nodes_strictnesses, nodes_scores); end - # source://spoom//lib/spoom/coverage/d3/circle_map.rb#156 + # source://spoom//lib/spoom/coverage/d3/circle_map.rb#161 sig { params(node: ::Spoom::FileTree::Node).returns(T::Hash[::Symbol, T.untyped]) } def tree_node_to_json(node); end end @@ -1243,6 +1261,7 @@ class Spoom::Coverage::D3::Timeline < ::Spoom::Coverage::D3::Base def line(y:, color: T.unsafe(nil), curve: T.unsafe(nil)); end # @abstract + # @raise [NotImplementedError] # # source://spoom//lib/spoom/coverage/d3/timeline.rb#122 sig { abstract.returns(::String) } @@ -1417,6 +1436,7 @@ class Spoom::Coverage::Page < ::Spoom::Coverage::Template def body_html; end # @abstract + # @raise [NotImplementedError] # # source://spoom//lib/spoom/coverage/report.rb#73 sig { abstract.returns(T::Array[::Spoom::Coverage::Cards::Card]) } @@ -1450,11 +1470,11 @@ end # source://spoom//lib/spoom/coverage/report.rb#36 Spoom::Coverage::Page::TEMPLATE = T.let(T.unsafe(nil), String) -# source://spoom//lib/spoom/coverage/report.rb#224 +# source://spoom//lib/spoom/coverage/report.rb#229 class Spoom::Coverage::Report < ::Spoom::Coverage::Page # @return [Report] a new instance of Report # - # source://spoom//lib/spoom/coverage/report.rb#226 + # source://spoom//lib/spoom/coverage/report.rb#240 sig do params( project_name: ::String, @@ -1469,11 +1489,11 @@ class Spoom::Coverage::Report < ::Spoom::Coverage::Page end def initialize(project_name:, palette:, snapshots:, file_tree:, nodes_strictnesses:, nodes_strictness_scores:, sorbet_intro_commit: T.unsafe(nil), sorbet_intro_date: T.unsafe(nil)); end - # source://spoom//lib/spoom/coverage/report.rb#260 + # source://spoom//lib/spoom/coverage/report.rb#274 sig { override.returns(T::Array[::Spoom::Coverage::Cards::Card]) } def cards; end - # source://spoom//lib/spoom/coverage/report.rb#248 + # source://spoom//lib/spoom/coverage/report.rb#262 sig { override.returns(::String) } def header_html; end end @@ -2594,14 +2614,14 @@ end # source://spoom//lib/spoom.rb#10 class Spoom::Error < ::StandardError; end -# source://spoom//lib/spoom/context/exec.rb#5 +# source://spoom//lib/spoom/context/exec.rb#7 class Spoom::ExecResult < ::T::Struct const :out, ::String const :err, T.nilable(::String) const :status, T::Boolean const :exit_code, ::Integer - # source://spoom//lib/spoom/context/exec.rb#12 + # source://spoom//lib/spoom/context/exec.rb#14 sig { returns(::String) } def to_s; end end @@ -3165,6 +3185,7 @@ module Spoom::LSP::PrintableSymbol interface! # @abstract + # @raise [NotImplementedError] # # source://spoom//lib/spoom/sorbet/lsp/structures.rb#13 sig { abstract.params(printer: ::Spoom::LSP::SymbolPrinter).void } @@ -3373,7 +3394,7 @@ class Spoom::Location::LocationError < ::Spoom::Error; end class Spoom::Model # @return [Model] a new instance of Model # - # source://spoom//lib/spoom/model/model.rb#227 + # source://spoom//lib/spoom/model/model.rb#240 sig { void } def initialize; end @@ -3383,11 +3404,11 @@ class Spoom::Model # # @raise [Error] # - # source://spoom//lib/spoom/model/model.rb#236 + # source://spoom//lib/spoom/model/model.rb#249 sig { params(full_name: ::String).returns(::Spoom::Model::Symbol) } def [](full_name); end - # source://spoom//lib/spoom/model/model.rb#285 + # source://spoom//lib/spoom/model/model.rb#298 sig { void } def finalize!; end @@ -3395,53 +3416,53 @@ class Spoom::Model # # If the symbol already exists, it will be returned. # - # source://spoom//lib/spoom/model/model.rb#247 + # source://spoom//lib/spoom/model/model.rb#260 sig { params(full_name: ::String).returns(::Spoom::Model::Symbol) } def register_symbol(full_name); end - # source://spoom//lib/spoom/model/model.rb#252 + # source://spoom//lib/spoom/model/model.rb#265 sig { params(full_name: ::String, context: ::Spoom::Model::Symbol).returns(::Spoom::Model::Symbol) } def resolve_symbol(full_name, context:); end - # source://spoom//lib/spoom/model/model.rb#279 + # source://spoom//lib/spoom/model/model.rb#292 sig { params(symbol: ::Spoom::Model::Symbol).returns(T::Array[::Spoom::Model::Symbol]) } def subtypes(symbol); end - # source://spoom//lib/spoom/model/model.rb#273 + # source://spoom//lib/spoom/model/model.rb#286 sig { params(symbol: ::Spoom::Model::Symbol).returns(T::Array[::Spoom::Model::Symbol]) } def supertypes(symbol); end # All the symbols registered in this model # - # source://spoom//lib/spoom/model/model.rb#221 + # source://spoom//lib/spoom/model/model.rb#234 sig { returns(T::Hash[::String, ::Spoom::Model::Symbol]) } def symbols; end - # source://spoom//lib/spoom/model/model.rb#224 + # source://spoom//lib/spoom/model/model.rb#237 sig { returns(Spoom::Poset[::Spoom::Model::Symbol]) } def symbols_hierarchy; end private - # source://spoom//lib/spoom/model/model.rb#292 + # source://spoom//lib/spoom/model/model.rb#305 sig { void } def compute_symbols_hierarchy!; end end # @abstract # -# source://spoom//lib/spoom/model/model.rb#175 +# source://spoom//lib/spoom/model/model.rb#188 class Spoom::Model::Attr < ::Spoom::Model::Property abstract! end -# source://spoom//lib/spoom/model/model.rb#180 +# source://spoom//lib/spoom/model/model.rb#193 class Spoom::Model::AttrAccessor < ::Spoom::Model::Attr; end -# source://spoom//lib/spoom/model/model.rb#178 +# source://spoom//lib/spoom/model/model.rb#191 class Spoom::Model::AttrReader < ::Spoom::Model::Attr; end -# source://spoom//lib/spoom/model/model.rb#179 +# source://spoom//lib/spoom/model/model.rb#192 class Spoom::Model::AttrWriter < ::Spoom::Model::Attr; end # Populate a Model by visiting the nodes from a Ruby file @@ -3509,7 +3530,7 @@ end class Spoom::Model::Class < ::Spoom::Model::Namespace # @return [Class] a new instance of Class # - # source://spoom//lib/spoom/model/model.rb#133 + # source://spoom//lib/spoom/model/model.rb#139 sig do params( symbol: ::Spoom::Model::Symbol, @@ -3546,11 +3567,11 @@ class Spoom::Model::Comment def string; end end -# source://spoom//lib/spoom/model/model.rb#142 +# source://spoom//lib/spoom/model/model.rb#148 class Spoom::Model::Constant < ::Spoom::Model::SymbolDef # @return [Constant] a new instance of Constant # - # source://spoom//lib/spoom/model/model.rb#147 + # source://spoom//lib/spoom/model/model.rb#153 sig do params( symbol: ::Spoom::Model::Symbol, @@ -3562,7 +3583,7 @@ class Spoom::Model::Constant < ::Spoom::Model::SymbolDef end def initialize(symbol, owner:, location:, value:, comments: T.unsafe(nil)); end - # source://spoom//lib/spoom/model/model.rb#144 + # source://spoom//lib/spoom/model/model.rb#150 sig { returns(::String) } def value; end end @@ -3570,35 +3591,35 @@ end # source://spoom//lib/spoom/model/model.rb#6 class Spoom::Model::Error < ::Spoom::Error; end -# source://spoom//lib/spoom/model/model.rb#204 +# source://spoom//lib/spoom/model/model.rb#217 class Spoom::Model::Extend < ::Spoom::Model::Mixin; end -# source://spoom//lib/spoom/model/model.rb#202 +# source://spoom//lib/spoom/model/model.rb#215 class Spoom::Model::Include < ::Spoom::Model::Mixin; end -# source://spoom//lib/spoom/model/model.rb#172 +# source://spoom//lib/spoom/model/model.rb#185 class Spoom::Model::Method < ::Spoom::Model::Property; end # A mixin (include, prepend, extend) to a namespace # # @abstract # -# source://spoom//lib/spoom/model/model.rb#192 +# source://spoom//lib/spoom/model/model.rb#205 class Spoom::Model::Mixin abstract! # @return [Mixin] a new instance of Mixin # - # source://spoom//lib/spoom/model/model.rb#197 + # source://spoom//lib/spoom/model/model.rb#210 sig { params(name: ::String).void } def initialize(name); end - # source://spoom//lib/spoom/model/model.rb#194 + # source://spoom//lib/spoom/model/model.rb#207 sig { returns(::String) } def name; end end -# source://spoom//lib/spoom/model/model.rb#140 +# source://spoom//lib/spoom/model/model.rb#146 class Spoom::Model::Module < ::Spoom::Model::Namespace; end # A class or module @@ -3648,20 +3669,20 @@ class Spoom::Model::NamespaceVisitor < ::Spoom::Visitor def visit(node); end end -# source://spoom//lib/spoom/model/model.rb#203 +# source://spoom//lib/spoom/model/model.rb#216 class Spoom::Model::Prepend < ::Spoom::Model::Mixin; end # A method or an attribute accessor # # @abstract # -# source://spoom//lib/spoom/model/model.rb#156 +# source://spoom//lib/spoom/model/model.rb#162 class Spoom::Model::Property < ::Spoom::Model::SymbolDef abstract! # @return [Property] a new instance of Property # - # source://spoom//lib/spoom/model/model.rb#164 + # source://spoom//lib/spoom/model/model.rb#177 sig do params( symbol: ::Spoom::Model::Symbol, @@ -3674,11 +3695,11 @@ class Spoom::Model::Property < ::Spoom::Model::SymbolDef end def initialize(symbol, owner:, location:, visibility:, sigs: T.unsafe(nil), comments: T.unsafe(nil)); end - # source://spoom//lib/spoom/model/model.rb#161 + # source://spoom//lib/spoom/model/model.rb#167 sig { returns(T::Array[::Spoom::Model::Sig]) } def sigs; end - # source://spoom//lib/spoom/model/model.rb#158 + # source://spoom//lib/spoom/model/model.rb#164 sig { returns(::Spoom::Model::Visibility) } def visibility; end end @@ -3844,15 +3865,15 @@ end # A Sorbet signature (sig block) # -# source://spoom//lib/spoom/model/model.rb#207 +# source://spoom//lib/spoom/model/model.rb#220 class Spoom::Model::Sig # @return [Sig] a new instance of Sig # - # source://spoom//lib/spoom/model/model.rb#212 + # source://spoom//lib/spoom/model/model.rb#225 sig { params(string: ::String).void } def initialize(string); end - # source://spoom//lib/spoom/model/model.rb#209 + # source://spoom//lib/spoom/model/model.rb#222 sig { returns(::String) } def string; end end @@ -3965,7 +3986,7 @@ class Spoom::Model::UnresolvedSymbol < ::Spoom::Model::Symbol def to_s; end end -# source://spoom//lib/spoom/model/model.rb#182 +# source://spoom//lib/spoom/model/model.rb#195 class Spoom::Model::Visibility < ::T::Enum enums do Private = new @@ -4202,22 +4223,22 @@ end # source://spoom//lib/spoom/rbs.rb#5 module Spoom::RBS; end -# source://spoom//lib/spoom/rbs.rb#65 +# source://spoom//lib/spoom/rbs.rb#71 class Spoom::RBS::Annotation < ::Spoom::RBS::Comment; end -# source://spoom//lib/spoom/rbs.rb#51 +# source://spoom//lib/spoom/rbs.rb#57 class Spoom::RBS::Comment # @return [Comment] a new instance of Comment # - # source://spoom//lib/spoom/rbs.rb#59 + # source://spoom//lib/spoom/rbs.rb#65 sig { params(string: ::String, location: ::Prism::Location).void } def initialize(string, location); end - # source://spoom//lib/spoom/rbs.rb#56 + # source://spoom//lib/spoom/rbs.rb#62 sig { returns(::Prism::Location) } def location; end - # source://spoom//lib/spoom/rbs.rb#53 + # source://spoom//lib/spoom/rbs.rb#59 sig { returns(::String) } def string; end end @@ -4253,16 +4274,19 @@ class Spoom::RBS::Comments def signatures; end end -# source://spoom//lib/spoom/rbs.rb#68 +# source://spoom//lib/spoom/rbs.rb#75 module Spoom::RBS::ExtractRBSComments - # source://spoom//lib/spoom/rbs.rb#70 + # source://spoom//lib/spoom/rbs.rb#77 sig { params(node: ::Prism::Node).returns(::Spoom::RBS::Comments) } def node_rbs_comments(node); end end -# source://spoom//lib/spoom/rbs.rb#66 +# source://spoom//lib/spoom/rbs.rb#72 class Spoom::RBS::Signature < ::Spoom::RBS::Comment; end +# source://spoom//lib/spoom/rbs.rb#73 +class Spoom::RBS::TypeAlias < ::Spoom::RBS::Comment; end + # source://spoom//lib/spoom.rb#8 Spoom::SPOOM_PATH = T.let(T.unsafe(nil), String) @@ -4715,30 +4739,43 @@ module Spoom::Sorbet::Translate # Converts all the RBS comments in the given Ruby code to `sig` nodes. # It also handles type members and class annotations. # - # source://spoom//lib/spoom/sorbet/translate.rb#36 + # source://spoom//lib/spoom/sorbet/translate.rb#57 sig { params(ruby_contents: ::String, file: ::String, max_line_length: T.nilable(::Integer)).returns(::String) } def rbs_comments_to_sorbet_sigs(ruby_contents, file:, max_line_length: T.unsafe(nil)); end # Converts all `T.let` and `T.cast` nodes to RBS comments in the given Ruby code. # It also handles type members and class annotations. # - # source://spoom//lib/spoom/sorbet/translate.rb#43 - sig { params(ruby_contents: ::String, file: ::String).returns(::String) } - def sorbet_assertions_to_rbs_comments(ruby_contents, file:); end + # source://spoom//lib/spoom/sorbet/translate.rb#72 + sig do + params( + ruby_contents: ::String, + file: ::String, + translate_t_let: T::Boolean, + translate_t_cast: T::Boolean, + translate_t_bind: T::Boolean, + translate_t_must: T::Boolean, + translate_t_unsafe: T::Boolean + ).returns(::String) + end + def sorbet_assertions_to_rbs_comments(ruby_contents, file:, translate_t_let: T.unsafe(nil), translate_t_cast: T.unsafe(nil), translate_t_bind: T.unsafe(nil), translate_t_must: T.unsafe(nil), translate_t_unsafe: T.unsafe(nil)); end # Converts all `sig` nodes to RBS comments in the given Ruby code. # It also handles type members and class annotations. # - # source://spoom//lib/spoom/sorbet/translate.rb#29 + # source://spoom//lib/spoom/sorbet/translate.rb#37 sig do params( ruby_contents: ::String, file: ::String, positional_names: T::Boolean, - max_line_length: T.nilable(::Integer) + max_line_length: T.nilable(::Integer), + translate_generics: T::Boolean, + translate_helpers: T::Boolean, + translate_abstract_methods: T::Boolean ).returns(::String) end - def sorbet_sigs_to_rbs_comments(ruby_contents, file:, positional_names: T.unsafe(nil), max_line_length: T.unsafe(nil)); end + def sorbet_sigs_to_rbs_comments(ruby_contents, file:, positional_names: T.unsafe(nil), max_line_length: T.unsafe(nil), translate_generics: T.unsafe(nil), translate_helpers: T.unsafe(nil), translate_abstract_methods: T.unsafe(nil)); end # Deletes all `sig` nodes from the given Ruby code. # It doesn't handle type members and class annotations. @@ -4762,23 +4799,27 @@ class Spoom::Sorbet::Translate::RBSCommentsToSorbetSigs < ::Spoom::Sorbet::Trans sig { params(ruby_contents: ::String, file: ::String, max_line_length: T.nilable(::Integer)).void } def initialize(ruby_contents, file:, max_line_length: T.unsafe(nil)); end - # source://spoom//lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb#73 + # source://spoom//lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb#59 sig { override.params(node: ::Prism::CallNode).void } def visit_call_node(node); end - # source://spoom//lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb#19 + # source://spoom//lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb#29 sig { override.params(node: ::Prism::ClassNode).void } def visit_class_node(node); end - # source://spoom//lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb#43 + # source://spoom//lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb#53 sig { override.params(node: ::Prism::DefNode).void } def visit_def_node(node); end - # source://spoom//lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb#27 + # source://spoom//lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb#37 sig { override.params(node: ::Prism::ModuleNode).void } def visit_module_node(node); end - # source://spoom//lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb#35 + # source://spoom//lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb#19 + sig { override.params(node: ::Prism::ProgramNode).void } + def visit_program_node(node); end + + # source://spoom//lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb#45 sig { override.params(node: ::Prism::SingletonClassNode).void } def visit_singleton_class_node(node); end @@ -4786,7 +4827,7 @@ class Spoom::Sorbet::Translate::RBSCommentsToSorbetSigs < ::Spoom::Sorbet::Trans # @return [Boolean] # - # source://spoom//lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb#242 + # source://spoom//lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb#273 sig do params( node: T.any(::Prism::ClassNode, ::Prism::ModuleNode, ::Prism::SingletonClassNode), @@ -4795,15 +4836,27 @@ class Spoom::Sorbet::Translate::RBSCommentsToSorbetSigs < ::Spoom::Sorbet::Trans end def already_extends?(node, constant_regex); end - # source://spoom//lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb#123 + # source://spoom//lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb#151 sig { params(node: T.any(::Prism::ClassNode, ::Prism::ModuleNode, ::Prism::SingletonClassNode)).void } def apply_class_annotations(node); end - # source://spoom//lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb#221 + # source://spoom//lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb#249 sig { params(annotations: T::Array[::Spoom::RBS::Annotation], sig: ::RBI::Sig).void } def apply_member_annotations(annotations, sig); end - # source://spoom//lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb#85 + # source://spoom//lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb#325 + sig { params(comments: T::Array[::Prism::Comment]).void } + def apply_type_aliases(comments); end + + # source://spoom//lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb#289 + sig { params(comments: T::Array[::Prism::Comment]).returns(T::Array[::Spoom::RBS::TypeAlias]) } + def collect_type_aliases(comments); end + + # source://spoom//lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb#115 + sig { params(def_node: ::Prism::DefNode, comments: ::Spoom::RBS::Comments).void } + def rewrite_def(def_node, comments); end + + # source://spoom//lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb#77 sig { params(node: ::Prism::CallNode).void } def visit_attr(node); end end @@ -4812,11 +4865,27 @@ end # # source://spoom//lib/spoom/sorbet/translate/sorbet_assertions_to_rbs_comments.rb#8 class Spoom::Sorbet::Translate::SorbetAssertionsToRBSComments < ::Spoom::Sorbet::Translate::Translator - # source://spoom//lib/spoom/sorbet/translate/sorbet_assertions_to_rbs_comments.rb#22 + # @return [SorbetAssertionsToRBSComments] a new instance of SorbetAssertionsToRBSComments + # + # source://spoom//lib/spoom/sorbet/translate/sorbet_assertions_to_rbs_comments.rb#20 + sig do + params( + ruby_contents: ::String, + file: ::String, + translate_t_let: T::Boolean, + translate_t_cast: T::Boolean, + translate_t_bind: T::Boolean, + translate_t_must: T::Boolean, + translate_t_unsafe: T::Boolean + ).void + end + def initialize(ruby_contents, file:, translate_t_let: T.unsafe(nil), translate_t_cast: T.unsafe(nil), translate_t_bind: T.unsafe(nil), translate_t_must: T.unsafe(nil), translate_t_unsafe: T.unsafe(nil)); end + + # source://spoom//lib/spoom/sorbet/translate/sorbet_assertions_to_rbs_comments.rb#49 sig { override.params(node: ::Prism::IfNode).void } def visit_if_node(node); end - # source://spoom//lib/spoom/sorbet/translate/sorbet_assertions_to_rbs_comments.rb#13 + # source://spoom//lib/spoom/sorbet/translate/sorbet_assertions_to_rbs_comments.rb#40 sig { override.params(node: ::Prism::StatementsNode).void } def visit_statements_node(node); end @@ -4824,19 +4893,34 @@ class Spoom::Sorbet::Translate::SorbetAssertionsToRBSComments < ::Spoom::Sorbet: # @return [Boolean] # - # source://spoom//lib/spoom/sorbet/translate/sorbet_assertions_to_rbs_comments.rb#135 + # source://spoom//lib/spoom/sorbet/translate/sorbet_assertions_to_rbs_comments.rb#176 sig { params(node: ::Prism::Node).returns(T::Boolean) } def at_end_of_line?(node); end - # source://spoom//lib/spoom/sorbet/translate/sorbet_assertions_to_rbs_comments.rb#81 + # source://spoom//lib/spoom/sorbet/translate/sorbet_assertions_to_rbs_comments.rb#118 sig { params(call: ::Prism::CallNode).returns(::String) } def build_rbs_annotation(call); end - # source://spoom//lib/spoom/sorbet/translate/sorbet_assertions_to_rbs_comments.rb#142 + # source://spoom//lib/spoom/sorbet/translate/sorbet_assertions_to_rbs_comments.rb#216 sig { params(assign: ::Prism::Node, value: ::Prism::Node).returns(::String) } def dedent_value(assign, value); end - # source://spoom//lib/spoom/sorbet/translate/sorbet_assertions_to_rbs_comments.rb#44 + # Extract any trailing comment after the node + # Returns [comment_text, comment_end_offset] or [nil, nil] if no comment or RBS annotation + # + # source://spoom//lib/spoom/sorbet/translate/sorbet_assertions_to_rbs_comments.rb#196 + sig { params(node: ::Prism::Node).returns([T.nilable(::String), T.nilable(::Integer)]) } + def extract_trailing_comment(node); end + + # Check if the node has an RBS annotation comment (#:) after it + # + # @return [Boolean] + # + # source://spoom//lib/spoom/sorbet/translate/sorbet_assertions_to_rbs_comments.rb#185 + sig { params(node: ::Prism::Node).returns(T::Boolean) } + def has_rbs_annotation?(node); end + + # source://spoom//lib/spoom/sorbet/translate/sorbet_assertions_to_rbs_comments.rb#71 sig { params(node: ::Prism::Node).returns(T::Boolean) } def maybe_translate_assertion(node); end @@ -4844,7 +4928,7 @@ class Spoom::Sorbet::Translate::SorbetAssertionsToRBSComments < ::Spoom::Sorbet: # # @return [Boolean] # - # source://spoom//lib/spoom/sorbet/translate/sorbet_assertions_to_rbs_comments.rb#106 + # source://spoom//lib/spoom/sorbet/translate/sorbet_assertions_to_rbs_comments.rb#143 sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } def t?(node); end @@ -4852,9 +4936,9 @@ class Spoom::Sorbet::Translate::SorbetAssertionsToRBSComments < ::Spoom::Sorbet: # # @return [Boolean] # - # source://spoom//lib/spoom/sorbet/translate/sorbet_assertions_to_rbs_comments.rb#119 + # source://spoom//lib/spoom/sorbet/translate/sorbet_assertions_to_rbs_comments.rb#156 sig { params(node: ::Prism::CallNode).returns(T::Boolean) } - def t_annotation?(node); end + def translatable_annotation?(node); end end # source://spoom//lib/spoom/sorbet/translate/sorbet_assertions_to_rbs_comments.rb#9 @@ -4867,44 +4951,47 @@ Spoom::Sorbet::Translate::SorbetAssertionsToRBSComments::LINE_BREAK = T.let(T.un class Spoom::Sorbet::Translate::SorbetSigsToRBSComments < ::Spoom::Sorbet::Translate::Translator # @return [SorbetSigsToRBSComments] a new instance of SorbetSigsToRBSComments # - # source://spoom//lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb#11 + # source://spoom//lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb#19 sig do params( ruby_contents: ::String, file: ::String, positional_names: T::Boolean, - max_line_length: T.nilable(::Integer) + max_line_length: T.nilable(::Integer), + translate_generics: T::Boolean, + translate_helpers: T::Boolean, + translate_abstract_methods: T::Boolean ).void end - def initialize(ruby_contents, file:, positional_names:, max_line_length: T.unsafe(nil)); end + def initialize(ruby_contents, file:, positional_names:, max_line_length: T.unsafe(nil), translate_generics: T.unsafe(nil), translate_helpers: T.unsafe(nil), translate_abstract_methods: T.unsafe(nil)); end - # source://spoom//lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb#66 + # source://spoom//lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb#100 sig { override.params(node: ::Prism::CallNode).void } def visit_call_node(node); end - # source://spoom//lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb#26 + # source://spoom//lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb#46 sig { override.params(node: ::Prism::ClassNode).void } def visit_class_node(node); end - # source://spoom//lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb#85 + # source://spoom//lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb#119 sig { override.params(node: ::Prism::ConstantWriteNode).void } def visit_constant_write_node(node); end - # source://spoom//lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb#44 + # source://spoom//lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb#64 sig { override.params(node: ::Prism::DefNode).void } def visit_def_node(node); end - # source://spoom//lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb#32 + # source://spoom//lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb#52 sig { override.params(node: ::Prism::ModuleNode).void } def visit_module_node(node); end - # source://spoom//lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb#38 + # source://spoom//lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb#58 sig { override.params(node: ::Prism::SingletonClassNode).void } def visit_singleton_class_node(node); end private - # source://spoom//lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb#193 + # source://spoom//lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb#233 sig do params( parent: T.any(::Prism::ClassNode, ::Prism::ModuleNode, ::Prism::SingletonClassNode), @@ -4913,45 +5000,45 @@ class Spoom::Sorbet::Translate::SorbetSigsToRBSComments < ::Spoom::Sorbet::Trans end def apply_class_annotation(parent, node); end - # source://spoom//lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb#234 + # source://spoom//lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb#277 sig { params(sigs: T::Array[[::Prism::CallNode, ::RBI::Sig]]).void } def apply_member_annotations(sigs); end # @raise [Error] # - # source://spoom//lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb#266 + # source://spoom//lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb#313 sig { params(node: ::Prism::ConstantWriteNode).returns(::String) } def build_type_member_string(node); end # Collects the last signatures visited and clears the current list # - # source://spoom//lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb#337 + # source://spoom//lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb#384 sig { returns(T::Array[[::Prism::CallNode, ::RBI::Sig]]) } def collect_last_sigs; end - # source://spoom//lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb#324 + # source://spoom//lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb#371 sig { void } def delete_extend_t_generics; end - # source://spoom//lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb#312 + # source://spoom//lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb#359 sig { void } def delete_extend_t_helpers; end - # source://spoom//lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb#344 + # source://spoom//lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb#391 sig { params(indent: ::Integer, block: T.proc.params(arg0: ::RBI::RBSPrinter).void).returns(::String) } def rbs_print(indent, &block); end - # source://spoom//lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb#151 + # source://spoom//lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb#191 sig { params(node: ::Prism::CallNode).void } def visit_attr(node); end # @raise [Error] # - # source://spoom//lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb#175 + # source://spoom//lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb#215 sig { params(node: ::Prism::CallNode).void } def visit_extend(node); end - # source://spoom//lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb#102 + # source://spoom//lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb#138 sig do params( node: T.any(::Prism::ClassNode, ::Prism::ModuleNode, ::Prism::SingletonClassNode), @@ -4960,7 +5047,7 @@ class Spoom::Sorbet::Translate::SorbetSigsToRBSComments < ::Spoom::Sorbet::Trans end def visit_scope(node, &block); end - # source://spoom//lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb#139 + # source://spoom//lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb#179 sig { params(node: ::Prism::CallNode).void } def visit_sig(node); end end @@ -4987,29 +5074,29 @@ class Spoom::Sorbet::Translate::Translator < ::Spoom::Visitor sig { params(ruby_contents: ::String, file: ::String).void } def initialize(ruby_contents, file:); end - # source://spoom//lib/spoom/sorbet/translate/translator.rb#29 + # source://spoom//lib/spoom/sorbet/translate/translator.rb#30 sig { returns(::String) } def rewrite; end private - # source://spoom//lib/spoom/sorbet/translate/translator.rb#54 + # source://spoom//lib/spoom/sorbet/translate/translator.rb#55 sig { params(offset: ::Integer).returns(::Integer) } def adjust_to_line_end(offset); end - # source://spoom//lib/spoom/sorbet/translate/translator.rb#48 + # source://spoom//lib/spoom/sorbet/translate/translator.rb#49 sig { params(offset: ::Integer).returns(::Integer) } def adjust_to_line_start(offset); end # Consume the next blank line if any # - # source://spoom//lib/spoom/sorbet/translate/translator.rb#61 + # source://spoom//lib/spoom/sorbet/translate/translator.rb#62 sig { params(offset: ::Integer).returns(::Integer) } def adjust_to_new_line(offset); end # @return [Boolean] # - # source://spoom//lib/spoom/sorbet/translate/translator.rb#38 + # source://spoom//lib/spoom/sorbet/translate/translator.rb#39 sig { params(node: ::Prism::CallNode).returns(T::Boolean) } def sorbet_sig?(node); end end @@ -5038,32 +5125,32 @@ end # source://spoom//lib/spoom/source/rewriter.rb#25 module Spoom::Source; end -# source://spoom//lib/spoom/source/rewriter.rb#113 +# source://spoom//lib/spoom/source/rewriter.rb#114 class Spoom::Source::Delete < ::Spoom::Source::Edit # @return [Delete] a new instance of Delete # - # source://spoom//lib/spoom/source/rewriter.rb#118 + # source://spoom//lib/spoom/source/rewriter.rb#119 sig { params(from: ::Integer, to: ::Integer).void } def initialize(from, to); end # @raise [PositionError] # - # source://spoom//lib/spoom/source/rewriter.rb#127 + # source://spoom//lib/spoom/source/rewriter.rb#128 sig { override.params(bytes: T::Array[T.untyped]).void } def apply(bytes); end - # source://spoom//lib/spoom/source/rewriter.rb#115 + # source://spoom//lib/spoom/source/rewriter.rb#116 sig { returns(::Integer) } def from; end - # source://spoom//lib/spoom/source/rewriter.rb#135 + # source://spoom//lib/spoom/source/rewriter.rb#137 sig { override.returns([::Integer, ::Integer]) } def range; end - # source://spoom//lib/spoom/source/rewriter.rb#115 + # source://spoom//lib/spoom/source/rewriter.rb#116 def to; end - # source://spoom//lib/spoom/source/rewriter.rb#141 + # source://spoom//lib/spoom/source/rewriter.rb#143 sig { override.returns(::String) } def to_s; end end @@ -5075,12 +5162,14 @@ class Spoom::Source::Edit abstract! # @abstract + # @raise [NotImplementedError] # # source://spoom//lib/spoom/source/rewriter.rb#32 sig { abstract.params(bytes: T::Array[::Integer]).void } def apply(bytes); end # @abstract + # @raise [NotImplementedError] # # source://spoom//lib/spoom/source/rewriter.rb#36 sig { abstract.returns([::Integer, ::Integer]) } @@ -5139,7 +5228,7 @@ class Spoom::Source::Replace < ::Spoom::Source::Edit sig { returns(::Integer) } def from; end - # source://spoom//lib/spoom/source/rewriter.rb#102 + # source://spoom//lib/spoom/source/rewriter.rb#103 sig { override.returns([::Integer, ::Integer]) } def range; end @@ -5150,24 +5239,24 @@ class Spoom::Source::Replace < ::Spoom::Source::Edit # source://spoom//lib/spoom/source/rewriter.rb#78 def to; end - # source://spoom//lib/spoom/source/rewriter.rb#108 + # source://spoom//lib/spoom/source/rewriter.rb#109 sig { override.returns(::String) } def to_s; end end -# source://spoom//lib/spoom/source/rewriter.rb#146 +# source://spoom//lib/spoom/source/rewriter.rb#148 class Spoom::Source::Rewriter # @return [Rewriter] a new instance of Rewriter # - # source://spoom//lib/spoom/source/rewriter.rb#148 + # source://spoom//lib/spoom/source/rewriter.rb#150 sig { void } def initialize; end - # source://spoom//lib/spoom/source/rewriter.rb#153 + # source://spoom//lib/spoom/source/rewriter.rb#155 sig { params(other: ::Spoom::Source::Edit).void } def <<(other); end - # source://spoom//lib/spoom/source/rewriter.rb#158 + # source://spoom//lib/spoom/source/rewriter.rb#160 sig { params(bytes: T::Array[::Integer]).void } def rewrite!(bytes); end end diff --git a/sorbet/rbi/gems/syntax_tree@6.3.0.rbi b/sorbet/rbi/gems/syntax_tree@6.3.0.rbi index 6d4b603ec7..fbe9655864 100644 --- a/sorbet/rbi/gems/syntax_tree@6.3.0.rbi +++ b/sorbet/rbi/gems/syntax_tree@6.3.0.rbi @@ -9948,6 +9948,7 @@ class SyntaxTree::Parser < ::Ripper # :call-seq: # on_in: (RAssign pattern, nil statements, nil consequent) -> RAssign + # | ( # untyped pattern, # Statements statements, # (nil | In | Else) consequent @@ -10499,6 +10500,7 @@ class SyntaxTree::Parser < ::Ripper # :call-seq: # on_unary: (:not operator, untyped statement) -> Not + # | (Symbol operator, untyped statement) -> Unary # # source://syntax_tree//lib/syntax_tree/parser.rb#3766 def on_unary(operator, statement); end @@ -23310,10 +23312,10 @@ class SyntaxTree::YARV::VM def local_set(index, level, value); end # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#212 - def pop(*args, **_arg1, &block); end + def pop(*_arg0, **_arg1, &_arg2); end # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#212 - def push(*args, **_arg1, &block); end + def push(*_arg0, **_arg1, &_arg2); end # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#598 def require(filepath); end diff --git a/sorbet/rbi/gems/tapioca@0.17.7.rbi b/sorbet/rbi/gems/tapioca@0.17.10.rbi similarity index 93% rename from sorbet/rbi/gems/tapioca@0.17.7.rbi rename to sorbet/rbi/gems/tapioca@0.17.10.rbi index 4207d248fa..7c5fcfee1a 100644 --- a/sorbet/rbi/gems/tapioca@0.17.7.rbi +++ b/sorbet/rbi/gems/tapioca@0.17.10.rbi @@ -35,12 +35,12 @@ end # That's because RubyGems does alias-method-chain for Kernel#require and such, # so, if Bootsnap were to do prepend, it might end up breaking RubyGems. # -# source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#66 +# source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#46 class Module # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#98 def append_features(constant); end - # source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#69 + # source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#49 def autoload(const_name, path); end # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#108 @@ -103,7 +103,12 @@ class RBI::Tree < ::RBI::NodeWithComments def create_module(name, &block); end # source://tapioca//lib/tapioca/rbi_ext/model.rb#9 - sig { params(constant: ::Module, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).returns(::RBI::Scope) } + sig do + params( + constant: T::Module[T.anything], + block: T.nilable(T.proc.params(scope: ::RBI::Scope).void) + ).returns(::RBI::Scope) + end def create_path(constant, &block); end # source://tapioca//lib/tapioca/rbi_ext/model.rb#59 @@ -138,8 +143,6 @@ end # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#5 module T::Generic - include ::Kernel - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#13 def [](*types); end @@ -301,16 +304,10 @@ end # source://tapioca//lib/tapioca/sorbet_ext/name_patch.rb#7 module T::Types::Simple::NamePatch - # source://tapioca//lib/tapioca/sorbet_ext/name_patch.rb#10 + # source://tapioca//lib/tapioca/sorbet_ext/name_patch.rb#8 def name; end - - # source://tapioca//lib/tapioca/sorbet_ext/name_patch.rb#16 - def qualified_name_of(constant); end end -# source://tapioca//lib/tapioca/sorbet_ext/name_patch.rb#8 -T::Types::Simple::NamePatch::NAME_METHOD = T.let(T.unsafe(nil), UnboundMethod) - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#87 module T::Utils::Private class << self @@ -326,14 +323,9 @@ module T::Utils::Private::PrivateCoercePatch end # source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#4 -module Tapioca - class << self - # source://tapioca//lib/tapioca.rb#16 - def silence_warnings(&blk); end - end -end +module Tapioca; end -# source://tapioca//lib/tapioca.rb#35 +# source://tapioca//lib/tapioca.rb#20 Tapioca::BINARY_FILE = T.let(T.unsafe(nil), String) # source://tapioca//lib/tapioca/bundler_ext/auto_require_hook.rb#5 @@ -373,13 +365,13 @@ module Tapioca::BundlerExt::AutoRequireHook end end -# source://tapioca//lib/tapioca.rb#55 +# source://tapioca//lib/tapioca.rb#40 Tapioca::CENTRAL_REPO_ANNOTATIONS_DIR = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#54 +# source://tapioca//lib/tapioca.rb#39 Tapioca::CENTRAL_REPO_INDEX_PATH = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#53 +# source://tapioca//lib/tapioca.rb#38 Tapioca::CENTRAL_REPO_ROOT_URI = T.let(T.unsafe(nil), String) # source://tapioca//lib/tapioca/cli.rb#5 @@ -388,13 +380,13 @@ class Tapioca::Cli < ::Thor include ::Tapioca::ConfigHelper include ::Tapioca::EnvHelper - # source://tapioca//lib/tapioca/cli.rb#372 + # source://tapioca//lib/tapioca/cli.rb#373 def __print_version; end - # source://tapioca//lib/tapioca/cli.rb#354 + # source://tapioca//lib/tapioca/cli.rb#355 def annotations; end - # source://tapioca//lib/tapioca/cli.rb#326 + # source://tapioca//lib/tapioca/cli.rb#327 def check_shims; end # source://tapioca//lib/tapioca/cli.rb#46 @@ -419,18 +411,18 @@ class Tapioca::Cli < ::Thor private - # source://tapioca//lib/tapioca/cli.rb#399 + # source://tapioca//lib/tapioca/cli.rb#400 def print_init_next_steps; end class << self - # source://tapioca//lib/tapioca/cli.rb#383 + # source://tapioca//lib/tapioca/cli.rb#384 def addon_mode; end - # source://tapioca//lib/tapioca/cli.rb#386 + # source://tapioca//lib/tapioca/cli.rb#387 sig { void } def addon_mode!; end - # source://tapioca//lib/tapioca/cli.rb#391 + # source://tapioca//lib/tapioca/cli.rb#392 sig { returns(T::Boolean) } def exit_on_failure?; end end @@ -515,7 +507,12 @@ class Tapioca::Commands::AbstractDsl < ::Tapioca::Commands::CommandWithoutTracke def compile_dsl_rbi(constant_name, rbi, outpath: T.unsafe(nil), quiet: T.unsafe(nil)); end # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#150 - sig { params(constant_names: T::Array[::String], ignore_missing: T::Boolean).returns(T::Array[::Module]) } + sig do + params( + constant_names: T::Array[::String], + ignore_missing: T::Boolean + ).returns(T::Array[T::Module[T.anything]]) + end def constantize(constant_names, ignore_missing: T.unsafe(nil)); end # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#175 @@ -615,70 +612,71 @@ class Tapioca::Commands::AbstractGem < ::Tapioca::Commands::Command dsl_dir: ::String, rbi_formatter: ::Tapioca::RBIFormatter, halt_upon_load_error: T::Boolean, - lsp_addon: T.nilable(T::Boolean) + lsp_addon: T.nilable(T::Boolean), + verbose: T.nilable(T::Boolean) ).void end - def initialize(gem_names:, exclude:, include_dependencies:, prerequire:, postrequire:, typed_overrides:, outpath:, file_header:, include_doc:, include_loc:, include_exported_rbis:, number_of_workers: T.unsafe(nil), auto_strictness: T.unsafe(nil), dsl_dir: T.unsafe(nil), rbi_formatter: T.unsafe(nil), halt_upon_load_error: T.unsafe(nil), lsp_addon: T.unsafe(nil)); end + def initialize(gem_names:, exclude:, include_dependencies:, prerequire:, postrequire:, typed_overrides:, outpath:, file_header:, include_doc:, include_loc:, include_exported_rbis:, number_of_workers: T.unsafe(nil), auto_strictness: T.unsafe(nil), dsl_dir: T.unsafe(nil), rbi_formatter: T.unsafe(nil), halt_upon_load_error: T.unsafe(nil), lsp_addon: T.unsafe(nil), verbose: T.unsafe(nil)); end private - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#182 + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#185 sig { returns(T::Array[::String]) } def added_rbis; end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#243 + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#246 sig { params(cause: ::Symbol, files: T::Array[::String]).returns(::String) } def build_error_for_files(cause, files); end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#62 + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#64 sig { params(gem: ::Tapioca::Gemfile::GemSpec).void } def compile_gem_rbi(gem); end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#177 + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#180 sig { params(gem_name: ::String).returns(::Pathname) } def existing_rbi(gem_name); end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#225 + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#228 sig { returns(T::Hash[::String, ::String]) } def existing_rbis; end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#189 + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#192 sig { params(gem_name: ::String).returns(::Pathname) } def expected_rbi(gem_name); end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#231 + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#234 sig { returns(T::Hash[::String, ::String]) } def expected_rbis; end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#194 + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#197 sig { params(gem_name: ::String).returns(T::Boolean) } def gem_rbi_exists?(gem_name); end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#238 + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#241 sig { params(gem_name: ::String, version: ::String).returns(::Pathname) } def gem_rbi_filename(gem_name, version); end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#248 + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#251 sig { params(gem: ::Tapioca::Gemfile::GemSpec, file: ::RBI::File).void } def merge_with_exported_rbi(gem, file); end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#219 + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#222 sig { params(old_filename: ::Pathname, new_filename: ::Pathname).void } def move(old_filename, new_filename); end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#129 + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#132 sig { void } def perform_additions; end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#102 + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#105 sig { void } def perform_removals; end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#172 + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#175 sig { returns(T::Array[::String]) } def removed_rbis; end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#199 + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#202 sig { params(diff: T::Hash[::String, ::Symbol], command: ::Symbol).void } def report_diff_and_exit_if_out_of_date(diff, command); end end @@ -699,11 +697,11 @@ class Tapioca::Commands::Annotations < ::Tapioca::Commands::CommandWithoutTracke private - # source://tapioca//lib/tapioca/commands/annotations.rb#191 + # source://tapioca//lib/tapioca/commands/annotations.rb#192 sig { params(name: ::String, content: ::String).returns(::String) } def add_header(name, content); end - # source://tapioca//lib/tapioca/commands/annotations.rb#211 + # source://tapioca//lib/tapioca/commands/annotations.rb#212 sig { params(name: ::String, content: ::String).returns(::String) } def apply_typed_override(name, content); end @@ -711,35 +709,35 @@ class Tapioca::Commands::Annotations < ::Tapioca::Commands::CommandWithoutTracke sig { override.void } def execute; end - # source://tapioca//lib/tapioca/commands/annotations.rb#129 + # source://tapioca//lib/tapioca/commands/annotations.rb#130 sig { params(repo_uris: T::Array[::String], gem_info: ::Tapioca::GemInfo).returns(T::Boolean) } def fetch_annotation(repo_uris, gem_info); end - # source://tapioca//lib/tapioca/commands/annotations.rb#106 + # source://tapioca//lib/tapioca/commands/annotations.rb#107 sig { params(project_gems: T::Array[::Tapioca::GemInfo]).returns(T::Array[::String]) } def fetch_annotations(project_gems); end - # source://tapioca//lib/tapioca/commands/annotations.rb#150 + # source://tapioca//lib/tapioca/commands/annotations.rb#151 sig { params(repo_uri: ::String, path: ::String).returns(T.nilable(::String)) } def fetch_file(repo_uri, path); end - # source://tapioca//lib/tapioca/commands/annotations.rb#167 + # source://tapioca//lib/tapioca/commands/annotations.rb#168 sig { params(repo_uri: ::String, path: ::String).returns(T.nilable(::String)) } def fetch_http_file(repo_uri, path); end - # source://tapioca//lib/tapioca/commands/annotations.rb#95 + # source://tapioca//lib/tapioca/commands/annotations.rb#96 sig { params(repo_uri: ::String, repo_number: T.nilable(::Integer)).returns(T.nilable(::Tapioca::RepoIndex)) } def fetch_index(repo_uri, repo_number:); end - # source://tapioca//lib/tapioca/commands/annotations.rb#74 + # source://tapioca//lib/tapioca/commands/annotations.rb#75 sig { returns(T::Hash[::String, ::Tapioca::RepoIndex]) } def fetch_indexes; end - # source://tapioca//lib/tapioca/commands/annotations.rb#159 + # source://tapioca//lib/tapioca/commands/annotations.rb#160 sig { params(repo_uri: ::String, path: ::String).returns(T.nilable(::String)) } def fetch_local_file(repo_uri, path); end - # source://tapioca//lib/tapioca/commands/annotations.rb#223 + # source://tapioca//lib/tapioca/commands/annotations.rb#224 sig { params(gem_version: ::Gem::Version, content: ::String).returns(::String) } def filter_versions(gem_version, content); end @@ -747,23 +745,23 @@ class Tapioca::Commands::Annotations < ::Tapioca::Commands::CommandWithoutTracke sig { returns(T::Array[::Tapioca::GemInfo]) } def list_gemfile_gems; end - # source://tapioca//lib/tapioca/commands/annotations.rb#231 + # source://tapioca//lib/tapioca/commands/annotations.rb#232 sig { params(gem_name: ::String, contents: T::Array[::String]).returns(T.nilable(::String)) } def merge_files(gem_name, contents); end - # source://tapioca//lib/tapioca/commands/annotations.rb#53 + # source://tapioca//lib/tapioca/commands/annotations.rb#54 sig { params(project_gems: T::Array[::Tapioca::GemInfo]).void } def remove_expired_annotations(project_gems); end - # source://tapioca//lib/tapioca/commands/annotations.rb#258 + # source://tapioca//lib/tapioca/commands/annotations.rb#259 sig { returns(T::Hash[::String, T.nilable(::String)]) } def repo_tokens; end - # source://tapioca//lib/tapioca/commands/annotations.rb#286 + # source://tapioca//lib/tapioca/commands/annotations.rb#287 sig { params(path: ::String, repo_uri: ::String, message: ::String).void } def say_http_error(path, repo_uri, message:); end - # source://tapioca//lib/tapioca/commands/annotations.rb#270 + # source://tapioca//lib/tapioca/commands/annotations.rb#271 sig { params(repo_uri: ::String).returns(T.nilable(::String)) } def token_for(repo_uri); end end @@ -1093,37 +1091,37 @@ class Tapioca::ConfigHelper::ConfigErrorMessagePart < ::T::Struct const :colors, T::Array[::Symbol] end -# source://tapioca//lib/tapioca.rb#42 +# source://tapioca//lib/tapioca.rb#27 Tapioca::DEFAULT_ANNOTATIONS_DIR = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#38 +# source://tapioca//lib/tapioca.rb#23 Tapioca::DEFAULT_DSL_DIR = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#51 +# source://tapioca//lib/tapioca.rb#36 Tapioca::DEFAULT_ENVIRONMENT = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#39 +# source://tapioca//lib/tapioca.rb#24 Tapioca::DEFAULT_GEM_DIR = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#44 +# source://tapioca//lib/tapioca.rb#29 Tapioca::DEFAULT_OVERRIDES = T.let(T.unsafe(nil), Hash) -# source://tapioca//lib/tapioca.rb#36 +# source://tapioca//lib/tapioca.rb#21 Tapioca::DEFAULT_POSTREQUIRE_FILE = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#37 +# source://tapioca//lib/tapioca.rb#22 Tapioca::DEFAULT_RBI_DIR = T.let(T.unsafe(nil), String) # source://tapioca//lib/tapioca/rbi_formatter.rb#25 Tapioca::DEFAULT_RBI_FORMATTER = T.let(T.unsafe(nil), Tapioca::RBIFormatter) -# source://tapioca//lib/tapioca.rb#50 +# source://tapioca//lib/tapioca.rb#35 Tapioca::DEFAULT_RBI_MAX_LINE_LENGTH = T.let(T.unsafe(nil), Integer) -# source://tapioca//lib/tapioca.rb#40 +# source://tapioca//lib/tapioca.rb#25 Tapioca::DEFAULT_SHIM_DIR = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#41 +# source://tapioca//lib/tapioca.rb#26 Tapioca::DEFAULT_TODO_FILE = T.let(T.unsafe(nil), String) # source://tapioca//lib/tapioca/dsl/compilers.rb#5 @@ -1143,7 +1141,7 @@ class Tapioca::Dsl::Compiler abstract! - ConstantType = type_member { { upper: Module } } + ConstantType = type_member { { upper: T::Module[T.anything] } } # source://tapioca//lib/tapioca/dsl/compiler.rb#93 sig do @@ -1210,19 +1208,19 @@ class Tapioca::Dsl::Compiler # @raise [NotImplementedError] # # source://tapioca//lib/tapioca/dsl/compiler.rb#42 - sig { abstract.returns(T::Enumerable[::Module]) } + sig { abstract.returns(T::Enumerable[T::Module[T.anything]]) } def gather_constants; end # source://tapioca//lib/tapioca/dsl/compiler.rb#36 - sig { params(constant: ::Module).returns(T::Boolean) } + sig { params(constant: T::Module[T.anything]).returns(T::Boolean) } def handles?(constant); end # source://tapioca//lib/tapioca/dsl/compiler.rb#45 - sig { returns(T::Set[::Module]) } + sig { returns(T::Set[T::Module[T.anything]]) } def processable_constants; end # source://tapioca//lib/tapioca/dsl/compiler.rb#50 - sig { params(constants: T::Array[::Module]).void } + sig { params(constants: T::Array[T::Module[T.anything]]).void } def requested_constants=(constants); end # source://tapioca//lib/tapioca/dsl/compiler.rb#55 @@ -1236,7 +1234,7 @@ class Tapioca::Dsl::Compiler def all_classes; end # source://tapioca//lib/tapioca/dsl/compiler.rb#83 - sig { returns(T::Enumerable[::Module]) } + sig { returns(T::Enumerable[T::Module[T.anything]]) } def all_modules; end # source://tapioca//lib/tapioca/dsl/compiler.rb#64 @@ -1268,12 +1266,12 @@ class Tapioca::Dsl::Pipeline # source://tapioca//lib/tapioca/dsl/pipeline.rb#28 sig do params( - requested_constants: T::Array[::Module], + requested_constants: T::Array[T::Module[T.anything]], requested_paths: T::Array[::Pathname], requested_compilers: T::Array[T.class_of(Tapioca::Dsl::Compiler)], excluded_compilers: T::Array[T.class_of(Tapioca::Dsl::Compiler)], error_handler: T.proc.params(error: ::String).void, - skipped_constants: T::Array[::Module], + skipped_constants: T::Array[T::Module[T.anything]], number_of_workers: T.nilable(::Integer), compiler_options: T::Hash[::String, T.untyped], lsp_addon: T::Boolean @@ -1306,7 +1304,7 @@ class Tapioca::Dsl::Pipeline def errors; end # source://tapioca//lib/tapioca/dsl/pipeline.rb#13 - sig { returns(T::Array[::Module]) } + sig { returns(T::Array[T::Module[T.anything]]) } def requested_constants; end # source://tapioca//lib/tapioca/dsl/pipeline.rb#16 @@ -1315,15 +1313,15 @@ class Tapioca::Dsl::Pipeline # source://tapioca//lib/tapioca/dsl/pipeline.rb#52 sig do - type_parameters(:T) + type_parameters(:R) .params( - blk: T.proc.params(constant: ::Module, rbi: ::RBI::File).returns(T.type_parameter(:T)) - ).returns(T::Array[T.type_parameter(:T)]) + blk: T.proc.params(constant: T::Module[T.anything], rbi: ::RBI::File).returns(T.type_parameter(:R)) + ).returns(T::Array[T.type_parameter(:R)]) end def run(&blk); end # source://tapioca//lib/tapioca/dsl/pipeline.rb#19 - sig { returns(T::Array[::Module]) } + sig { returns(T::Array[T::Module[T.anything]]) } def skipped_constants; end private @@ -1333,7 +1331,7 @@ class Tapioca::Dsl::Pipeline def abort_if_pending_migrations!; end # source://tapioca//lib/tapioca/dsl/pipeline.rb#145 - sig { params(constants: T::Set[::Module]).returns(T::Set[::Module]) } + sig { params(constants: T::Set[T::Module[T.anything]]).returns(T::Set[T::Module[T.anything]]) } def filter_anonymous_and_reloaded_constants(constants); end # source://tapioca//lib/tapioca/dsl/pipeline.rb#115 @@ -1348,15 +1346,15 @@ class Tapioca::Dsl::Pipeline # source://tapioca//lib/tapioca/dsl/pipeline.rb#123 sig do params( - requested_constants: T::Array[::Module], + requested_constants: T::Array[T::Module[T.anything]], requested_paths: T::Array[::Pathname], - skipped_constants: T::Array[::Module] - ).returns(T::Set[::Module]) + skipped_constants: T::Array[T::Module[T.anything]] + ).returns(T::Set[T::Module[T.anything]]) end def gather_constants(requested_constants, requested_paths, skipped_constants); end # source://tapioca//lib/tapioca/dsl/pipeline.rb#174 - sig { params(constant: ::Module).returns(T.nilable(::RBI::File)) } + sig { params(constant: T::Module[T.anything]).returns(T.nilable(::RBI::File)) } def rbi_for_constant(constant); end # source://tapioca//lib/tapioca/dsl/pipeline.rb#193 @@ -1406,7 +1404,7 @@ module Tapioca::Gem; end # source://tapioca//lib/tapioca/gem/events.rb#82 class Tapioca::Gem::ConstNodeAdded < ::Tapioca::Gem::NodeAdded # source://tapioca//lib/tapioca/gem/events.rb#89 - sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Const).void } + sig { params(symbol: ::String, constant: T::Module[T.anything], node: ::RBI::Const).void } def initialize(symbol, constant, node); end # source://tapioca//lib/tapioca/gem/events.rb#86 @@ -1439,11 +1437,11 @@ end # source://tapioca//lib/tapioca/gem/events.rb#46 class Tapioca::Gem::ForeignConstantFound < ::Tapioca::Gem::ConstantFound # source://tapioca//lib/tapioca/gem/events.rb#56 - sig { params(symbol: ::String, constant: ::Module).void } + sig { params(symbol: ::String, constant: T::Module[T.anything]).void } def initialize(symbol, constant); end # source://tapioca//lib/tapioca/gem/events.rb#51 - sig { override.returns(::Module) } + sig { override.returns(T::Module[T.anything]) } def constant; end end @@ -1536,9 +1534,9 @@ class Tapioca::Gem::Listeners::Methods < ::Tapioca::Gem::Listeners::Base params( tree: ::RBI::Tree, module_name: ::String, - mod: ::Module, + mod: T::Module[T.anything], for_visibility: T::Array[::Symbol], - attached_class: T.nilable(::Module) + attached_class: T.nilable(T::Module[T.anything]) ).void end def compile_directly_owned_methods(tree, module_name, mod, for_visibility = T.unsafe(nil), attached_class: T.unsafe(nil)); end @@ -1548,7 +1546,7 @@ class Tapioca::Gem::Listeners::Methods < ::Tapioca::Gem::Listeners::Base params( tree: ::RBI::Tree, symbol_name: ::String, - constant: ::Module, + constant: T::Module[T.anything], method: T.nilable(::UnboundMethod), visibility: ::RBI::Visibility ).void @@ -1560,15 +1558,20 @@ class Tapioca::Gem::Listeners::Methods < ::Tapioca::Gem::Listeners::Base def ignore?(event); end # source://tapioca//lib/tapioca/gem/listeners/methods.rb#204 - sig { params(constant: ::Module).returns(T.nilable(::UnboundMethod)) } + sig { params(constant: T::Module[T.anything]).returns(T.nilable(::UnboundMethod)) } def initialize_method_for(constant); end # source://tapioca//lib/tapioca/gem/listeners/methods.rb#177 - sig { params(mod: ::Module).returns(T::Hash[::Symbol, T::Array[::Symbol]]) } + sig { params(mod: T::Module[T.anything]).returns(T::Hash[::Symbol, T::Array[::Symbol]]) } def method_names_by_visibility(mod); end # source://tapioca//lib/tapioca/gem/listeners/methods.rb#196 - sig { params(attached_class: T.nilable(::Module), method_name: ::Symbol).returns(T.nilable(T::Boolean)) } + sig do + params( + attached_class: T.nilable(T::Module[T.anything]), + method_name: ::Symbol + ).returns(T.nilable(T::Boolean)) + end def method_new_in_abstract_class?(attached_class, method_name); end # Check whether the method is defined by the constant. @@ -1582,7 +1585,7 @@ class Tapioca::Gem::Listeners::Methods < ::Tapioca::Gem::Listeners::Base # methods are owned by the constant, it means that the constant declares the method. # # source://tapioca//lib/tapioca/gem/listeners/methods.rb#163 - sig { params(method: ::UnboundMethod, constant: ::Module).returns(T::Boolean) } + sig { params(method: ::UnboundMethod, constant: T::Module[T.anything]).returns(T::Boolean) } def method_owned_by_constant?(method, constant); end # source://tapioca//lib/tapioca/gem/listeners/methods.rb#17 @@ -1590,7 +1593,7 @@ class Tapioca::Gem::Listeners::Methods < ::Tapioca::Gem::Listeners::Base def on_scope(event); end # source://tapioca//lib/tapioca/gem/listeners/methods.rb#186 - sig { params(constant: ::Module, method_name: ::String).returns(T::Boolean) } + sig { params(constant: T::Module[T.anything], method_name: ::String).returns(T::Boolean) } def struct_method?(constant, method_name); end end @@ -1605,8 +1608,8 @@ class Tapioca::Gem::Listeners::Mixins < ::Tapioca::Gem::Listeners::Base sig do params( tree: ::RBI::Tree, - constant: ::Module, - mods: T::Array[::Module], + constant: T::Module[T.anything], + mods: T::Array[T::Module[T.anything]], mixin_type: ::Tapioca::Runtime::Trackers::Mixin::Type ).void end @@ -1617,14 +1620,14 @@ class Tapioca::Gem::Listeners::Mixins < ::Tapioca::Gem::Listeners::Base def filtered_mixin?(mixin_name); end # source://tapioca//lib/tapioca/gem/listeners/mixins.rb#79 - sig { params(constant: ::Module).returns(T::Array[::Module]) } + sig { params(constant: T::Module[T.anything]).returns(T::Array[T::Module[T.anything]]) } def interesting_ancestors_of(constant); end # source://tapioca//lib/tapioca/gem/listeners/mixins.rb#63 sig do params( - constant: ::Module, - mixin: ::Module, + constant: T::Module[T.anything], + mixin: T::Module[T.anything], mixin_type: ::Tapioca::Runtime::Trackers::Mixin::Type ).returns(T::Boolean) end @@ -1746,7 +1749,7 @@ class Tapioca::Gem::Listeners::SorbetTypeVariables < ::Tapioca::Gem::Listeners:: private # source://tapioca//lib/tapioca/gem/listeners/sorbet_type_variables.rb#28 - sig { params(tree: ::RBI::Tree, constant: ::Module).void } + sig { params(tree: ::RBI::Tree, constant: T::Module[T.anything]).void } def compile_type_variable_declarations(tree, constant); end # source://tapioca//lib/tapioca/gem/listeners/sorbet_type_variables.rb#65 @@ -1844,7 +1847,7 @@ class Tapioca::Gem::MethodNodeAdded < ::Tapioca::Gem::NodeAdded sig do params( symbol: ::String, - constant: ::Module, + constant: T::Module[T.anything], method: ::UnboundMethod, node: ::RBI::Method, signature: T.untyped, @@ -1877,11 +1880,11 @@ class Tapioca::Gem::NodeAdded < ::Tapioca::Gem::Event abstract! # source://tapioca//lib/tapioca/gem/events.rb#75 - sig { params(symbol: ::String, constant: ::Module).void } + sig { params(symbol: ::String, constant: T::Module[T.anything]).void } def initialize(symbol, constant); end # source://tapioca//lib/tapioca/gem/events.rb#72 - sig { returns(::Module) } + sig { returns(T::Module[T.anything]) } def constant; end # source://tapioca//lib/tapioca/gem/events.rb#69 @@ -1927,35 +1930,35 @@ class Tapioca::Gem::Pipeline sig do params( method_name: ::Symbol, - owner: ::Module + owner: T::Module[T.anything] ).returns(::Tapioca::Gem::Pipeline::MethodDefinitionLookupResult) end def method_definition_in_gem(method_name, owner); end # source://tapioca//lib/tapioca/gem/pipeline.rb#175 - sig { params(constant: ::Module).returns(T.nilable(::String)) } + sig { params(constant: T::Module[T.anything]).returns(T.nilable(::String)) } def name_of(constant); end # source://tapioca//lib/tapioca/gem/pipeline.rb#81 - sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Const).void } + sig { params(symbol: ::String, constant: T::Module[T.anything], node: ::RBI::Const).void } def push_const(symbol, constant, node); end # source://tapioca//lib/tapioca/gem/pipeline.rb#71 def push_constant(symbol, constant); end # source://tapioca//lib/tapioca/gem/pipeline.rb#76 - sig { params(symbol: ::String, constant: ::Module).void } + sig { params(symbol: ::String, constant: T::Module[T.anything]).void } def push_foreign_constant(symbol, constant); end # source://tapioca//lib/tapioca/gem/pipeline.rb#91 - sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Scope).void } + sig { params(symbol: ::String, constant: T::Module[T.anything], node: ::RBI::Scope).void } def push_foreign_scope(symbol, constant, node); end # source://tapioca//lib/tapioca/gem/pipeline.rb#96 sig do params( symbol: ::String, - constant: ::Module, + constant: T::Module[T.anything], method: ::UnboundMethod, node: ::RBI::Method, signature: T.untyped, @@ -1965,7 +1968,7 @@ class Tapioca::Gem::Pipeline def push_method(symbol, constant, method, node, signature, parameters); end # source://tapioca//lib/tapioca/gem/pipeline.rb#86 - sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Scope).void } + sig { params(symbol: ::String, constant: T::Module[T.anything], node: ::RBI::Scope).void } def push_scope(symbol, constant, node); end # source://tapioca//lib/tapioca/gem/pipeline.rb#65 @@ -1987,25 +1990,25 @@ class Tapioca::Gem::Pipeline def alias_namespaced?(name); end # source://tapioca//lib/tapioca/gem/pipeline.rb#273 - sig { params(name: ::String, constant: ::Module).void } + sig { params(name: ::String, constant: T::Module[T.anything]).void } def compile_alias(name, constant); end # source://tapioca//lib/tapioca/gem/pipeline.rb#259 def compile_constant(symbol, constant); end # source://tapioca//lib/tapioca/gem/pipeline.rb#247 - sig { params(symbol: ::String, constant: ::Module).void } + sig { params(symbol: ::String, constant: T::Module[T.anything]).void } def compile_foreign_constant(symbol, constant); end # source://tapioca//lib/tapioca/gem/pipeline.rb#328 - sig { params(name: ::String, constant: ::Module).void } + sig { params(name: ::String, constant: T::Module[T.anything]).void } def compile_module(name, constant); end # source://tapioca//lib/tapioca/gem/pipeline.rb#295 def compile_object(name, value); end # source://tapioca//lib/tapioca/gem/pipeline.rb#339 - sig { params(name: ::String, constant: ::Module).returns(::RBI::Scope) } + sig { params(name: ::String, constant: T::Module[T.anything]).returns(::RBI::Scope) } def compile_scope(name, constant); end # source://tapioca//lib/tapioca/gem/pipeline.rb#353 @@ -2013,7 +2016,7 @@ class Tapioca::Gem::Pipeline def compile_superclass(constant); end # source://tapioca//lib/tapioca/gem/pipeline.rb#453 - sig { params(constant: ::Module, strict: T::Boolean).returns(T::Boolean) } + sig { params(constant: T::Module[T.anything], strict: T::Boolean).returns(T::Boolean) } def defined_in_gem?(constant, strict: T.unsafe(nil)); end # source://tapioca//lib/tapioca/gem/pipeline.rb#205 @@ -2021,11 +2024,11 @@ class Tapioca::Gem::Pipeline def dispatch(event); end # source://tapioca//lib/tapioca/gem/pipeline.rb#496 - sig { params(constant: T.all(::Module, ::T::Generic)).returns(::String) } + sig { params(constant: T.all(::T::Generic, T::Module[T.anything])).returns(::String) } def generic_name_of(constant); end # source://tapioca//lib/tapioca/gem/pipeline.rb#465 - sig { params(constant: ::Module).returns(T::Set[::String]) } + sig { params(constant: T::Module[T.anything]).returns(T::Set[::String]) } def get_file_candidates(constant); end # source://tapioca//lib/tapioca/gem/pipeline.rb#190 @@ -2033,7 +2036,7 @@ class Tapioca::Gem::Pipeline def load_bootstrap_symbols(gem); end # source://tapioca//lib/tapioca/gem/pipeline.rb#512 - sig { params(constant: ::Module, class_name: T.nilable(::String)).returns(T.nilable(::String)) } + sig { params(constant: T::Module[T.anything], class_name: T.nilable(::String)).returns(T.nilable(::String)) } def name_of_proxy_target(constant, class_name); end # source://tapioca//lib/tapioca/gem/pipeline.rb#200 @@ -2061,7 +2064,7 @@ class Tapioca::Gem::Pipeline def seen?(name); end # source://tapioca//lib/tapioca/gem/pipeline.rb#422 - sig { params(name: ::String, constant: ::Module).returns(T::Boolean) } + sig { params(name: ::String, constant: T::Module[T.anything]).returns(T::Boolean) } def skip_alias?(name, constant); end # @return [Boolean] @@ -2070,11 +2073,11 @@ class Tapioca::Gem::Pipeline def skip_constant?(name, constant); end # source://tapioca//lib/tapioca/gem/pipeline.rb#440 - sig { params(name: ::String, constant: ::Module).returns(T::Boolean) } + sig { params(name: ::String, constant: T::Module[T.anything]).returns(T::Boolean) } def skip_foreign_constant?(name, constant); end # source://tapioca//lib/tapioca/gem/pipeline.rb#445 - sig { params(name: ::String, constant: ::Module).returns(T::Boolean) } + sig { params(name: ::String, constant: T::Module[T.anything]).returns(T::Boolean) } def skip_module?(name, constant); end # @return [Boolean] @@ -2128,7 +2131,7 @@ class Tapioca::Gem::Pipeline::MethodUnknown < ::Tapioca::Gem::Pipeline::MethodDe # source://tapioca//lib/tapioca/gem/events.rb#95 class Tapioca::Gem::ScopeNodeAdded < ::Tapioca::Gem::NodeAdded # source://tapioca//lib/tapioca/gem/events.rb#102 - sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Scope).void } + sig { params(symbol: ::String, constant: T::Module[T.anything], node: ::RBI::Scope).void } def initialize(symbol, constant, node); end # source://tapioca//lib/tapioca/gem/events.rb#99 @@ -2179,7 +2182,7 @@ class Tapioca::GemInfo < ::T::Struct class << self # source://tapioca//lib/tapioca/gem_info.rb#13 - sig { params(spec: ::Bundler::LazySpecification).returns(::Tapioca::GemInfo) } + sig { params(spec: T.any(::Bundler::StubSpecification, ::Gem::Specification)).returns(::Tapioca::GemInfo) } def from_spec(spec); end end end @@ -2346,7 +2349,7 @@ Tapioca::Gemfile::GemSpec::IGNORED_GEMS = T.let(T.unsafe(nil), Array) # source://tapioca//lib/tapioca/gemfile.rb#10 Tapioca::Gemfile::Spec = T.type_alias { T.any(::Bundler::StubSpecification, ::Gem::Specification) } -# source://tapioca//lib/tapioca.rb#29 +# source://tapioca//lib/tapioca.rb#14 Tapioca::LIB_ROOT_DIR = T.let(T.unsafe(nil), String) # source://tapioca//lib/tapioca/loaders/loader.rb#5 @@ -2431,7 +2434,7 @@ class Tapioca::Loaders::Gem < ::Tapioca::Loaders::Loader protected - # source://tapioca//lib/tapioca/loaders/gem.rb#65 + # source://tapioca//lib/tapioca/loaders/gem.rb#72 sig { params(file: ::String, error: ::LoadError).void } def explain_failed_require(file, error); end @@ -2747,7 +2750,15 @@ class Tapioca::RepoIndex end # source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#5 -module Tapioca::Runtime; end +module Tapioca::Runtime + class << self + # source://tapioca//lib/tapioca/runtime/helpers.rb#11 + def silence_warnings(&blk); end + + # source://tapioca//lib/tapioca/runtime/helpers.rb#22 + def with_disabled_exits(&block); end + end +end # This module should only be included when running versions of Ruby # older than 3.2. Because the Class#attached_object method is not @@ -2897,6 +2908,9 @@ class Tapioca::Runtime::GenericTypeRegistry::GenericType < ::T::Types::Simple def valid?(obj); end end +# source://tapioca//lib/tapioca/runtime/helpers.rb#6 +Tapioca::Runtime::NOOP_METHOD = T.let(T.unsafe(nil), Proc) + module Tapioca::Runtime::Reflection include ::Tapioca::Runtime::AttachedClassOf extend ::Tapioca::Runtime::AttachedClassOf @@ -3118,20 +3132,14 @@ module Tapioca::Runtime::Trackers::Autoload extend ::Tapioca::Runtime::Trackers::Tracker class << self - # source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#19 + # source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#17 def eager_load_all!; end - # source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#31 + # source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#29 def register(constant_name); end - - # source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#38 - def with_disabled_exits(&block); end end end -# source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#11 -Tapioca::Runtime::Trackers::Autoload::NOOP_METHOD = T.let(T.unsafe(nil), Proc) - # Registers a TracePoint immediately upon load to track points at which # classes and modules are opened for definition. This is used to track # correspondence between classes/modules and files, as this information isn't @@ -3250,10 +3258,10 @@ module Tapioca::Runtime::Trackers::Tracker end end -# source://tapioca//lib/tapioca.rb#31 +# source://tapioca//lib/tapioca.rb#16 Tapioca::SORBET_CONFIG_FILE = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#30 +# source://tapioca//lib/tapioca.rb#15 Tapioca::SORBET_DIR = T.let(T.unsafe(nil), String) # source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#5 @@ -3435,10 +3443,10 @@ end # source://tapioca//lib/tapioca/static/symbol_table_parser.rb#9 Tapioca::Static::SymbolTableParser::SKIP_PARSE_KINDS = T.let(T.unsafe(nil), Array) -# source://tapioca//lib/tapioca.rb#33 +# source://tapioca//lib/tapioca.rb#18 Tapioca::TAPIOCA_CONFIG_FILE = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#32 +# source://tapioca//lib/tapioca.rb#17 Tapioca::TAPIOCA_DIR = T.let(T.unsafe(nil), String) # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#108 diff --git a/sorbet/rbi/gems/test-unit@3.7.0.rbi b/sorbet/rbi/gems/test-unit@3.7.0.rbi index f4415369d8..9db97fc732 100644 --- a/sorbet/rbi/gems/test-unit@3.7.0.rbi +++ b/sorbet/rbi/gems/test-unit@3.7.0.rbi @@ -630,14 +630,6 @@ module Test::Unit::Assertions # `expected_message`. `expected_message` can be a `String` or # `Regexp`. # - # @example Pass pattern: String - # assert_raise_with_message(RuntimeError, "Boom!!!") do - # raise "Boom!!!" - # end # -> pass - # @example Pass pattern: Regexp - # assert_raise_with_message(RuntimeError, /!!!/) do - # raise "Boom!!!" - # end # -> pass # @example Failure pattern: Exception class isn't matched # assert_raise_with_message(RuntimeError, "Boom!!!") do # raise ArgumentError, "Boom!!!" @@ -646,6 +638,14 @@ module Test::Unit::Assertions # assert_raise_with_message(RuntimeError, "Boom!!!") do # raise "Hello" # end # -> failure + # @example Pass pattern: Regexp + # assert_raise_with_message(RuntimeError, /!!!/) do + # raise "Boom!!!" + # end # -> pass + # @example Pass pattern: String + # assert_raise_with_message(RuntimeError, "Boom!!!") do + # raise "Boom!!!" + # end # -> pass # @since 3.4.3 # # source://test-unit//lib/test/unit/assertions.rb#318 @@ -752,12 +752,12 @@ module Test::Unit::Assertions # Asserts that `object` is false or nil. # - # @example Pass patterns - # refute(false) # => pass - # refute(nil) # => pass # @example Failure patterns # refute(true) # => failure # refute("string") # => failure + # @example Pass patterns + # refute(false) # => pass + # refute(nil) # => pass # @note Just for minitest compatibility. :< # @param object [Object] The object to be asserted. # @return [void] @@ -2562,8 +2562,8 @@ module Test::Unit::FailureHandler # @option options # @option options # @option options - # @param message [String] The description about the failure. # @param backtrace [Array] The backtrace for the failure. + # @param message [String] The description about the failure. # @param options [Hash] a customizable set of options # @return [void] # diff --git a/sorbet/rbi/gems/thor@1.3.2.rbi b/sorbet/rbi/gems/thor@1.5.0.rbi similarity index 92% rename from sorbet/rbi/gems/thor@1.3.2.rbi rename to sorbet/rbi/gems/thor@1.5.0.rbi index f77cb85245..4e6af37383 100644 --- a/sorbet/rbi/gems/thor@1.3.2.rbi +++ b/sorbet/rbi/gems/thor@1.5.0.rbi @@ -40,6 +40,14 @@ class Thor # source://thor//lib/thor.rb#663 def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end + # source://thor//lib/thor.rb#678 + def tree; end + + private + + # source://thor//lib/thor.rb#684 + def build_command_tree(klass, indent); end + class << self # Adds and declares option group for required at least one of options in the # block of arguments. You can declare options as the outside of the block. @@ -134,7 +142,7 @@ class Thor # source://thor//lib/thor.rb#28 def default_task(meth = T.unsafe(nil)); end - # source://thor//lib/thor/base.rb#26 + # source://thor//lib/thor/base.rb#27 def deprecation_warning(message); end # Defines the usage and the description of the next command. @@ -751,7 +759,7 @@ module Thor::Actions # # comment_lines 'config/initializers/session_store.rb', /cookie_store/ # - # source://thor//lib/thor/actions/file_manipulation.rb#308 + # source://thor//lib/thor/actions/file_manipulation.rb#333 def comment_lines(path, flag, *args); end # Copies the file from the relative source to the relative destination. If @@ -928,9 +936,30 @@ module Thor::Actions # match << " no more. Use thor!" # end # - # source://thor//lib/thor/actions/file_manipulation.rb#262 + # source://thor//lib/thor/actions/file_manipulation.rb#291 def gsub_file(path, flag, *args, &block); end + # Run a regular expression replacement on a file, raising an error if the + # contents of the file are not changed. + # + # ==== Parameters + # path:: path of the file to be changed + # flag:: the regexp or string to be replaced + # replacement:: the replacement, can be also given as a block + # config:: give :verbose => false to not log the status, and + # :force => true, to force the replacement regardless of runner behavior. + # + # ==== Example + # + # gsub_file! 'app/controllers/application_controller.rb', /#\s*(filter_parameter_logging :password)/, '\1' + # + # gsub_file! 'README', /rake/, :green do |match| + # match << " no more. Use thor!" + # end + # + # source://thor//lib/thor/actions/file_manipulation.rb#263 + def gsub_file!(path, flag, *args, &block); end + # Goes to the root and execute the given block. # # source://thor//lib/thor/actions.rb#200 @@ -956,9 +985,50 @@ module Thor::Actions # source://thor//lib/thor/actions/file_manipulation.rb#216 def inject_into_class(path, klass, *args, &block); end - # source://thor//lib/thor/actions/inject_into_file.rb#34 + # Injects the given content into a file. Different from gsub_file, this + # method is reversible. + # + # ==== Parameters + # destination:: Relative path to the destination root + # data:: Data to add to the file. Can be given as a block. + # config:: give :verbose => false to not log the status and the flag + # for injection (:after or :before) or :force => true for + # insert two or more times the same content. + # + # ==== Examples + # + # insert_into_file "config/environment.rb", "config.gem :thor", :after => "Rails::Initializer.run do |config|\n" + # + # insert_into_file "config/environment.rb", :after => "Rails::Initializer.run do |config|\n" do + # gems = ask "Which gems would you like to add?" + # gems.split(" ").map{ |gem| " config.gem :#{gem}" }.join("\n") + # end + # + # source://thor//lib/thor/actions/inject_into_file.rb#64 def inject_into_file(destination, *args, &block); end + # Injects the given content into a file, raising an error if the contents of + # the file are not changed. Different from gsub_file, this method is reversible. + # + # ==== Parameters + # destination:: Relative path to the destination root + # data:: Data to add to the file. Can be given as a block. + # config:: give :verbose => false to not log the status and the flag + # for injection (:after or :before) or :force => true for + # insert two or more times the same content. + # + # ==== Examples + # + # insert_into_file "config/environment.rb", "config.gem :thor", :after => "Rails::Initializer.run do |config|\n" + # + # insert_into_file "config/environment.rb", :after => "Rails::Initializer.run do |config|\n" do + # gems = ask "Which gems would you like to add?" + # gems.split(" ").map{ |gem| " config.gem :#{gem}" }.join("\n") + # end + # + # source://thor//lib/thor/actions/inject_into_file.rb#35 + def inject_into_file!(destination, *args, &block); end + # Injects text right after the module definition. Since it depends on # insert_into_file, it's reversible. # @@ -979,9 +1049,50 @@ module Thor::Actions # source://thor//lib/thor/actions/file_manipulation.rb#239 def inject_into_module(path, module_name, *args, &block); end - # source://thor//lib/thor/actions/inject_into_file.rb#26 + # Injects the given content into a file. Different from gsub_file, this + # method is reversible. + # + # ==== Parameters + # destination:: Relative path to the destination root + # data:: Data to add to the file. Can be given as a block. + # config:: give :verbose => false to not log the status and the flag + # for injection (:after or :before) or :force => true for + # insert two or more times the same content. + # + # ==== Examples + # + # insert_into_file "config/environment.rb", "config.gem :thor", :after => "Rails::Initializer.run do |config|\n" + # + # insert_into_file "config/environment.rb", :after => "Rails::Initializer.run do |config|\n" do + # gems = ask "Which gems would you like to add?" + # gems.split(" ").map{ |gem| " config.gem :#{gem}" }.join("\n") + # end + # + # source://thor//lib/thor/actions/inject_into_file.rb#56 def insert_into_file(destination, *args, &block); end + # Injects the given content into a file, raising an error if the contents of + # the file are not changed. Different from gsub_file, this method is reversible. + # + # ==== Parameters + # destination:: Relative path to the destination root + # data:: Data to add to the file. Can be given as a block. + # config:: give :verbose => false to not log the status and the flag + # for injection (:after or :before) or :force => true for + # insert two or more times the same content. + # + # ==== Examples + # + # insert_into_file "config/environment.rb", "config.gem :thor", :after => "Rails::Initializer.run do |config|\n" + # + # insert_into_file "config/environment.rb", :after => "Rails::Initializer.run do |config|\n" do + # gems = ask "Which gems would you like to add?" + # gems.split(" ").map{ |gem| " config.gem :#{gem}" }.join("\n") + # end + # + # source://thor//lib/thor/actions/inject_into_file.rb#26 + def insert_into_file!(destination, *args, &block); end + # Do something in the root or on a provided subfolder. If a relative path # is given it's referenced from the current root. The full path is yielded # to the block you provide. The path is set back to the previous path when @@ -1066,7 +1177,7 @@ module Thor::Actions # remove_file 'README' # remove_file 'app/controllers/application_controller.rb' # - # source://thor//lib/thor/actions/file_manipulation.rb#335 + # source://thor//lib/thor/actions/file_manipulation.rb#360 def remove_dir(path, config = T.unsafe(nil)); end # Removes a file at the given location. @@ -1080,7 +1191,7 @@ module Thor::Actions # remove_file 'README' # remove_file 'app/controllers/application_controller.rb' # - # source://thor//lib/thor/actions/file_manipulation.rb#325 + # source://thor//lib/thor/actions/file_manipulation.rb#350 def remove_file(path, config = T.unsafe(nil)); end # Executes a command returning the contents of the command. @@ -1164,7 +1275,7 @@ module Thor::Actions # # uncomment_lines 'config/initializers/session_store.rb', /active_record/ # - # source://thor//lib/thor/actions/file_manipulation.rb#289 + # source://thor//lib/thor/actions/file_manipulation.rb#314 def uncomment_lines(path, flag, *args); end protected @@ -1179,25 +1290,28 @@ module Thor::Actions private - # source://thor//lib/thor/actions/file_manipulation.rb#346 + # source://thor//lib/thor/actions/file_manipulation.rb#385 + def actually_gsub_file(path, flag, args, error_on_no_change, &block); end + + # source://thor//lib/thor/actions/file_manipulation.rb#371 def capture(*args); end - # source://thor//lib/thor/actions/file_manipulation.rb#342 + # source://thor//lib/thor/actions/file_manipulation.rb#367 def concat(string); end # Returns the value of attribute output_buffer. # - # source://thor//lib/thor/actions/file_manipulation.rb#337 + # source://thor//lib/thor/actions/file_manipulation.rb#362 def output_buffer; end # Sets the attribute output_buffer # # @param value the value to set the attribute output_buffer to. # - # source://thor//lib/thor/actions/file_manipulation.rb#337 + # source://thor//lib/thor/actions/file_manipulation.rb#362 def output_buffer=(_arg0); end - # source://thor//lib/thor/actions/file_manipulation.rb#350 + # source://thor//lib/thor/actions/file_manipulation.rb#375 def with_output_buffer(buf = T.unsafe(nil)); end class << self @@ -1209,9 +1323,9 @@ end # Thor::Actions#capture depends on what kind of buffer is used in ERB. # Thus CapturableERB fixes ERB to use String buffer. # -# source://thor//lib/thor/actions/file_manipulation.rb#362 +# source://thor//lib/thor/actions/file_manipulation.rb#398 class Thor::Actions::CapturableERB < ::ERB - # source://thor//lib/thor/actions/file_manipulation.rb#363 + # source://thor//lib/thor/actions/file_manipulation.rb#399 def set_eoutvar(compiler, eoutvar = T.unsafe(nil)); end end @@ -1460,73 +1574,54 @@ class Thor::Actions::EmptyDirectory def say_status(status, color); end end -# source://thor//lib/thor/actions/inject_into_file.rb#36 +# source://thor//lib/thor/actions/inject_into_file.rb#66 class Thor::Actions::InjectIntoFile < ::Thor::Actions::EmptyDirectory # @return [InjectIntoFile] a new instance of InjectIntoFile # - # source://thor//lib/thor/actions/inject_into_file.rb#39 + # source://thor//lib/thor/actions/inject_into_file.rb#69 def initialize(base, destination, data, config); end # Returns the value of attribute behavior. # - # source://thor//lib/thor/actions/inject_into_file.rb#37 + # source://thor//lib/thor/actions/inject_into_file.rb#67 def behavior; end # Returns the value of attribute flag. # - # source://thor//lib/thor/actions/inject_into_file.rb#37 + # source://thor//lib/thor/actions/inject_into_file.rb#67 def flag; end - # source://thor//lib/thor/actions/inject_into_file.rb#52 + # source://thor//lib/thor/actions/inject_into_file.rb#83 def invoke!; end # Returns the value of attribute replacement. # - # source://thor//lib/thor/actions/inject_into_file.rb#37 + # source://thor//lib/thor/actions/inject_into_file.rb#67 def replacement; end - # source://thor//lib/thor/actions/inject_into_file.rb#74 + # source://thor//lib/thor/actions/inject_into_file.rb#107 def revoke!; end protected - # source://thor//lib/thor/actions/inject_into_file.rb#110 + # source://thor//lib/thor/actions/inject_into_file.rb#143 def content; end # Adds the content to the file. # - # source://thor//lib/thor/actions/inject_into_file.rb#120 + # source://thor//lib/thor/actions/inject_into_file.rb#153 def replace!(regexp, string, force); end # @return [Boolean] # - # source://thor//lib/thor/actions/inject_into_file.rb#114 + # source://thor//lib/thor/actions/inject_into_file.rb#147 def replacement_present?; end - # source://thor//lib/thor/actions/inject_into_file.rb#90 + # source://thor//lib/thor/actions/inject_into_file.rb#123 def say_status(behavior, warning: T.unsafe(nil), color: T.unsafe(nil)); end end -# Injects the given content into a file. Different from gsub_file, this -# method is reversible. -# -# ==== Parameters -# destination:: Relative path to the destination root -# data:: Data to add to the file. Can be given as a block. -# config:: give :verbose => false to not log the status and the flag -# for injection (:after or :before) or :force => true for -# insert two or more times the same content. -# -# ==== Examples -# -# insert_into_file "config/environment.rb", "config.gem :thor", :after => "Rails::Initializer.run do |config|\n" -# -# insert_into_file "config/environment.rb", :after => "Rails::Initializer.run do |config|\n" do -# gems = ask "Which gems would you like to add?" -# gems.split(" ").map{ |gem| " config.gem :#{gem}" }.join("\n") -# end -# -# source://thor//lib/thor/actions/inject_into_file.rb#24 +# source://thor//lib/thor/actions/inject_into_file.rb#5 Thor::Actions::WARNINGS = T.let(T.unsafe(nil), Hash) # source://thor//lib/thor/error.rb#57 @@ -1755,53 +1850,53 @@ module Thor::Base # # config:: Configuration for this Thor class. # - # source://thor//lib/thor/base.rb#53 + # source://thor//lib/thor/base.rb#54 def initialize(args = T.unsafe(nil), local_options = T.unsafe(nil), config = T.unsafe(nil)); end # Returns the value of attribute args. # - # source://thor//lib/thor/base.rb#35 + # source://thor//lib/thor/base.rb#36 def args; end # Sets the attribute args # # @param value the value to set the attribute args to. # - # source://thor//lib/thor/base.rb#35 + # source://thor//lib/thor/base.rb#36 def args=(_arg0); end # Returns the value of attribute options. # - # source://thor//lib/thor/base.rb#35 + # source://thor//lib/thor/base.rb#36 def options; end # Sets the attribute options # # @param value the value to set the attribute options to. # - # source://thor//lib/thor/base.rb#35 + # source://thor//lib/thor/base.rb#36 def options=(_arg0); end # Returns the value of attribute parent_options. # - # source://thor//lib/thor/base.rb#35 + # source://thor//lib/thor/base.rb#36 def parent_options; end # Sets the attribute parent_options # # @param value the value to set the attribute parent_options to. # - # source://thor//lib/thor/base.rb#35 + # source://thor//lib/thor/base.rb#36 def parent_options=(_arg0); end class << self - # source://thor//lib/thor/base.rb#116 + # source://thor//lib/thor/base.rb#117 def included(base); end # Whenever a class inherits from Thor or Thor::Group, we should track the # class and the file on Thor::Base. This is the method responsible for it. # - # source://thor//lib/thor/base.rb#144 + # source://thor//lib/thor/base.rb#145 def register_klass_file(klass); end # Returns the shell used in all Thor classes. If you are in a Unix platform @@ -1822,7 +1917,7 @@ module Thor::Base # ==== Returns # Hash[path => Class] # - # source://thor//lib/thor/base.rb#137 + # source://thor//lib/thor/base.rb#138 def subclass_files; end # Returns the classes that inherits from Thor or Thor::Group. @@ -1830,12 +1925,12 @@ module Thor::Base # ==== Returns # Array[Class] # - # source://thor//lib/thor/base.rb#128 + # source://thor//lib/thor/base.rb#129 def subclasses; end end end -# source://thor//lib/thor/base.rb#153 +# source://thor//lib/thor/base.rb#154 module Thor::Base::ClassMethods # Returns the commands for this Thor class and all subclasses. # @@ -1843,7 +1938,7 @@ module Thor::Base::ClassMethods # Hash:: An ordered hash with commands names as keys and Thor::Command # objects as values. # - # source://thor//lib/thor/base.rb#482 + # source://thor//lib/thor/base.rb#483 def all_commands; end # Returns the commands for this Thor class and all subclasses. @@ -1852,13 +1947,13 @@ module Thor::Base::ClassMethods # Hash:: An ordered hash with commands names as keys and Thor::Command # objects as values. # - # source://thor//lib/thor/base.rb#486 + # source://thor//lib/thor/base.rb#487 def all_tasks; end # If you want to use defaults that don't match the type of an option, # either specify `check_default_type: false` or call `allow_incompatible_default_type!` # - # source://thor//lib/thor/base.rb#189 + # source://thor//lib/thor/base.rb#190 def allow_incompatible_default_type!; end # Adds an argument to the class and creates an attr_accessor for it. @@ -1896,7 +1991,7 @@ module Thor::Base::ClassMethods # ==== Errors # ArgumentError:: Raised if you supply a required argument after a non required one. # - # source://thor//lib/thor/base.rb#261 + # source://thor//lib/thor/base.rb#262 def argument(name, options = T.unsafe(nil)); end # Returns this class arguments, looking up in the ancestors chain. @@ -1904,40 +1999,40 @@ module Thor::Base::ClassMethods # ==== Returns # Array[Thor::Argument] # - # source://thor//lib/thor/base.rb#293 + # source://thor//lib/thor/base.rb#294 def arguments; end - # source://thor//lib/thor/base.rb#162 + # source://thor//lib/thor/base.rb#163 def attr_accessor(*_arg0); end - # source://thor//lib/thor/base.rb#154 + # source://thor//lib/thor/base.rb#155 def attr_reader(*_arg0); end - # source://thor//lib/thor/base.rb#158 + # source://thor//lib/thor/base.rb#159 def attr_writer(*_arg0); end - # source://thor//lib/thor/base.rb#193 + # source://thor//lib/thor/base.rb#194 def check_default_type; end # If you want to raise an error when the default value of an option does not match # the type call check_default_type! # This will be the default; for compatibility a deprecation warning is issued if necessary. # - # source://thor//lib/thor/base.rb#183 + # source://thor//lib/thor/base.rb#184 def check_default_type!; end - # source://thor//lib/thor/base.rb#172 + # source://thor//lib/thor/base.rb#173 def check_unknown_options; end # If you want to raise an error for unknown options, call check_unknown_options! # This is disabled by default to allow dynamic invocations. # - # source://thor//lib/thor/base.rb#168 + # source://thor//lib/thor/base.rb#169 def check_unknown_options!; end # @return [Boolean] # - # source://thor//lib/thor/base.rb#176 + # source://thor//lib/thor/base.rb#177 def check_unknown_options?(config); end # Adds and declares option group for required at least one of options in the @@ -1970,7 +2065,7 @@ module Thor::Base::ClassMethods # # Then it is required either only one of "--one" or "--two". # - # source://thor//lib/thor/base.rb#392 + # source://thor//lib/thor/base.rb#393 def class_at_least_one(*args, &block); end # Returns this class at least one of required options array set, looking up in the ancestors chain. @@ -1978,7 +2073,7 @@ module Thor::Base::ClassMethods # ==== Returns # Array[Array[Thor::Option.name]] # - # source://thor//lib/thor/base.rb#411 + # source://thor//lib/thor/base.rb#412 def class_at_least_one_option_names; end # Adds and declares option group for exclusive options in the @@ -2003,7 +2098,7 @@ module Thor::Base::ClassMethods # If you give "--one" and "--two" at the same time ExclusiveArgumentsError # will be raised. # - # source://thor//lib/thor/base.rb#357 + # source://thor//lib/thor/base.rb#358 def class_exclusive(*args, &block); end # Returns this class exclusive options array set, looking up in the ancestors chain. @@ -2011,7 +2106,7 @@ module Thor::Base::ClassMethods # ==== Returns # Array[Array[Thor::Option.name]] # - # source://thor//lib/thor/base.rb#402 + # source://thor//lib/thor/base.rb#403 def class_exclusive_option_names; end # Adds an option to the set of class options @@ -2030,7 +2125,7 @@ module Thor::Base::ClassMethods # :banner:: -- String to show on usage notes. # :hide:: -- If you want to hide this option from the help. # - # source://thor//lib/thor/base.rb#328 + # source://thor//lib/thor/base.rb#329 def class_option(name, options = T.unsafe(nil)); end # Adds a bunch of options to the set of class options. @@ -2042,7 +2137,7 @@ module Thor::Base::ClassMethods # ==== Parameters # Hash[Symbol => Object] # - # source://thor//lib/thor/base.rb#306 + # source://thor//lib/thor/base.rb#307 def class_options(options = T.unsafe(nil)); end # Returns the commands for this Thor class. @@ -2051,7 +2146,7 @@ module Thor::Base::ClassMethods # Hash:: An ordered hash with commands names as keys and Thor::Command # objects as values. # - # source://thor//lib/thor/base.rb#471 + # source://thor//lib/thor/base.rb#472 def commands; end # If true, option set will not suspend the execution of the command when @@ -2059,14 +2154,14 @@ module Thor::Base::ClassMethods # # @return [Boolean] # - # source://thor//lib/thor/base.rb#207 + # source://thor//lib/thor/base.rb#208 def disable_required_check?(command_name); end # A flag that makes the process exit with status 1 if any error happens. # # @return [Boolean] # - # source://thor//lib/thor/base.rb#628 + # source://thor//lib/thor/base.rb#629 def exit_on_failure?; end # Defines the group. This is used when thor list is invoked so you can specify @@ -2075,22 +2170,22 @@ module Thor::Base::ClassMethods # ==== Parameters # name # - # source://thor//lib/thor/base.rb#457 + # source://thor//lib/thor/base.rb#458 def group(name = T.unsafe(nil)); end # @raise [InvocationError] # - # source://thor//lib/thor/base.rb#618 + # source://thor//lib/thor/base.rb#619 def handle_argument_error(command, error, args, arity); end # @raise [UndefinedCommandError] # - # source://thor//lib/thor/base.rb#613 + # source://thor//lib/thor/base.rb#614 def handle_no_command_error(command, has_namespace = T.unsafe(nil)); end # @raise [UndefinedCommandError] # - # source://thor//lib/thor/base.rb#616 + # source://thor//lib/thor/base.rb#617 def handle_no_task_error(command, has_namespace = T.unsafe(nil)); end # Sets the namespace for the Thor or Thor::Group class. By default the @@ -2115,7 +2210,7 @@ module Thor::Base::ClassMethods # # thor :my_command # - # source://thor//lib/thor/base.rb#566 + # source://thor//lib/thor/base.rb#567 def namespace(name = T.unsafe(nil)); end # All methods defined inside the given block are not added as commands. @@ -2137,15 +2232,15 @@ module Thor::Base::ClassMethods # remove_command :this_is_not_a_command # end # - # source://thor//lib/thor/base.rb#530 + # source://thor//lib/thor/base.rb#531 def no_commands(&block); end # @return [Boolean] # - # source://thor//lib/thor/base.rb#540 + # source://thor//lib/thor/base.rb#541 def no_commands?; end - # source://thor//lib/thor/base.rb#536 + # source://thor//lib/thor/base.rb#537 def no_commands_context; end # All methods defined inside the given block are not added as commands. @@ -2167,7 +2262,7 @@ module Thor::Base::ClassMethods # remove_command :this_is_not_a_command # end # - # source://thor//lib/thor/base.rb#534 + # source://thor//lib/thor/base.rb#535 def no_tasks(&block); end # Allows to use private methods from parent in child classes as commands. @@ -2180,7 +2275,7 @@ module Thor::Base::ClassMethods # public_command :foo # public_command :foo, :bar, :baz # - # source://thor//lib/thor/base.rb#606 + # source://thor//lib/thor/base.rb#607 def public_command(*names); end # Allows to use private methods from parent in child classes as commands. @@ -2193,7 +2288,7 @@ module Thor::Base::ClassMethods # public_command :foo # public_command :foo, :bar, :baz # - # source://thor//lib/thor/base.rb#611 + # source://thor//lib/thor/base.rb#612 def public_task(*names); end # Removes a previous defined argument. If :undefine is given, undefine @@ -2207,7 +2302,7 @@ module Thor::Base::ClassMethods # remove_argument :foo # remove_argument :foo, :bar, :baz, :undefine => true # - # source://thor//lib/thor/base.rb#426 + # source://thor//lib/thor/base.rb#427 def remove_argument(*names); end # Removes a previous defined class option. @@ -2220,7 +2315,7 @@ module Thor::Base::ClassMethods # remove_class_option :foo # remove_class_option :foo, :bar, :baz # - # source://thor//lib/thor/base.rb#445 + # source://thor//lib/thor/base.rb#446 def remove_class_option(*names); end # Removes a given command from this Thor class. This is usually done if you @@ -2235,7 +2330,7 @@ module Thor::Base::ClassMethods # options:: You can give :undefine => true if you want commands the method # to be undefined from the class as well. # - # source://thor//lib/thor/base.rb#500 + # source://thor//lib/thor/base.rb#501 def remove_command(*names); end # Removes a given command from this Thor class. This is usually done if you @@ -2250,7 +2345,7 @@ module Thor::Base::ClassMethods # options:: You can give :undefine => true if you want commands the method # to be undefined from the class as well. # - # source://thor//lib/thor/base.rb#509 + # source://thor//lib/thor/base.rb#510 def remove_task(*names); end # Parses the command and options from the given args, instantiate the class @@ -2261,7 +2356,7 @@ module Thor::Base::ClassMethods # script = MyScript.new(args, options, config) # script.invoke(:command, first_arg, second_arg, third_arg) # - # source://thor//lib/thor/base.rb#582 + # source://thor//lib/thor/base.rb#583 def start(given_args = T.unsafe(nil), config = T.unsafe(nil)); end # If true, option parsing is suspended as soon as an unknown option or a @@ -2270,22 +2365,22 @@ module Thor::Base::ClassMethods # # @return [Boolean] # - # source://thor//lib/thor/base.rb#201 + # source://thor//lib/thor/base.rb#202 def stop_on_unknown_option?(command_name); end - # source://thor//lib/thor/base.rb#218 + # source://thor//lib/thor/base.rb#219 def strict_args_position; end # If you want only strict string args (useful when cascading thor classes), # call strict_args_position! This is disabled by default to allow dynamic # invocations. # - # source://thor//lib/thor/base.rb#214 + # source://thor//lib/thor/base.rb#215 def strict_args_position!; end # @return [Boolean] # - # source://thor//lib/thor/base.rb#222 + # source://thor//lib/thor/base.rb#223 def strict_args_position?(config); end # Returns the commands for this Thor class. @@ -2294,7 +2389,7 @@ module Thor::Base::ClassMethods # Hash:: An ordered hash with commands names as keys and Thor::Command # objects as values. # - # source://thor//lib/thor/base.rb#474 + # source://thor//lib/thor/base.rb#475 def tasks; end protected @@ -2302,12 +2397,12 @@ module Thor::Base::ClassMethods # SIGNATURE: Sets the baseclass. This is where the superclass lookup # finishes. # - # source://thor//lib/thor/base.rb#777 + # source://thor//lib/thor/base.rb#778 def baseclass; end # The basename of the program invoking the thor class. # - # source://thor//lib/thor/base.rb#771 + # source://thor//lib/thor/base.rb#772 def basename; end # Build an option and adds it to the given scope. @@ -2317,7 +2412,7 @@ module Thor::Base::ClassMethods # options:: Described in both class_option and method_option. # scope:: Options hash that is being built up # - # source://thor//lib/thor/base.rb#688 + # source://thor//lib/thor/base.rb#689 def build_option(name, options, scope); end # Receives a hash of options, parse them and add to the scope. This is a @@ -2328,99 +2423,99 @@ module Thor::Base::ClassMethods # ==== Parameters # Hash[Symbol => Object] # - # source://thor//lib/thor/base.rb#699 + # source://thor//lib/thor/base.rb#700 def build_options(options, scope); end # Get target(method_options or class_options) options # of before and after by block evaluation. # - # source://thor//lib/thor/base.rb#808 + # source://thor//lib/thor/base.rb#809 def built_option_names(target, opt = T.unsafe(nil), &block); end # Prints the class options per group. If an option does not belong to # any group, it's printed as Class option. # - # source://thor//lib/thor/base.rb#638 + # source://thor//lib/thor/base.rb#639 def class_options_help(shell, groups = T.unsafe(nil)); end # Get command scope member by name. # - # source://thor//lib/thor/base.rb#816 + # source://thor//lib/thor/base.rb#817 def command_scope_member(name, options = T.unsafe(nil)); end # SIGNATURE: Creates a new command if valid_command? is true. This method is # called when a new method is added to the class. # - # source://thor//lib/thor/base.rb#782 + # source://thor//lib/thor/base.rb#783 def create_command(meth); end # SIGNATURE: Creates a new command if valid_command? is true. This method is # called when a new method is added to the class. # - # source://thor//lib/thor/base.rb#784 + # source://thor//lib/thor/base.rb#785 def create_task(meth); end # SIGNATURE: The hook invoked by start. # # @raise [NotImplementedError] # - # source://thor//lib/thor/base.rb#792 + # source://thor//lib/thor/base.rb#793 def dispatch(command, given_args, given_opts, config); end # Finds a command with the given name. If the command belongs to the current # class, just return it, otherwise dup it and add the fresh copy to the # current command hash. # - # source://thor//lib/thor/base.rb#708 + # source://thor//lib/thor/base.rb#709 def find_and_refresh_command(name); end # Finds a command with the given name. If the command belongs to the current # class, just return it, otherwise dup it and add the fresh copy to the # current command hash. # - # source://thor//lib/thor/base.rb#717 + # source://thor//lib/thor/base.rb#718 def find_and_refresh_task(name); end # Retrieves a value from superclass. If it reaches the baseclass, # returns default. # - # source://thor//lib/thor/base.rb#749 + # source://thor//lib/thor/base.rb#750 def from_superclass(method, default = T.unsafe(nil)); end # Every time someone inherits from a Thor class, register the klass # and file into baseclass. # - # source://thor//lib/thor/base.rb#721 + # source://thor//lib/thor/base.rb#722 def inherited(klass); end # SIGNATURE: Defines behavior when the initialize method is added to the # class. # - # source://thor//lib/thor/base.rb#788 + # source://thor//lib/thor/base.rb#789 def initialize_added; end # Raises an error if the word given is a Thor reserved word. # # @return [Boolean] # - # source://thor//lib/thor/base.rb#677 + # source://thor//lib/thor/base.rb#678 def is_thor_reserved_word?(word, type); end # Fire this callback whenever a method is added. Added methods are # tracked as commands by invoking the create_command method. # - # source://thor//lib/thor/base.rb#729 + # source://thor//lib/thor/base.rb#730 def method_added(meth); end # Receives a set of options and print them. # - # source://thor//lib/thor/base.rb#656 + # source://thor//lib/thor/base.rb#657 def print_options(shell, options, group_name = T.unsafe(nil)); end # Register a relation of options for target(method_option/class_option) # by args and block. # - # source://thor//lib/thor/base.rb#798 + # source://thor//lib/thor/base.rb#799 def register_options_relation_for(target, relation, *args, &block); end end @@ -2804,7 +2899,7 @@ class Thor::Group end end -# Shortcuts for help. +# Shortcuts for help and tree commands. # # source://thor//lib/thor/base.rb#17 Thor::HELP_MAPPINGS = T.let(T.unsafe(nil), Array) @@ -3671,13 +3766,13 @@ class Thor::Shell::Basic protected - # source://thor//lib/thor/shell/basic.rb#362 + # source://thor//lib/thor/shell/basic.rb#360 def answer_match(possibilities, answer, case_insensitive); end - # source://thor//lib/thor/shell/basic.rb#349 + # source://thor//lib/thor/shell/basic.rb#347 def ask_filtered(statement, color, options); end - # source://thor//lib/thor/shell/basic.rb#332 + # source://thor//lib/thor/shell/basic.rb#330 def ask_simply(statement, color, options); end # @return [Boolean] @@ -3685,12 +3780,12 @@ class Thor::Shell::Basic # source://thor//lib/thor/shell/basic.rb#269 def can_display_colors?; end + # source://thor//lib/thor/shell/basic.rb#384 + def diff_tool; end + # source://thor//lib/thor/shell/basic.rb#296 def file_collision_help(block_given); end - # source://thor//lib/thor/shell/basic.rb#383 - def git_merge_tool; end - # @return [Boolean] # # source://thor//lib/thor/shell/basic.rb#286 @@ -3699,10 +3794,10 @@ class Thor::Shell::Basic # source://thor//lib/thor/shell/basic.rb#273 def lookup_color(color); end - # source://thor//lib/thor/shell/basic.rb#370 + # source://thor//lib/thor/shell/basic.rb#368 def merge(destination, content); end - # source://thor//lib/thor/shell/basic.rb#379 + # source://thor//lib/thor/shell/basic.rb#377 def merge_tool; end # source://thor//lib/thor/shell/basic.rb#264 @@ -3710,7 +3805,7 @@ class Thor::Shell::Basic # @return [Boolean] # - # source://thor//lib/thor/shell/basic.rb#324 + # source://thor//lib/thor/shell/basic.rb#322 def quiet?; end # source://thor//lib/thor/shell/basic.rb#313 @@ -3724,14 +3819,14 @@ class Thor::Shell::Basic # @return [Boolean] # - # source://thor//lib/thor/shell/basic.rb#328 + # source://thor//lib/thor/shell/basic.rb#326 def unix?; end end # Inherit from Thor::Shell::Basic and add set_color behavior. Check # Thor::Shell::Basic to see all available methods. # -# source://thor//lib/thor/shell/color.rb#9 +# source://thor//lib/thor/shell/color.rb#11 class Thor::Shell::Color < ::Thor::Shell::Basic include ::LCSDiff @@ -3767,115 +3862,115 @@ class Thor::Shell::Color < ::Thor::Shell::Basic # :on_cyan # :on_white # - # source://thor//lib/thor/shell/color.rb#82 + # source://thor//lib/thor/shell/color.rb#84 def set_color(string, *colors); end protected # @return [Boolean] # - # source://thor//lib/thor/shell/color.rb#110 + # source://thor//lib/thor/shell/color.rb#112 def are_colors_disabled?; end # @return [Boolean] # - # source://thor//lib/thor/shell/color.rb#106 + # source://thor//lib/thor/shell/color.rb#108 def are_colors_supported?; end # @return [Boolean] # - # source://thor//lib/thor/shell/color.rb#102 + # source://thor//lib/thor/shell/color.rb#104 def can_display_colors?; end end # Set the terminal's foreground ANSI color to black. # -# source://thor//lib/thor/shell/color.rb#18 +# source://thor//lib/thor/shell/color.rb#20 Thor::Shell::Color::BLACK = T.let(T.unsafe(nil), String) # Set the terminal's foreground ANSI color to blue. # -# source://thor//lib/thor/shell/color.rb#26 +# source://thor//lib/thor/shell/color.rb#28 Thor::Shell::Color::BLUE = T.let(T.unsafe(nil), String) # The start of an ANSI bold sequence. # -# source://thor//lib/thor/shell/color.rb#15 +# source://thor//lib/thor/shell/color.rb#17 Thor::Shell::Color::BOLD = T.let(T.unsafe(nil), String) # Embed in a String to clear all previous ANSI sequences. # -# source://thor//lib/thor/shell/color.rb#13 +# source://thor//lib/thor/shell/color.rb#15 Thor::Shell::Color::CLEAR = T.let(T.unsafe(nil), String) # Set the terminal's foreground ANSI color to cyan. # -# source://thor//lib/thor/shell/color.rb#30 +# source://thor//lib/thor/shell/color.rb#32 Thor::Shell::Color::CYAN = T.let(T.unsafe(nil), String) # Set the terminal's foreground ANSI color to green. # -# source://thor//lib/thor/shell/color.rb#22 +# source://thor//lib/thor/shell/color.rb#24 Thor::Shell::Color::GREEN = T.let(T.unsafe(nil), String) # Set the terminal's foreground ANSI color to magenta. # -# source://thor//lib/thor/shell/color.rb#28 +# source://thor//lib/thor/shell/color.rb#30 Thor::Shell::Color::MAGENTA = T.let(T.unsafe(nil), String) # Set the terminal's background ANSI color to black. # -# source://thor//lib/thor/shell/color.rb#35 +# source://thor//lib/thor/shell/color.rb#37 Thor::Shell::Color::ON_BLACK = T.let(T.unsafe(nil), String) # Set the terminal's background ANSI color to blue. # -# source://thor//lib/thor/shell/color.rb#43 +# source://thor//lib/thor/shell/color.rb#45 Thor::Shell::Color::ON_BLUE = T.let(T.unsafe(nil), String) # Set the terminal's background ANSI color to cyan. # -# source://thor//lib/thor/shell/color.rb#47 +# source://thor//lib/thor/shell/color.rb#49 Thor::Shell::Color::ON_CYAN = T.let(T.unsafe(nil), String) # Set the terminal's background ANSI color to green. # -# source://thor//lib/thor/shell/color.rb#39 +# source://thor//lib/thor/shell/color.rb#41 Thor::Shell::Color::ON_GREEN = T.let(T.unsafe(nil), String) # Set the terminal's background ANSI color to magenta. # -# source://thor//lib/thor/shell/color.rb#45 +# source://thor//lib/thor/shell/color.rb#47 Thor::Shell::Color::ON_MAGENTA = T.let(T.unsafe(nil), String) # Set the terminal's background ANSI color to red. # -# source://thor//lib/thor/shell/color.rb#37 +# source://thor//lib/thor/shell/color.rb#39 Thor::Shell::Color::ON_RED = T.let(T.unsafe(nil), String) # Set the terminal's background ANSI color to white. # -# source://thor//lib/thor/shell/color.rb#49 +# source://thor//lib/thor/shell/color.rb#51 Thor::Shell::Color::ON_WHITE = T.let(T.unsafe(nil), String) # Set the terminal's background ANSI color to yellow. # -# source://thor//lib/thor/shell/color.rb#41 +# source://thor//lib/thor/shell/color.rb#43 Thor::Shell::Color::ON_YELLOW = T.let(T.unsafe(nil), String) # Set the terminal's foreground ANSI color to red. # -# source://thor//lib/thor/shell/color.rb#20 +# source://thor//lib/thor/shell/color.rb#22 Thor::Shell::Color::RED = T.let(T.unsafe(nil), String) # Set the terminal's foreground ANSI color to white. # -# source://thor//lib/thor/shell/color.rb#32 +# source://thor//lib/thor/shell/color.rb#34 Thor::Shell::Color::WHITE = T.let(T.unsafe(nil), String) # Set the terminal's foreground ANSI color to yellow. # -# source://thor//lib/thor/shell/color.rb#24 +# source://thor//lib/thor/shell/color.rb#26 Thor::Shell::Color::YELLOW = T.let(T.unsafe(nil), String) # source://thor//lib/thor/shell/column_printer.rb#5 @@ -4088,14 +4183,17 @@ class Thor::Shell::WrappedPrinter < ::Thor::Shell::ColumnPrinter def print(message); end end -# source://thor//lib/thor/base.rb#23 +# source://thor//lib/thor/base.rb#24 Thor::TEMPLATE_EXTNAME = T.let(T.unsafe(nil), String) # Thor methods that should not be overwritten by the user. # -# source://thor//lib/thor/base.rb#20 +# source://thor//lib/thor/base.rb#21 Thor::THOR_RESERVED_WORDS = T.let(T.unsafe(nil), Array) +# source://thor//lib/thor/base.rb#18 +Thor::TREE_MAPPINGS = T.let(T.unsafe(nil), Array) + # source://thor//lib/thor/command.rb#126 Thor::Task = Thor::Command diff --git a/sorbet/rbi/gems/yard@0.9.37.rbi b/sorbet/rbi/gems/yard@0.9.38.rbi similarity index 98% rename from sorbet/rbi/gems/yard@0.9.37.rbi rename to sorbet/rbi/gems/yard@0.9.38.rbi index e7b2ce18e2..812cd367e6 100644 --- a/sorbet/rbi/gems/yard@0.9.37.rbi +++ b/sorbet/rbi/gems/yard@0.9.38.rbi @@ -19,14 +19,14 @@ class Array # an array. This is used in tandem with the before and after # methods of the {Insertion} class. # - # @example Places an item before another - # [1, 2, 3].place(4).before(3) # => [1, 2, 4, 3] # @example Places an item after another # [:a, :b, :c].place(:x).after(:a) # => [:a, :x, :b, :c] + # @example Places an item before another + # [1, 2, 3].place(4).before(3) # => [1, 2, 4, 3] # @param values [Array] value to insert # @return [Insertion] an insertion object to - # @see Insertion#before # @see Insertion#after + # @see Insertion#before # # source://yard//lib/yard/core_ext/array.rb#15 def place(*values); end @@ -410,8 +410,8 @@ class Insertion # # @example If subsections are ignored # Insertion.new([1, [2], 3], :X).after(1) # => [1, [2], :X, 3] - # @param val [Object] the object the value will be inserted after # @param recursive [Boolean] look inside sublists + # @param val [Object] the object the value will be inserted after # # source://yard//lib/yard/core_ext/insertion.rb#30 def after(val, recursive = T.unsafe(nil)); end @@ -425,8 +425,8 @@ class Insertion # Inserts the value before +val+ # - # @param val [Object] the object the value will be inserted before # @param recursive [Boolean] look inside sublists + # @param val [Object] the object the value will be inserted before # # source://yard//lib/yard/core_ext/insertion.rb#22 def before(val, recursive = T.unsafe(nil)); end @@ -442,11 +442,11 @@ class Insertion # This method performs the actual insertion # - # @param val [Object] the value to insert + # @param list [Array] the list to place objects into + # @param recursive [Boolean] look inside sublists # @param rel [Fixnum] the relative index (0 or 1) of where the object # should be placed - # @param recursive [Boolean] look inside sublists - # @param list [Array] the list to place objects into + # @param val [Object] the value to insert # # source://yard//lib/yard/core_ext/insertion.rb#49 def insertion(val, rel, recursive = T.unsafe(nil), list = T.unsafe(nil)); end @@ -699,9 +699,9 @@ class YARD::CLI::Command # Parses the option and gracefully handles invalid switches # - # @param opts [OptionParser] the option parser object # @param args [Array] the arguments passed from input. This # array will be modified. + # @param opts [OptionParser] the option parser object # @return [void] # @since 0.6.0 # @@ -1439,10 +1439,10 @@ class YARD::CLI::Server < ::YARD::CLI::Command # source://yard//lib/yard/cli/server.rb#76 def add_libraries(args); end - # @param library [String] The library name. # @param dir [String, nil] The argument provided on the CLI after the # library name. Is supposed to point to either a project directory # with a Yard options file, or a yardoc db. + # @param library [String] The library name. # @return [LibraryVersion, nil] # @since 0.6.0 # @@ -1509,10 +1509,10 @@ class YARD::CLI::Stats < ::YARD::CLI::Yardoc # Prints a statistic to standard out. This method is optimized for # getting Integer values, though it allows any data to be printed. # - # @param name [String] the statistic name # @param data [Integer, String] the numeric (or any) data representing # the statistic. If +data+ is an Integer, it should represent the # total objects of a type. + # @param name [String] the statistic name # @param undoc [Integer, nil] number of undocumented objects for the type # @return [void] # @since 0.6.0 @@ -1718,10 +1718,10 @@ class YARD::CLI::YRI < ::YARD::CLI::Command # Tries to load the object with name. If successful, caches the object # with the cache_path # - # @param name [String] the object path # @param cache_path [String] the location of the yardoc # db containing the object to cache for future lookups. # No caching is done if this is nil. + # @param name [String] the object path # @return [void] # # source://yard//lib/yard/cli/yri.rb#143 @@ -2046,8 +2046,8 @@ class YARD::CLI::Yardoc < ::YARD::CLI::YardoptsCommand # source://yard//lib/yard/cli/yardoc.rb#389 def copy_assets; end - # @param file [String] the filename to validate # @param check_exists [Boolean] whether the file should exist on disk + # @param file [String] the filename to validate # @return [Boolean] whether the file is allowed to be used # @since 0.2.1 # @@ -2079,10 +2079,10 @@ class YARD::CLI::Yardoc < ::YARD::CLI::YardoptsCommand # Parses the file arguments into Ruby files and extra files, which are # separated by a '-' element. # - # @example Parses a set of Ruby source files - # parse_files %w(file1 file2 file3) # @example Parses a set of Ruby files with a separator and extra files # parse_files %w(file1 file2 - extrafile1 extrafile2) + # @example Parses a set of Ruby source files + # parse_files %w(file1 file2 file3) # @param files [Array] the list of files to parse # @return [void] # @since 0.2.1 @@ -2449,11 +2449,11 @@ YARD::CodeObjects::BUILTIN_MODULES = T.let(T.unsafe(nil), Array) # subclass that implements {#path}, {#sep} or {#type}. You might also # need to register custom separators if {#sep} uses alternate separator # tokens. -# @see Registry -# @see #path # @see #[]= -# @see NamespaceObject +# @see #path # @see NamespaceMapper.register_separator +# @see NamespaceObject +# @see Registry # # source://yard//lib/yard/code_objects/base.rb#133 class YARD::CodeObjects::Base @@ -2464,10 +2464,10 @@ class YARD::CodeObjects::Base # @example Create class Z inside namespace X::Y # CodeObjects::Base.new(P("X::Y"), :Z) # or # CodeObjects::Base.new(Registry.root, "X::Y") - # @param namespace [NamespaceObject] the namespace the object belongs in, + # @param name [Symbol, String] the name (or complex path) of the object. + # @param namespace [NamespaceObject, :root, nil] the namespace the object belongs in, # {Registry.root} or :root should be provided if it is associated with # the top level namespace. - # @param name [Symbol, String] the name (or complex path) of the object. # @return [Base] the newly created object # @yield [self] a block to perform any extra initialization on the object # @yieldparam self [Base] the newly initialized code object @@ -2507,10 +2507,10 @@ class YARD::CodeObjects::Base # By convention, '' should be used to associate code that comes form standard input. # # @param file [String] the filename ('' for standard input) - # @param line [Fixnum, nil] the line number where the object lies in the file # @param has_comments [Boolean] whether or not the definition has comments associated. This # will allow {#file} to return the definition where the comments were made instead # of any empty definitions that might have been parsed before (module namespaces for instance). + # @param line [Fixnum, nil] the line number where the object lies in the file # @raise [ArgumentError] # # source://yard//lib/yard/code_objects/base.rb#290 @@ -3118,9 +3118,9 @@ end class YARD::CodeObjects::ExtraFileObject # Creates a new extra file object. # - # @param filename [String] the location on disk of the file # @param contents [String] the file contents. If not set, the contents # will be read from disk using the +filename+. + # @param filename [String] the location on disk of the file # @return [ExtraFileObject] a new instance of ExtraFileObject # # source://yard//lib/yard/code_objects/extra_file_object.rb#18 @@ -3277,11 +3277,11 @@ class YARD::CodeObjects::MacroObject < ::YARD::CodeObjects::Base # @example Expanding a Macro # macro.expand(%w(property foo bar), 'property :foo, :bar', '') #=> # "...macro data interpolating this line of code..." + # @param block_source [String] the source passed in the block of the method + # call, if there is a block. # @param call_params [Array] a list of tokens that are passed # to the method call # @param full_source [String] the full method call (not including the block) - # @param block_source [String] the source passed in the block of the method - # call, if there is a block. # @see expand # # source://yard//lib/yard/code_objects/macro_object.rb#166 @@ -3324,13 +3324,13 @@ class YARD::CodeObjects::MacroObject < ::YARD::CodeObjects::Base # the docstring first. Equivalent to calling {find_or_create} and {apply_macro} # on the new macro object. # - # @param docstring [Docstring] the docstring to create a macro out of + # @param block_source [String] Currently unused. Will support + # interpolating the block data as a variable. # @param call_params [Array] the method name and parameters # to the method call. These arguments will fill $0-N + # @param docstring [Docstring] the docstring to create a macro out of # @param full_source [String] the full source line (excluding block) # interpolated as $* - # @param block_source [String] Currently unused. Will support - # interpolating the block data as a variable. # @return [String] the expanded macro data # @see find_or_create # @@ -3341,13 +3341,13 @@ class YARD::CodeObjects::MacroObject < ::YARD::CodeObjects::Base # docstring and appending any extra local docstring data that was in # the original +docstring+ object. # - # @param macro [MacroObject] the macro object + # @param block_source [String] Currently unused. Will support + # interpolating the block data as a variable. # @param call_params [Array] the method name and parameters # to the method call. These arguments will fill $0-N # @param full_source [String] the full source line (excluding block) # interpolated as $* - # @param block_source [String] Currently unused. Will support - # interpolating the block data as a variable. + # @param macro [MacroObject] the macro object # @return [String] the expanded macro data # # source://yard//lib/yard/code_objects/macro_object.rb#135 @@ -3355,8 +3355,8 @@ class YARD::CodeObjects::MacroObject < ::YARD::CodeObjects::Base # Creates a new macro and fills in the relevant properties. # - # @param macro_name [String] the name of the macro, must be unique. # @param data [String] the data the macro should expand when re-used + # @param macro_name [String] the name of the macro, must be unique. # @param method_object [CodeObjects::Base] an object to attach this # macro to. If supplied, {#attached?} will be true # @return [MacroObject] the newly created object @@ -3442,8 +3442,8 @@ class YARD::CodeObjects::MethodObject < ::YARD::CodeObjects::Base # method in +:class+ scope, but also creates a new (empty) method # as a private +:instance+ method on the same class or module. # - # @param namespace [NamespaceObject] the namespace # @param name [String, Symbol] the method name + # @param namespace [NamespaceObject] the namespace # @param scope [Symbol] +:instance+, +:class+, or +:module+ # @return [MethodObject] a new instance of MethodObject # @@ -3519,10 +3519,10 @@ class YARD::CodeObjects::MethodObject < ::YARD::CodeObjects::Base # Returns the name of the object. # - # @example The name of an instance method (with prefix) - # an_instance_method.name(true) # => "#mymethod" # @example The name of a class method (with prefix) # a_class_method.name(true) # => "mymethod" + # @example The name of an instance method (with prefix) + # an_instance_method.name(true) # => "#mymethod" # @param prefix [Boolean] whether or not to show the prefix # @return [String] returns {#sep} + +name+ for an instance method if # prefix is true @@ -3949,8 +3949,8 @@ YARD::CodeObjects::PROXY_MATCH = T.let(T.unsafe(nil), Regexp) # # When the String class is parsed this method will # # begin to act like the String ClassObject. # Proxy.new(mymoduleobj, "String") -# @see Registry.resolve # @see ProxyMethodError +# @see Registry.resolve # # source://yard//lib/yard/code_objects/proxy.rb#24 class YARD::CodeObjects::Proxy @@ -4703,14 +4703,14 @@ class YARD::Docstring < ::String # a {DocstringParser}. This method is called by +DocstringParser+ # when creating the new docstring object. # - # @param text [String] the textual portion of the docstring - # @param tags [Array] the list of tag objects in the docstring # @param object [CodeObjects::Base, nil] the object associated with the # docstring. May be nil. # @param raw_data [String] the complete docstring, including all # original formatting and any unparsed tags/directives. # @param ref_object [CodeObjects::Base, nil] a reference object used for # the base set of documentation / tag information. + # @param tags [Array] the list of tag objects in the docstring + # @param text [String] the textual portion of the docstring # # source://yard//lib/yard/docstring.rb#77 def new!(text, tags = T.unsafe(nil), object = T.unsafe(nil), raw_data = T.unsafe(nil), ref_object = T.unsafe(nil)); end @@ -4748,8 +4748,6 @@ YARD::Docstring::META_MATCH = T.let(T.unsafe(nil), Regexp) # subclass. This allows developers to change the way docstrings are # parsed, allowing for completely different docstring syntaxes. # -# @example Creating a Docstring with a DocstringParser -# DocstringParser.new.parse("text here").to_docstring # @example Creating a Custom DocstringParser # # Parses docstrings backwards! # class ReverseDocstringParser @@ -4760,6 +4758,8 @@ YARD::Docstring::META_MATCH = T.let(T.unsafe(nil), Regexp) # # # Set the parser as default when parsing # YARD::Docstring.default_parser = ReverseDocstringParser +# @example Creating a Docstring with a DocstringParser +# DocstringParser.new.parse("text here").to_docstring # @see #parse_content # @since 0.8.0 # @@ -4794,8 +4794,8 @@ class YARD::DocstringParser # # To add an already created tag object, append it to {#tags}. # - # @param tag_name [String] the tag name # @param tag_buf [String] the text attached to the tag with newlines removed. + # @param tag_name [String] the tag name # @return [Tags::Tag, Tags::RefTag] a tag # @since 0.8.0 # @@ -4867,12 +4867,12 @@ class YARD::DocstringParser # Parses all content and returns itself. # # @param content [String] the docstring text to parse - # @param object [CodeObjects::Base] the object that the docstring - # is attached to. Will be passed to directives to act on - # this object. # @param handler [Handlers::Base, nil] the handler object that is # parsing this object. May be nil if this parser is not being # called from a {Parser::SourceParser} context. + # @param object [CodeObjects::Base] the object that the docstring + # is attached to. Will be passed to directives to act on + # this object. # @return [self] the parser object. To get the docstring, # call {#to_docstring}. # @see #to_docstring @@ -5200,13 +5200,13 @@ module YARD::Handlers; end # # @abstract Subclass this class to provide a handler for YARD to use # during the processing phase. -# @see CodeObjects::Base -# @see CodeObjects::NamespaceObject -# @see handles # @see #namespace # @see #owner -# @see #register # @see #parse_block +# @see #register +# @see CodeObjects::Base +# @see CodeObjects::NamespaceObject +# @see handles # # source://yard//lib/yard/handlers/base.rb#149 class YARD::Handlers::Base @@ -5234,7 +5234,7 @@ class YARD::Handlers::Base # @raise [NotImplementedError] # @return [Array] a list of argument names # - # source://yard//lib/yard/handlers/base.rb#581 + # source://yard//lib/yard/handlers/base.rb#603 def call_params; end # @abstract Implement this method to return the method being called in @@ -5244,7 +5244,7 @@ class YARD::Handlers::Base # @return [String] the method name being called # @return [nil] if the statement is not a method call # - # source://yard//lib/yard/handlers/base.rb#590 + # source://yard//lib/yard/handlers/base.rb#612 def caller_method; end # Ensures that a specific +object+ has been parsed and loaded into the @@ -5260,14 +5260,14 @@ class YARD::Handlers::Base # ensure_loaded! P('String') # # "String" is now guaranteed to be loaded # P('String').mixins << P('MyMixin') - # @param object [Proxy, CodeObjects::Base] the object to resolve. # @param max_retries [Integer] the number of times to defer the handler # before raising a +NamespaceMissingError+. + # @param object [Proxy, CodeObjects::Base] the object to resolve. # @raise [NamespaceMissingError] if the object is not resolved within # +max_retries+ attempts, this exception is raised and the handler # finishes processing. # - # source://yard//lib/yard/handlers/base.rb#561 + # source://yard//lib/yard/handlers/base.rb#583 def ensure_loaded!(object, max_retries = T.unsafe(nil)); end # Returns the value of attribute extra_state. @@ -5330,8 +5330,8 @@ class YARD::Handlers::Base # attributes. It is not necessary to return any objects and in # some cases you may want to explicitly avoid the returning of # any objects for post-processing by the register method. - # @see handles # @see #register + # @see handles # # source://yard//lib/yard/handlers/base.rb#297 def process; end @@ -5376,7 +5376,7 @@ class YARD::Handlers::Base # @return [void] # @since 0.8.0 # - # source://yard//lib/yard/handlers/base.rb#537 + # source://yard//lib/yard/handlers/base.rb#559 def register_dynamic(object); end # Ensures that the object's namespace is loaded before attaching it @@ -5404,7 +5404,7 @@ class YARD::Handlers::Base # @return [void] # @since 0.8.0 # - # source://yard//lib/yard/handlers/base.rb#473 + # source://yard//lib/yard/handlers/base.rb#485 def register_group(object, group = T.unsafe(nil)); end # Registers the same method information on the module function, if @@ -5414,14 +5414,14 @@ class YARD::Handlers::Base # to copy data for # @since 0.8.0 # - # source://yard//lib/yard/handlers/base.rb#523 + # source://yard//lib/yard/handlers/base.rb#545 def register_module_function(object); end # @param object [CodeObjects::Base] the object to register # @return [void] # @since 0.8.0 # - # source://yard//lib/yard/handlers/base.rb#499 + # source://yard//lib/yard/handlers/base.rb#511 def register_source(object, source = T.unsafe(nil), type = T.unsafe(nil)); end # Registers any transitive tags from the namespace on the object @@ -5430,7 +5430,7 @@ class YARD::Handlers::Base # @return [void] # @since 0.8.0 # - # source://yard//lib/yard/handlers/base.rb#487 + # source://yard//lib/yard/handlers/base.rb#499 def register_transitive_tags(object); end # Registers visibility on a method object. If the object does not @@ -5440,7 +5440,7 @@ class YARD::Handlers::Base # @param visibility [Symbol] the visibility to set on the object # @since 0.8.0 # - # source://yard//lib/yard/handlers/base.rb#511 + # source://yard//lib/yard/handlers/base.rb#523 def register_visibility(object, visibility = T.unsafe(nil)); end # Returns the value of attribute scope. @@ -6346,19 +6346,22 @@ class YARD::Handlers::Ruby::ConstantHandler < ::YARD::Handlers::Ruby::Base private - # Extract the parameters from the Struct.new AST node, returning them as a list + # Extract the parameters from the Struct.new or Data.define AST node, returning them as a list # of strings # - # @param superclass [MethodCallNode] the AST node for the Struct.new call + # @param superclass [MethodCallNode] the AST node for the Struct.new or Data.define call # @return [Array] the member names to generate methods for # - # source://yard//lib/yard/handlers/ruby/constant_handler.rb#49 + # source://yard//lib/yard/handlers/ruby/constant_handler.rb#66 def extract_parameters(superclass); end - # source://yard//lib/yard/handlers/ruby/constant_handler.rb#21 + # source://yard//lib/yard/handlers/ruby/constant_handler.rb#24 def process_constant(statement); end - # source://yard//lib/yard/handlers/ruby/constant_handler.rb#33 + # source://yard//lib/yard/handlers/ruby/constant_handler.rb#47 + def process_dataclass(statement); end + + # source://yard//lib/yard/handlers/ruby/constant_handler.rb#36 def process_structclass(statement); end end @@ -6552,7 +6555,6 @@ class YARD::Handlers::Ruby::Legacy::Base < ::YARD::Handlers::Base # tokval(TokenList.new('identifier').first, RubyToken::TkId) => "identifier" # tokval(TokenList.new('3.25').first) => 3.25 # tokval(TokenList.new('/xyz/i').first) => /xyz/i - # @param token [Token] The token of the class # @param accepted_types [Array>, Symbol] The allowed token types that this token can be. Defaults to [{TkVal}]. # A list of types would be, for example, [+TkSTRING+, +TkSYMBOL+], to return # the token's value if it is either of those types. If +TkVal+ is accepted, @@ -6564,6 +6566,7 @@ class YARD::Handlers::Ruby::Legacy::Base < ::YARD::Handlers::Base # :attr => +TkSYMBOL+ and +TkSTRING+ # :identifier => +TkIDENTIFIER, +TkFID+ and +TkGVAR+. # :number => +TkFLOAT+, +TkINTEGER+ + # @param token [Token] The token of the class # @return [Object] if the token is one of the accepted types, in its real value form. # It should be noted that identifiers and constants are kept in String form. # @return [nil] if the token is not any of the specified accepted types @@ -6587,8 +6590,8 @@ class YARD::Handlers::Ruby::Legacy::Base < ::YARD::Handlers::Base # any ruby keyword encountered: # "attr_accessor :a, :b, :c if x == 5" => ['a', 'b', 'c'] # - # @param tokenlist [TokenList] The list of tokens to process. # @param accepted_types [Array>] passed to {#tokval} + # @param tokenlist [TokenList] The list of tokens to process. # @return [Array] the list of tokvalues in the list. # @return [Array] if there are no symbols or Strings in the list # @see #tokval @@ -7002,7 +7005,7 @@ class YARD::Handlers::Ruby::VisibilityHandler < ::YARD::Handlers::Ruby::Base # @return [Boolean] # - # source://yard//lib/yard/handlers/ruby/visibility_handler.rb#31 + # source://yard//lib/yard/handlers/ruby/visibility_handler.rb#32 def is_attribute_method?(node); end end @@ -7109,8 +7112,8 @@ class YARD::I18n::Message # Adds location information for the message. # - # @param path [String] the path where the message appears. # @param line [Integer] the line number where the message appears. + # @param path [String] the path where the message appears. # @return [void] # @since 0.8.1 # @@ -7412,13 +7415,13 @@ class YARD::I18n::Text # block separated by one or more empty lines. Empty line is a # line that contains only zero or more whitespaces. It may # called many times. - # @yieldparam text [String] the text of extracted paragraph. + # @yieldparam line_no [Integer] the defined line number of extracted + # attribute. + # @yieldparam name [String] the name of extracted attribute. # @yieldparam start_line_no [Integer] the start line number of # extracted paragraph. - # @yieldparam name [String] the name of extracted attribute. + # @yieldparam text [String] the text of extracted paragraph. # @yieldparam value [String] the value of extracted attribute. - # @yieldparam line_no [Integer] the defined line number of extracted - # attribute. # # source://yard//lib/yard/i18n/text.rb#35 def extract_messages; end @@ -7591,8 +7594,8 @@ class YARD::Logger # 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 + # @param severity [DEBUG, INFO, WARN, ERROR, FATAL, UNKNOWN] the severity level # # source://yard//lib/yard/logging.rb#122 def log(severity, message); end @@ -7848,6 +7851,19 @@ end # # @return [Symbol] the template to use when generating output # attr_accessor :template # end +# @example Deprecating an option while still supporting it +# class TemplateOptions < YARD::Options +# # @return [Boolean] if syntax highlighting should be performed on code blocks. +# # Defaults to true. +# attr_accessor :highlight +# +# # @deprecated Use {#highlight} instead. +# # @return [Boolean] if no syntax highlighting should be performs on code blocks. +# # Defaults to false. +# attr_accessor :no_highlight +# def no_highlight=(value) @highlight = !value end +# def no_highlight; !highlight end +# end # @example Initializing default option values # class TemplateOptions < YARD::Options # def reset_defaults @@ -7864,19 +7880,6 @@ end # default_attr :template, :default # default_attr :highlight, true # end -# @example Deprecating an option while still supporting it -# class TemplateOptions < YARD::Options -# # @return [Boolean] if syntax highlighting should be performed on code blocks. -# # Defaults to true. -# attr_accessor :highlight -# -# # @deprecated Use {#highlight} instead. -# # @return [Boolean] if no syntax highlighting should be performs on code blocks. -# # Defaults to false. -# attr_accessor :no_highlight -# def no_highlight=(value) @highlight = !value end -# def no_highlight; !highlight end -# end # # source://yard//lib/yard/options.rb#69 class YARD::Options @@ -7982,9 +7985,9 @@ class YARD::Options # @example Defining a default option key # default_attr :name, 'Default Name' # default_attr :time, lambda { Time.now } - # @param key [Symbol] the option key name # @param default [Object, Proc] the default object value. If the default # value is a proc, it is executed upon initialization. + # @param key [Symbol] the option key name # # source://yard//lib/yard/options.rb#80 def default_attr(key, default); end @@ -8005,9 +8008,9 @@ module YARD::Parser; end # To register a parser, see {SourceParser.register_parser_type} # # @abstract +# @see #enumerator # @see #parse # @see #tokenize -# @see #enumerator # @since 0.5.6 # # source://yard//lib/yard/parser/base.rb#16 @@ -8015,8 +8018,8 @@ class YARD::Parser::Base # This default constructor does nothing. The subclass is responsible for # storing the source contents and filename if they are required. # - # @param source [String] the source contents # @param filename [String] the name of the file if from disk + # @param source [String] the source contents # @raise [NotImplementedError] # @return [Base] a new instance of Base # @since 0.5.6 @@ -8369,9 +8372,9 @@ class YARD::Parser::OrderedParser # # @note OrderedParser sets itself as the +ordered_parser+ key on # global_state for later use in {Handlers::Processor}. + # @param files [Array] the list of files to parse # @param global_state [OpenStruct] a structure containing all global # state during parsing - # @param files [Array] the list of files to parse # @return [OrderedParser] a new instance of OrderedParser # # source://yard//lib/yard/parser/source_parser.rb#32 @@ -8407,11 +8410,11 @@ module YARD::Parser::Ruby # Builds and s-expression by creating {AstNode} objects with # the type provided by the first argument. # + # @example A method call + # s(:command, s(:var_ref, "mymethod")) # @example An implicit list of keywords # ast = s(s(:kw, "if"), s(:kw, "else")) # ast.type # => :list - # @example A method call - # s(:command, s(:var_ref, "mymethod")) # @overload s # @overload s # @see AstNode#initialize @@ -8440,9 +8443,9 @@ class YARD::Parser::Ruby::AstNode < ::Array # @option opts # @option opts # @option opts - # @param type [Symbol] the type of node being created # @param arr [Array] the child nodes # @param opts [Hash] any extra line options + # @param type [Symbol] the type of node being created # @return [AstNode] a new instance of AstNode # # source://yard//lib/yard/parser/ruby/ast_node.rb#153 @@ -8586,18 +8589,18 @@ class YARD::Parser::Ruby::AstNode < ::Array # first node with a type matching any of +node_types+, otherwise # returns the original node (self). # - # @example Returns the first method definition in a block of code - # ast = YARD.parse_string("if true; def x; end end").ast + # @example If the node types are not present in the AST + # ast = YARD.parse("def x; end") # ast.jump(:def) - # # => s(:def, s(:ident, "x"), s(:params, nil, nil, nil, nil, - # # nil), s(s(:void_stmt, ))) # @example Returns first 'def' or 'class' statement # ast = YARD.parse_string("class X; def y; end end") # ast.jump(:def, :class).first # # => - # @example If the node types are not present in the AST - # ast = YARD.parse("def x; end") + # @example Returns the first method definition in a block of code + # ast = YARD.parse_string("if true; def x; end end").ast # ast.jump(:def) + # # => s(:def, s(:ident, "x"), s(:params, nil, nil, nil, nil, + # # nil), s(s(:void_stmt, ))) # @param node_types [Array] a set of node types to match # @return [AstNode] the matching node, if one was found # @return [self] if no node was found @@ -8751,59 +8754,59 @@ end # source://yard//lib/yard/parser/ruby/ast_node.rb#96 YARD::Parser::Ruby::AstNode::KEYWORDS = T.let(T.unsafe(nil), Hash) -# source://yard//lib/yard/parser/ruby/ast_node.rb#530 +# source://yard//lib/yard/parser/ruby/ast_node.rb#531 class YARD::Parser::Ruby::ClassNode < ::YARD::Parser::Ruby::KeywordNode - # source://yard//lib/yard/parser/ruby/ast_node.rb#533 + # source://yard//lib/yard/parser/ruby/ast_node.rb#534 def block; end - # source://yard//lib/yard/parser/ruby/ast_node.rb#531 + # source://yard//lib/yard/parser/ruby/ast_node.rb#532 def class_name; end - # source://yard//lib/yard/parser/ruby/ast_node.rb#532 + # source://yard//lib/yard/parser/ruby/ast_node.rb#533 def superclass; end end # Represents a lone comment block in source # -# source://yard//lib/yard/parser/ruby/ast_node.rb#548 +# source://yard//lib/yard/parser/ruby/ast_node.rb#549 class YARD::Parser::Ruby::CommentNode < ::YARD::Parser::Ruby::AstNode - # source://yard//lib/yard/parser/ruby/ast_node.rb#551 + # source://yard//lib/yard/parser/ruby/ast_node.rb#552 def comments; end - # source://yard//lib/yard/parser/ruby/ast_node.rb#549 + # source://yard//lib/yard/parser/ruby/ast_node.rb#550 def docstring; end - # source://yard//lib/yard/parser/ruby/ast_node.rb#550 + # source://yard//lib/yard/parser/ruby/ast_node.rb#551 def docstring=(value); end - # source://yard//lib/yard/parser/ruby/ast_node.rb#554 + # source://yard//lib/yard/parser/ruby/ast_node.rb#555 def first_line; end - # source://yard//lib/yard/parser/ruby/ast_node.rb#553 + # source://yard//lib/yard/parser/ruby/ast_node.rb#554 def source; end end -# source://yard//lib/yard/parser/ruby/ast_node.rb#515 +# source://yard//lib/yard/parser/ruby/ast_node.rb#516 class YARD::Parser::Ruby::ConditionalNode < ::YARD::Parser::Ruby::KeywordNode - # source://yard//lib/yard/parser/ruby/ast_node.rb#517 + # source://yard//lib/yard/parser/ruby/ast_node.rb#518 def condition; end # @return [Boolean] # - # source://yard//lib/yard/parser/ruby/ast_node.rb#516 + # source://yard//lib/yard/parser/ruby/ast_node.rb#517 def condition?; end - # source://yard//lib/yard/parser/ruby/ast_node.rb#520 + # source://yard//lib/yard/parser/ruby/ast_node.rb#521 def else_block; end - # source://yard//lib/yard/parser/ruby/ast_node.rb#518 + # source://yard//lib/yard/parser/ruby/ast_node.rb#519 def then_block; end private # @return [Boolean] # - # source://yard//lib/yard/parser/ruby/ast_node.rb#527 + # source://yard//lib/yard/parser/ruby/ast_node.rb#528 def cmod?; end end @@ -9797,8 +9800,8 @@ class YARD::Parser::Ruby::Legacy::RubyToken::TklEND < ::YARD::Parser::Ruby::Lega class YARD::Parser::Ruby::Legacy::RubyToken::Token # Creates a new Token object # - # @param line_no [Integer] the line number to initialize the token to # @param char_no [Integer] the char number to initialize the token to + # @param line_no [Integer] the line number to initialize the token to # @return [Token] a new instance of Token # # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#37 @@ -10119,92 +10122,92 @@ class YARD::Parser::Ruby::LiteralNode < ::YARD::Parser::Ruby::AstNode def literal?; end end -# source://yard//lib/yard/parser/ruby/ast_node.rb#541 +# source://yard//lib/yard/parser/ruby/ast_node.rb#542 class YARD::Parser::Ruby::LoopNode < ::YARD::Parser::Ruby::KeywordNode - # source://yard//lib/yard/parser/ruby/ast_node.rb#544 + # source://yard//lib/yard/parser/ruby/ast_node.rb#545 def block; end - # source://yard//lib/yard/parser/ruby/ast_node.rb#543 + # source://yard//lib/yard/parser/ruby/ast_node.rb#544 def condition; end # @return [Boolean] # - # source://yard//lib/yard/parser/ruby/ast_node.rb#542 + # source://yard//lib/yard/parser/ruby/ast_node.rb#543 def loop?; end end -# source://yard//lib/yard/parser/ruby/ast_node.rb#438 +# source://yard//lib/yard/parser/ruby/ast_node.rb#439 class YARD::Parser::Ruby::MethodCallNode < ::YARD::Parser::Ruby::AstNode - # source://yard//lib/yard/parser/ruby/ast_node.rb#464 + # source://yard//lib/yard/parser/ruby/ast_node.rb#465 def block; end - # source://yard//lib/yard/parser/ruby/ast_node.rb#462 + # source://yard//lib/yard/parser/ruby/ast_node.rb#463 def block_param; end # @return [Boolean] # - # source://yard//lib/yard/parser/ruby/ast_node.rb#439 + # source://yard//lib/yard/parser/ruby/ast_node.rb#440 def call?; end - # source://yard//lib/yard/parser/ruby/ast_node.rb#442 + # source://yard//lib/yard/parser/ruby/ast_node.rb#443 def method_name(name_only = T.unsafe(nil)); end - # source://yard//lib/yard/parser/ruby/ast_node.rb#440 + # source://yard//lib/yard/parser/ruby/ast_node.rb#441 def namespace; end - # source://yard//lib/yard/parser/ruby/ast_node.rb#453 + # source://yard//lib/yard/parser/ruby/ast_node.rb#454 def parameters(include_block_param = T.unsafe(nil)); end private # @return [Boolean] # - # source://yard//lib/yard/parser/ruby/ast_node.rb#474 + # source://yard//lib/yard/parser/ruby/ast_node.rb#475 def call_has_paren?; end - # source://yard//lib/yard/parser/ruby/ast_node.rb#470 + # source://yard//lib/yard/parser/ruby/ast_node.rb#471 def index_adjust; end end -# source://yard//lib/yard/parser/ruby/ast_node.rb#479 +# source://yard//lib/yard/parser/ruby/ast_node.rb#480 class YARD::Parser::Ruby::MethodDefinitionNode < ::YARD::Parser::Ruby::AstNode - # source://yard//lib/yard/parser/ruby/ast_node.rb#506 + # source://yard//lib/yard/parser/ruby/ast_node.rb#507 def block(n = T.unsafe(nil)); end # @return [Boolean] # - # source://yard//lib/yard/parser/ruby/ast_node.rb#481 + # source://yard//lib/yard/parser/ruby/ast_node.rb#482 def def?; end # @return [Boolean] # - # source://yard//lib/yard/parser/ruby/ast_node.rb#480 + # source://yard//lib/yard/parser/ruby/ast_node.rb#481 def kw?; end - # source://yard//lib/yard/parser/ruby/ast_node.rb#484 + # source://yard//lib/yard/parser/ruby/ast_node.rb#485 def method_name(name_only = T.unsafe(nil)); end - # source://yard//lib/yard/parser/ruby/ast_node.rb#482 + # source://yard//lib/yard/parser/ruby/ast_node.rb#483 def namespace; end - # source://yard//lib/yard/parser/ruby/ast_node.rb#489 + # source://yard//lib/yard/parser/ruby/ast_node.rb#490 def parameters(include_block_param = T.unsafe(nil)); end - # source://yard//lib/yard/parser/ruby/ast_node.rb#495 + # source://yard//lib/yard/parser/ruby/ast_node.rb#496 def signature; end private - # source://yard//lib/yard/parser/ruby/ast_node.rb#510 + # source://yard//lib/yard/parser/ruby/ast_node.rb#511 def index_adjust; end end -# source://yard//lib/yard/parser/ruby/ast_node.rb#536 +# source://yard//lib/yard/parser/ruby/ast_node.rb#537 class YARD::Parser::Ruby::ModuleNode < ::YARD::Parser::Ruby::KeywordNode - # source://yard//lib/yard/parser/ruby/ast_node.rb#538 + # source://yard//lib/yard/parser/ruby/ast_node.rb#539 def block; end - # source://yard//lib/yard/parser/ruby/ast_node.rb#537 + # source://yard//lib/yard/parser/ruby/ast_node.rb#538 def module_name; end end @@ -10811,34 +10814,34 @@ class YARD::Parser::Ruby::RipperParser < ::Ripper # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#667 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#700 def add_comment(line, node = T.unsafe(nil), before_node = T.unsafe(nil), into = T.unsafe(nil)); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#271 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#285 def add_token(token, data); end # @return [Boolean] # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#611 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#625 def comment_starts_line?(charno); end # @raise [ParserSyntaxError] # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#609 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#623 def compile_error(msg); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#693 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#726 def freeze_tree(node = T.unsafe(nil)); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#620 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#634 def insert_comments; end # @since 0.5.6 @@ -10873,7 +10876,7 @@ class YARD::Parser::Ruby::RipperParser < ::Ripper # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#347 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#361 def on_body_stmt(*args); end # @since 0.5.6 @@ -10994,12 +10997,12 @@ class YARD::Parser::Ruby::RipperParser < ::Ripper # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#251 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#262 def visit_event_arr(node); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#259 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#270 def visit_ns_token(token, data, ast_token = T.unsafe(nil)); end end @@ -11070,8 +11073,8 @@ class YARD::Parser::Ruby::TokenResolver # Creates a token resolver for given source. # - # @param source [String] the source code to tokenize # @param namespace [CodeObjects::Base] the object/namespace to resolve from + # @param source [String] the source code to tokenize # @raise [ParserSyntaxError] # @return [TokenResolver] a new instance of TokenResolver # @@ -11097,11 +11100,11 @@ class YARD::Parser::Ruby::TokenResolver # # :const -> "A::B" # # No object: [:op, "::"] # # :const -> "A::B::C" - # @yieldparam token [Array(Symbol,String,Array(Integer,Integer))] the - # current token object being iterated # @yieldparam object [CodeObjects::Base, nil] the fully qualified code # object associated with the current token, or nil if there is no object # for the yielded token. + # @yieldparam token [Array(Symbol,String,Array(Integer,Integer))] the + # current token object being iterated # # source://yard//lib/yard/parser/ruby/token_resolver.rb#46 def each; end @@ -11161,9 +11164,9 @@ end # a certain filetype is recognized. To register a parser and hook it # up to a set of file extensions, call {register_parser_type} # -# @see register_parser_type -# @see Handlers::Base # @see CodeObjects::Base +# @see Handlers::Base +# @see register_parser_type # # source://yard//lib/yard/parser/source_parser.rb#63 class YARD::Parser::SourceParser @@ -11268,8 +11271,8 @@ class YARD::Parser::SourceParser # "lib/foo.rb is 1240 characters" # "lib/foo_bar.rb is 248 characters" # @return [Proc] the yielded block - # @see before_parse_file # @see after_parse_list + # @see before_parse_file # @since 0.7.0 # @yield [parser] the yielded block is called once after each file # that is parsed. This might happen many times for a single codebase. @@ -11298,8 +11301,8 @@ class YARD::Parser::SourceParser # YARD.parse # # Prints "Finished parsing!" after parsing files # @return [Proc] the yielded block - # @see before_parse_list # @see before_parse_file + # @see before_parse_list # @since 0.7.0 # @yield [files, globals] the yielded block is called once before # parsing all files @@ -11339,8 +11342,8 @@ class YARD::Parser::SourceParser # "I'm parsing lib/foo_bar.rb" # "I'm parsing lib/last_file.rb" # @return [Proc] the yielded block - # @see before_parse_list # @see after_parse_file + # @see before_parse_list # @since 0.7.0 # @yield [parser] the yielded block is called once before each # file that is parsed. This might happen many times for a single @@ -11364,6 +11367,12 @@ class YARD::Parser::SourceParser # via {parse}. The block passed to this method will be called on # subsequent parse calls. # + # @example Installing a simple callback + # SourceParser.before_parse_list do |files, globals| + # puts "Starting to parse..." + # end + # YARD.parse('lib/**/*.rb') + # # prints "Starting to parse..." # @example Setting global state # SourceParser.before_parse_list do |files, globals| # globals.method_count = 0 @@ -11377,12 +11386,6 @@ class YARD::Parser::SourceParser # end # YARD.parse # # Prints: "Found 37 methods" - # @example Installing a simple callback - # SourceParser.before_parse_list do |files, globals| - # puts "Starting to parse..." - # end - # YARD.parse('lib/**/*.rb') - # # prints "Starting to parse..." # @example Using a global callback to cancel parsing # SourceParser.before_parse_list do |files, globals| # return false if files.include?('foo.rb') @@ -11391,8 +11394,8 @@ class YARD::Parser::SourceParser # YARD.parse(['foo.rb', 'bar.rb']) # callback cancels this method # YARD.parse('bar.rb') # parses normally # @return [Proc] the yielded block - # @see before_parse_file # @see after_parse_list + # @see before_parse_file # @since 0.7.0 # @yield [files, globals] the yielded block is called once before # parsing all files @@ -11414,11 +11417,11 @@ class YARD::Parser::SourceParser # Parses a path or set of paths # - # @param paths [String, Array] a path, glob, or list of paths to - # parse # @param excluded [Array] a list of excluded path matchers # @param level [Fixnum] the logger level to use during parsing. See # {YARD::Logger} + # @param paths [String, Array] a path, glob, or list of paths to + # parse # @return [void] # # source://yard//lib/yard/parser/source_parser.rb#99 @@ -11474,10 +11477,10 @@ class YARD::Parser::SourceParser # # @example Registering a parser for "java" files # SourceParser.register_parser_type :java, JavaParser, 'java' - # @param type [Symbol] a symbolic name for the parser type - # @param parser_klass [Base] a class that implements parsing and tokenization # @param extensions [Array, String, Regexp] a list of extensions or a # regex to match against the file extension + # @param parser_klass [Base] a class that implements parsing and tokenization + # @param type [Symbol] a symbolic name for the parser type # @return [void] # @see Parser::Base # @@ -11708,12 +11711,12 @@ end # the Registry thread local. This means all access to a registry for a specific # object set must occur in the originating thread. # +# @example Getting an object by a specific path +# Registry.at('YARD::CodeObjects::Base#docstring') # @example Loading the Registry # Registry.load!('/path/to/yardocfile') # loads all objects into memory # Registry.at('YARD::CodeObjects::Base').docstring # # => "+Base+ is the superclass of all code objects ..." -# @example Getting an object by a specific path -# Registry.at('YARD::CodeObjects::Base#docstring') # @example Performing a lookup on a method anywhere in the inheritance tree # Registry.resolve(P('YARD::CodeObjects::Base'), '#docstring', true) # @@ -11735,10 +11738,10 @@ module YARD::Registry # Returns all objects in the registry that match one of the types provided # in the +types+ list (if +types+ is provided). # - # @example Returns all objects - # Registry.all # @example Returns all classes and modules # Registry.all(:class, :module) + # @example Returns all objects + # Registry.all # @param types [Array] an optional list of types to narrow the # objects down by. Equivalent to performing a select: # +Registry.all.select {|o| types.include(o.type) }+ @@ -11828,8 +11831,8 @@ module YARD::Registry # # @param file [String] the yardoc file to load # @return [Registry] the registry object (for chaining) - # @see #load_yardoc # @see #load_all + # @see #load_yardoc # @since 0.5.1 # # source://yard//lib/yard/registry.rb#144 @@ -11919,22 +11922,22 @@ module YARD::Registry # Attempts to find an object by name starting at +namespace+, performing # a lookup similar to Ruby's method of resolving a constant in a namespace. # - # @example Looks for a constant in the root namespace - # Registry.resolve(nil, 'CONSTANT') # @example Looks for a class method respecting the inheritance tree # Registry.resolve(myclass, 'mymethod', true) - # @example Looks for instance method #reverse starting from A::B::C - # Registry.resolve(P("A::B::C"), "#reverse") - # @example Looks for a constant but returns a proxy if not found - # Registry.resolve(P('A::B::C'), 'D', false, true) # => # # @example Looks for a complex path from a namespace # Registry.resolve(P('A::B'), 'B::D') # => # + # @example Looks for a constant but returns a proxy if not found + # Registry.resolve(P('A::B::C'), 'D', false, true) # => # + # @example Looks for a constant in the root namespace + # Registry.resolve(nil, 'CONSTANT') + # @example Looks for instance method #reverse starting from A::B::C + # Registry.resolve(P("A::B::C"), "#reverse") # @param inheritance [Boolean] Follows inheritance chain (mixins, superclass) # when performing name resolution if set to +true+. - # @param namespace [CodeObjects::NamespaceObject, nil] the starting namespace - # (module or class). If +nil+ or +:root+, starts from the {root} object. # @param name [String, Symbol] the name (or complex path) to look for from # +namespace+. + # @param namespace [CodeObjects::NamespaceObject, nil] the starting namespace + # (module or class). If +nil+ or +:root+, starts from the {root} object. # @param proxy_fallback [Boolean] If +true+, returns a proxy representing # the unresolved path (namespace + name) if no object is found. # @param type [Symbol, nil] the {CodeObjects::Base#type} that the resolved @@ -12005,10 +12008,10 @@ module YARD::Registry # Returns the .yardoc file associated with a gem. # - # @param gem [String] the name of the gem to search for - # @param ver_require [String] an optional Gem version requirement # @param for_writing [Boolean] whether or not the method should search # for writable locations + # @param gem [String] the name of the gem to search for + # @param ver_require [String] an optional Gem version requirement # @return [String] if +for_writing+ is set to +true+, returns the best # location suitable to write the .yardoc file. Otherwise, the first # existing location associated with the gem's .yardoc file. @@ -12031,8 +12034,8 @@ module YARD::Registry # Attempts to resolve a name in a namespace # - # @param namespace [CodeObjects::NamespaceObject] the starting namespace # @param name [String] the name to look for + # @param namespace [CodeObjects::NamespaceObject] the starting namespace # @param type [Symbol, nil] the {CodeObjects::Base#type} that the resolved # object must be equal to # @@ -12092,12 +12095,12 @@ class YARD::RegistryResolver # object can be returned if the lookup fails for future resolution. The # proxy will be type hinted with the +type+ used in the original lookup. # - # @example A lookup on a method through the inheritance tree - # resolver.lookup_by_math("A::B#foo", inheritance: true) # @example A lookup from root # resolver.lookup_by_path("A::B::C") # @example A lookup from the A::B namespace # resolver.lookup_by_path("C", namespace: P("A::B")) + # @example A lookup on a method through the inheritance tree + # resolver.lookup_by_math("A::B#foo", inheritance: true) # @option opts # @option opts # @option opts @@ -12317,9 +12320,9 @@ class YARD::RegistryStore # Saves the database to disk # + # @param file [String, nil] if supplied, the name of the file to save to # @param merge [Boolean] if true, merges the data in memory with the # data on disk, otherwise the data on disk is deleted. - # @param file [String, nil] if supplied, the name of the file to save to # @return [Boolean] whether the database was saved # # source://yard//lib/yard/registry_store.rb#177 @@ -12474,9 +12477,9 @@ class YARD::Serializers::Base # @abstract This method should implement the logic that serializes # +data+ to the respective endpoint. This method should also call # the before and after callbacks {#before_serialize} and {#after_serialize} + # @param data [String] the contents that should be serialized # @param object [CodeObjects::Base, String] the object to serialize the # data for. The object can also be a string (for non-object serialization) - # @param data [String] the contents that should be serialized # # source://yard//lib/yard/serializers/base.rb#42 def serialize(object, data); end @@ -12622,8 +12625,8 @@ class YARD::Serializers::StdoutSerializer < ::YARD::Serializers::Base # Wraps text to a specific column length # - # @param text [String] the text to wrap # @param _length [Fixnum] the column length to wrap to + # @param text [String] the text to wrap # @return [String] the wrapped text # # source://yard//lib/yard/serializers/stdout_serializer.rb#26 @@ -12774,16 +12777,16 @@ class YARD::Server::Adapter def document_root=(_arg0); end # @return [Hash{String=>Array}] a map of libraries. - # @see LibraryVersion LibraryVersion for information on building a list of libraries # @see #add_library + # @see LibraryVersion LibraryVersion for information on building a list of libraries # @since 0.6.0 # # source://yard//lib/yard/server/adapter.rb#32 def libraries; end # @return [Hash{String=>Array}] a map of libraries. - # @see LibraryVersion LibraryVersion for information on building a list of libraries # @see #add_library + # @see LibraryVersion LibraryVersion for information on building a list of libraries # @since 0.6.0 # # source://yard//lib/yard/server/adapter.rb#32 @@ -13661,8 +13664,8 @@ module YARD::Server::DocServerHelper # Modifies {Templates::Helpers::HtmlHelper#url_for} to return a URL instead # of a disk location. # - # @param obj [String, CodeObjects::Base] the object (or object path) to link to # @param anchor [String] the anchor to link to + # @param obj [String, CodeObjects::Base] the object (or object path) to link to # @param relative [Boolean] use a relative or absolute link # @return [String] the URL location of the object # @since 0.6.0 @@ -13673,8 +13676,8 @@ module YARD::Server::DocServerHelper # Modifies {Templates::Helpers::HtmlHelper#url_for_file} to return a URL instead # of a disk location. # - # @param filename [String, CodeObjects::ExtraFileObject] the filename to link to # @param anchor [String] optional anchor + # @param filename [String, CodeObjects::ExtraFileObject] the filename to link to # @return [String] the URL pointing to the file # @since 0.6.0 # @@ -14311,12 +14314,12 @@ class YARD::Server::LibraryNotPreparedError < ::RuntimeError; end # source://yard//lib/yard/server/library_version.rb#94 class YARD::Server::LibraryVersion # @param name [String] the name of the library + # @param source [Symbol] the location of the files used to build the yardoc. + # Builtin source types are +:disk+ or +:gem+. # @param version [String] the specific (usually, but not always, numeric) library # version # @param yardoc [String] the location of the yardoc file, or nil if it is # generated later - # @param source [Symbol] the location of the files used to build the yardoc. - # Builtin source types are +:disk+ or +:gem+. # @return [LibraryVersion] a new instance of LibraryVersion # @since 0.6.0 # @@ -14988,8 +14991,8 @@ end # # 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 + # @param tag [Tag] the meta-data tag containing all input to the docstring # @return [Directive] a new instance of Directive # @since 0.8.0 # @@ -15190,15 +15193,15 @@ end # to a new class with its own parsing methods before running YARD. This is useful # if you want to change the syntax of existing tags (@see, @since, etc.) # +# @example Defining a custom directive +# define_directive :method, :with_title_and_text, MethodDirective # @example Defining a custom tag # define_tag "Parameter", :param, :with_types_and_name # define_tag "Author", :author -# @example Defining a custom directive -# define_directive :method, :with_title_and_text, MethodDirective # @see DefaultFactory -# @see define_tag -# @see define_directive # @see Directive +# @see define_directive +# @see define_tag # # source://yard//lib/yard/tags/library.rb#59 class YARD::Tags::Library @@ -15309,9 +15312,9 @@ class YARD::Tags::Library # Creates a new directive with tag information and a docstring parser # object. # - # @param tag_name [String] the name of the tag - # @param tag_buf [String] the tag data # @param parser [DocstringParser] the parser object parsing the docstring + # @param tag_buf [String] the tag data + # @param tag_name [String] the name of the tag # @return [Directive] the newly created directive # # source://yard//lib/yard/tags/library.rb#290 @@ -15476,15 +15479,15 @@ class YARD::Tags::Library # where a method has distinct return cases. In this case, each # case should begin with "if ...". # - # @example A regular return value - # # @return [Fixnum] the size of the file - # def size; @file.size end # @example A method returns an Array or a single object # # @return [String] if a single object was returned # # from the database. # # @return [Array] if multiple objects were # # returned. # def find(query) end + # @example A regular return value + # # @return [Fixnum] the size of the file + # def size; @file.size end # # source://yard//lib/yard/tags/library.rb#166 def return_tag(text); end @@ -15665,9 +15668,9 @@ class YARD::Tags::Library # regular {DefaultFactory#parse_tag} factory method if none is supplied. # # @param label [#to_s] the label used when displaying the tag in templates - # @param tag [#to_s] the tag name to create # @param meth [#to_s, Class] the {Tag} factory method to call when # creating the tag or the name of the class to directly create a tag for + # @param tag [#to_s] the tag name to create # # source://yard//lib/yard/tags/library.rb#157 def define_tag(label, tag, meth = T.unsafe(nil)); end @@ -15867,19 +15870,15 @@ end # # @!macro foo # # I have \$2.00 USD. # -# @example Defining a simple macro -# # @!macro [new] returnself -# # @return [self] returns itself -# @example Using a simple macro in multiple docstrings -# # Documentation for map -# # ... -# # @macro returnself -# def map; end +# @example Attaching a macro directly to a DSL method +# class Post < Resource +# # @!macro [attach] property +# # @return [$2] the $1 property +# property :title, String # -# # Documentation for filter -# # ... -# # @macro returnself -# def filter; end +# # Macro will expand on this definition too +# property :view_count, Integer +# end # @example Attaching a macro to a class method (for DSL usage) # class Resource # # Defines a new property @@ -15894,15 +15893,19 @@ end # property :title, String # property :view_count, Integer # end -# @example Attaching a macro directly to a DSL method -# class Post < Resource -# # @!macro [attach] property -# # @return [$2] the $1 property -# property :title, String +# @example Defining a simple macro +# # @!macro [new] returnself +# # @return [self] returns itself +# @example Using a simple macro in multiple docstrings +# # Documentation for map +# # ... +# # @macro returnself +# def map; end # -# # Macro will expand on this definition too -# property :view_count, Integer -# end +# # Documentation for filter +# # ... +# # @macro returnself +# def filter; end # @since 0.7.0 # # source://yard//lib/yard/tags/directives.rb#257 @@ -15963,16 +15966,16 @@ end # # To define an attribute method, see {tag:!attribute} # +# @example Attaching multiple methods to the same source +# # @!method method1 +# # @!method method2 +# create_methods :method1, :method2 # @example Defining a simple method # # @!method quit(username, message = "Quit") # # Sends a quit message to the server for a +username+. # # @param [String] username the username to quit # # @param [String] message the quit message # quit_message_method -# @example Attaching multiple methods to the same source -# # @!method method1 -# # @!method method2 -# create_methods :method1, :method2 # @note This directive should only be used if there is no explicit # declaration for the method in any source files (i.e., the method # is declared dynamically via meta-programming). In all other cases, add @@ -16120,6 +16123,10 @@ end # You can specify the language of the code block using the types # specification list. By default, the code language is "ruby". # +# @example Declaring a method as an attribute +# # This should really be an attribute +# # @!parse attr_reader :foo +# def object; @parent.object end # @example Documenting dynamic module inclusion # class User # # includes "UserMixin" and extends "UserMixin::ClassMethods" @@ -16127,10 +16134,6 @@ end # # @!parse include UserMixin # # @!parse extend UserMixin::ClassMethods # end -# @example Declaring a method as an attribute -# # This should really be an attribute -# # @!parse attr_reader :foo -# def object; @parent.object end # @example Parsing C code # # @!parse [c] # # void Init_Foo() { @@ -16254,11 +16257,11 @@ class YARD::Tags::Tag # Key names are for tags that declare meta data for a specific key or name, such as +param+, # +raise+, etc. # + # @param name [String] optional key name which the tag refers to # @param tag_name [#to_s] the tag name to create the tag for - # @param text [String] the descriptive text for this tag + # @param text [String, nil] the descriptive text for this tag, or nil if none provided # @param types [Array] optional type list of formally declared types # for the tag - # @param name [String] optional key name which the tag refers to # @return [Tag] a new instance of Tag # # source://yard//lib/yard/tags/tag.rb#45 @@ -16493,7 +16496,7 @@ class YARD::Tags::TypesExplainer::Type private # source://yard//lib/yard/tags/types_explainer.rb#45 - def list_join(list); end + def list_join(list, with: T.unsafe(nil)); end end # Modifies the current parsing visibility (public, protected, or private). @@ -16595,8 +16598,8 @@ module YARD::Templates::Engine # Forces creation of a template at +path+ within a +full_path+. # - # @param path [String] the path name of the template # @param full_paths [Array] the full path on disk of the template + # @param path [String] the path name of the template # @return [Template] the template module representing the +path+ # # source://yard//lib/yard/templates/engine.rb#52 @@ -16694,13 +16697,13 @@ module YARD::Templates::Helpers::BaseHelper # source://yard//lib/yard/templates/helpers/base_helper.rb#196 def format_object_title(object); end + # @example Formatted type of a method + # o = MethodObject.new(:root, :to_s) + # format_object_type(o) # => "Method" # @example Formatted type of an exception class # o = ClassObject.new(:root, :MyError) # o.superclass = P('RuntimeError') # format_object_type(o) # => "Exception" - # @example Formatted type of a method - # o = MethodObject.new(:root, :to_s) - # format_object_type(o) # => "Method" # @param object [CodeObjects::Base] the object to retrieve the type for # @return [String] the human-readable formatted {CodeObjects::Base#type #type} # for the object @@ -16722,8 +16725,8 @@ module YARD::Templates::Helpers::BaseHelper # format_types(['String', 'Array']) #=> "(String, Array)" # @example Formatting types without surrounding brackets # format_types(['String', 'Array'], false) #=> "String, Array" - # @param list [Array] a list of types # @param brackets [Boolean] whether to surround the types in brackets + # @param list [Array] a list of types # @return [String] the formatted list of Ruby types # # source://yard//lib/yard/templates/helpers/base_helper.rb#168 @@ -16746,9 +16749,9 @@ module YARD::Templates::Helpers::BaseHelper # Links to an extra file # + # @param anchor [String] optional anchor # @param filename [String] the filename to link to # @param title [String] the title of the link - # @param anchor [String] optional anchor # @return [String] the link to the file # @since 0.5.5 # @@ -16784,9 +16787,9 @@ module YARD::Templates::Helpers::BaseHelper # Links to a URL # - # @param url [String] the URL to link to - # @param title [String] the optional title to display the link as # @param params [Hash] optional parameters for the link + # @param title [String] the optional title to display the link as + # @param url [String] the URL to link to # @return [String] the linked URL # # source://yard//lib/yard/templates/helpers/base_helper.rb#141 @@ -16795,14 +16798,14 @@ module YARD::Templates::Helpers::BaseHelper # Links objects or URLs. This method will delegate to the correct +link_+ # method depending on the arguments passed in. # - # @example Linking a URL - # linkify('http://example.com') # @example Including docstring contents of an object # linkify('include:YARD::Docstring') - # @example Linking to an extra file - # linkify('file:README') + # @example Linking a URL + # linkify('http://example.com') # @example Linking an object by path # linkify('YARD::Docstring') + # @example Linking to an extra file + # linkify('file:README') # # source://yard//lib/yard/templates/helpers/base_helper.rb#55 def linkify(*args); end @@ -16875,7 +16878,7 @@ end # The helper module for HTML templates. # -# source://yard//lib/yard/templates/helpers/html_helper.rb#7 +# source://yard//lib/yard/templates/helpers/html_helper.rb#11 module YARD::Templates::Helpers::HtmlHelper include ::YARD::Templates::Helpers::MarkupHelper include ::YARD::Templates::Helpers::ModuleHelper @@ -16884,7 +16887,7 @@ module YARD::Templates::Helpers::HtmlHelper # @param object [CodeObjects::Base] the object to get an anchor for # @return [String] the anchor for a specific object # - # source://yard//lib/yard/templates/helpers/html_helper.rb#347 + # source://yard//lib/yard/templates/helpers/html_helper.rb#351 def anchor_for(object); end # Returns the current character set. The default value can be overridden @@ -16895,26 +16898,26 @@ module YARD::Templates::Helpers::HtmlHelper # @return [String] the current character set # @since 0.5.4 # - # source://yard//lib/yard/templates/helpers/html_helper.rb#574 + # source://yard//lib/yard/templates/helpers/html_helper.rb#578 def charset; end # Formats a list of objects and links them # # @return [String] a formatted list of objects # - # source://yard//lib/yard/templates/helpers/html_helper.rb#458 + # source://yard//lib/yard/templates/helpers/html_helper.rb#462 def format_object_name_list(objects); end # Formats a list of types from a tag. # - # @param typelist [Array, FalseClass] the list of types to be formatted. # @param brackets [Boolean] omits the surrounding # brackets if +brackets+ is set to +false+. + # @param typelist [Array, FalseClass] the list of types to be formatted. # @return [String] the list of types formatted # as [Type1, Type2, ...] with the types linked # to their respective descriptions. # - # source://yard//lib/yard/templates/helpers/html_helper.rb#476 + # source://yard//lib/yard/templates/helpers/html_helper.rb#480 def format_types(typelist, brackets = T.unsafe(nil)); end # Escapes HTML entities @@ -16922,7 +16925,7 @@ module YARD::Templates::Helpers::HtmlHelper # @param text [String] the text to escape # @return [String] the HTML with escaped entities # - # source://yard//lib/yard/templates/helpers/html_helper.rb#23 + # source://yard//lib/yard/templates/helpers/html_helper.rb#27 def h(text); end # Converts Asciidoc to HTML @@ -16930,7 +16933,7 @@ module YARD::Templates::Helpers::HtmlHelper # @param text [String] input Asciidoc text # @return [String] output HTML # - # source://yard//lib/yard/templates/helpers/html_helper.rb#109 + # source://yard//lib/yard/templates/helpers/html_helper.rb#113 def html_markup_asciidoc(text); end # Converts HTML to HTML @@ -16939,7 +16942,7 @@ module YARD::Templates::Helpers::HtmlHelper # @return [String] output HTML # @since 0.6.0 # - # source://yard//lib/yard/templates/helpers/html_helper.rb#168 + # source://yard//lib/yard/templates/helpers/html_helper.rb#172 def html_markup_html(text); end # Converts Markdown to HTML @@ -16948,13 +16951,13 @@ module YARD::Templates::Helpers::HtmlHelper # @return [String] output HTML # @since 0.6.0 # - # source://yard//lib/yard/templates/helpers/html_helper.rb#78 + # source://yard//lib/yard/templates/helpers/html_helper.rb#82 def html_markup_markdown(text); end # @return [String] the same text with no markup # @since 0.6.6 # - # source://yard//lib/yard/templates/helpers/html_helper.rb#160 + # source://yard//lib/yard/templates/helpers/html_helper.rb#164 def html_markup_none(text); end # Converts org-mode to HTML @@ -16962,7 +16965,7 @@ module YARD::Templates::Helpers::HtmlHelper # @param text [String] input org-mode text # @return [String] output HTML # - # source://yard//lib/yard/templates/helpers/html_helper.rb#102 + # source://yard//lib/yard/templates/helpers/html_helper.rb#106 def html_markup_org(text); end # Converts plaintext to pre-formatted HTML @@ -16971,7 +16974,7 @@ module YARD::Templates::Helpers::HtmlHelper # @return [String] the output HTML # @since 0.6.0 # - # source://yard//lib/yard/templates/helpers/html_helper.rb#146 + # source://yard//lib/yard/templates/helpers/html_helper.rb#150 def html_markup_pre(text); end # Converts RDoc formatting (SimpleMarkup) to HTML @@ -16980,7 +16983,7 @@ module YARD::Templates::Helpers::HtmlHelper # @return [String] output HTML # @since 0.6.0 # - # source://yard//lib/yard/templates/helpers/html_helper.rb#136 + # source://yard//lib/yard/templates/helpers/html_helper.rb#140 def html_markup_rdoc(text); end # Highlights Ruby source. Similar to {#html_syntax_highlight}, but @@ -16991,7 +16994,7 @@ module YARD::Templates::Helpers::HtmlHelper # @return [String] the highlighted HTML # @since 0.7.0 # - # source://yard//lib/yard/templates/helpers/html_helper.rb#179 + # source://yard//lib/yard/templates/helpers/html_helper.rb#183 def html_markup_ruby(source); end # Converts plaintext to regular HTML @@ -17000,7 +17003,7 @@ module YARD::Templates::Helpers::HtmlHelper # @return [String] the output HTML # @since 0.6.0 # - # source://yard//lib/yard/templates/helpers/html_helper.rb#154 + # source://yard//lib/yard/templates/helpers/html_helper.rb#158 def html_markup_text(text); end # Converts Textile to HTML @@ -17009,7 +17012,7 @@ module YARD::Templates::Helpers::HtmlHelper # @return [String] output HTML # @since 0.6.0 # - # source://yard//lib/yard/templates/helpers/html_helper.rb#118 + # source://yard//lib/yard/templates/helpers/html_helper.rb#122 def html_markup_textile(text); end # Converts plaintext to strict Textile (hard breaks) @@ -17018,7 +17021,7 @@ module YARD::Templates::Helpers::HtmlHelper # @return [String] the output HTML # @since 0.6.0 # - # source://yard//lib/yard/templates/helpers/html_helper.rb#128 + # source://yard//lib/yard/templates/helpers/html_helper.rb#132 def html_markup_textile_strict(text); end # Syntax highlights +source+ in language +type+. @@ -17030,43 +17033,43 @@ module YARD::Templates::Helpers::HtmlHelper # :plain for no syntax highlighting. # @return [String] the highlighted source # - # source://yard//lib/yard/templates/helpers/html_helper.rb#199 + # source://yard//lib/yard/templates/helpers/html_helper.rb#203 def html_syntax_highlight(source, type = T.unsafe(nil)); end # @return [String] unhighlighted source # - # source://yard//lib/yard/templates/helpers/html_helper.rb#210 + # source://yard//lib/yard/templates/helpers/html_helper.rb#214 def html_syntax_highlight_plain(source); end # Turns text into HTML using +markup+ style formatting. # - # @param text [String] the text to format # @param markup [Symbol] examples are +:markdown+, +:textile+, +:rdoc+. # To add a custom markup type, see {MarkupHelper} + # @param text [String] the text to format # @return [String] the HTML # - # source://yard//lib/yard/templates/helpers/html_helper.rb#57 + # source://yard//lib/yard/templates/helpers/html_helper.rb#61 def htmlify(text, markup = T.unsafe(nil)); end # @return [String] HTMLified text as a single line (paragraphs removed) # - # source://yard//lib/yard/templates/helpers/html_helper.rb#184 + # source://yard//lib/yard/templates/helpers/html_helper.rb#188 def htmlify_line(*args); end # Inserts an include link while respecting inlining # - # source://yard//lib/yard/templates/helpers/html_helper.rb#296 + # source://yard//lib/yard/templates/helpers/html_helper.rb#300 def insert_include(text, markup = T.unsafe(nil)); end # Links to an extra file # + # @param anchor [String] optional anchor # @param filename [String] the filename to link to # @param title [String] the title of the link - # @param anchor [String] optional anchor # @return [String] the link to the file # @since 0.5.5 # - # source://yard//lib/yard/templates/helpers/html_helper.rb#270 + # source://yard//lib/yard/templates/helpers/html_helper.rb#274 def link_file(filename, title = T.unsafe(nil), anchor = T.unsafe(nil)); end # Include a file as a docstring in output @@ -17075,7 +17078,7 @@ module YARD::Templates::Helpers::HtmlHelper # @return [String] the file's contents # @since 0.7.0 # - # source://yard//lib/yard/templates/helpers/html_helper.rb#282 + # source://yard//lib/yard/templates/helpers/html_helper.rb#286 def link_include_file(file); end # Includes an object's docstring into output. @@ -17084,7 +17087,7 @@ module YARD::Templates::Helpers::HtmlHelper # @return [String] the object's docstring (no tags) # @since 0.6.0 # - # source://yard//lib/yard/templates/helpers/html_helper.rb#291 + # source://yard//lib/yard/templates/helpers/html_helper.rb#295 def link_include_object(obj); end # Links to an object with an optional title @@ -17093,85 +17096,85 @@ module YARD::Templates::Helpers::HtmlHelper # @param title [String] the title to use for the link # @return [String] the linked object # - # source://yard//lib/yard/templates/helpers/html_helper.rb#301 + # source://yard//lib/yard/templates/helpers/html_helper.rb#305 def link_object(obj, title = T.unsafe(nil), anchor = T.unsafe(nil), relative = T.unsafe(nil)); end # Links to a URL # - # @param url [String] the URL to link to - # @param title [String] the optional title to display the link as # @param params [Hash] optional parameters for the link + # @param title [String] the optional title to display the link as + # @param url [String] the URL to link to # @return [String] the linked URL # - # source://yard//lib/yard/templates/helpers/html_helper.rb#332 + # source://yard//lib/yard/templates/helpers/html_helper.rb#336 def link_url(url, title = T.unsafe(nil), params = T.unsafe(nil)); end - # source://yard//lib/yard/templates/helpers/html_helper.rb#400 + # source://yard//lib/yard/templates/helpers/html_helper.rb#404 def mtime(_file); end # Returns the URL for an object. # - # @param obj [String, CodeObjects::Base] the object (or object path) to link to # @param anchor [String] the anchor to link to + # @param obj [String, CodeObjects::Base] the object (or object path) to link to # @param relative [Boolean] use a relative or absolute link # @return [String] the URL location of the object # - # source://yard//lib/yard/templates/helpers/html_helper.rb#399 + # source://yard//lib/yard/templates/helpers/html_helper.rb#403 def mtime_url(obj, anchor = T.unsafe(nil), relative = T.unsafe(nil)); end # Resolves any text in the form of +{Name}+ to the object specified by # Name. Also supports link titles in the form +{Name title}+. # - # @example Linking to an instance method - # resolve_links("{MyClass#method}") # => "MyClass#method" # @example Linking to a class with a title # resolve_links("{A::B::C the C class}") # => "the c class" + # @example Linking to an instance method + # resolve_links("{MyClass#method}") # => "MyClass#method" # @param text [String] the text to resolve links in # @return [String] HTML with linkified references # - # source://yard//lib/yard/templates/helpers/html_helper.rb#225 + # source://yard//lib/yard/templates/helpers/html_helper.rb#229 def resolve_links(text); end # Formats the signature of method +meth+. # + # @param full_attr_name [Boolean] whether to show the full attribute name + # ("name=" instead of "name") + # @param link [Boolean] whether to link the method signature to the details view # @param meth [CodeObjects::MethodObject] the method object to list # the signature of - # @param link [Boolean] whether to link the method signature to the details view # @param show_extras [Boolean] whether to show extra meta-data (visibility, attribute info) - # @param full_attr_name [Boolean] whether to show the full attribute name - # ("name=" instead of "name") # @return [String] the formatted method signature # - # source://yard//lib/yard/templates/helpers/html_helper.rb#529 + # source://yard//lib/yard/templates/helpers/html_helper.rb#533 def signature(meth, link = T.unsafe(nil), show_extras = T.unsafe(nil), full_attr_name = T.unsafe(nil)); end # Get the return types for a method signature. # - # @param meth [CodeObjects::MethodObject] the method object # @param link [Boolean] whether to link the types + # @param meth [CodeObjects::MethodObject] the method object # @return [String] the signature types # @since 0.5.3 # - # source://yard//lib/yard/templates/helpers/html_helper.rb#492 + # source://yard//lib/yard/templates/helpers/html_helper.rb#496 def signature_types(meth, link = T.unsafe(nil)); end # Returns the URL for an object. # - # @param obj [String, CodeObjects::Base] the object (or object path) to link to # @param anchor [String] the anchor to link to + # @param obj [String, CodeObjects::Base] the object (or object path) to link to # @param relative [Boolean] use a relative or absolute link # @return [String] the URL location of the object # - # source://yard//lib/yard/templates/helpers/html_helper.rb#368 + # source://yard//lib/yard/templates/helpers/html_helper.rb#372 def url_for(obj, anchor = T.unsafe(nil), relative = T.unsafe(nil)); end # Returns the URL for a specific file # - # @param filename [String, CodeObjects::ExtraFileObject] the filename to link to # @param anchor [String] optional anchor + # @param filename [String, CodeObjects::ExtraFileObject] the filename to link to # @return [String] the URL pointing to the file # - # source://yard//lib/yard/templates/helpers/html_helper.rb#407 + # source://yard//lib/yard/templates/helpers/html_helper.rb#411 def url_for_file(filename, anchor = T.unsafe(nil)); end # Returns the URL for the frameset page @@ -17179,7 +17182,7 @@ module YARD::Templates::Helpers::HtmlHelper # @return [String] the URL pointing to the frames page # @since 0.8.0 # - # source://yard//lib/yard/templates/helpers/html_helper.rb#434 + # source://yard//lib/yard/templates/helpers/html_helper.rb#438 def url_for_frameset; end # Returns the URL for the alphabetic index page @@ -17187,7 +17190,7 @@ module YARD::Templates::Helpers::HtmlHelper # @return [String] the URL pointing to the first main page the # user should see. # - # source://yard//lib/yard/templates/helpers/html_helper.rb#450 + # source://yard//lib/yard/templates/helpers/html_helper.rb#454 def url_for_index; end # Returns the URL for a list type @@ -17196,7 +17199,7 @@ module YARD::Templates::Helpers::HtmlHelper # @return [String] the URL pointing to the list # @since 0.8.0 # - # source://yard//lib/yard/templates/helpers/html_helper.rb#426 + # source://yard//lib/yard/templates/helpers/html_helper.rb#430 def url_for_list(type); end # Returns the URL for the main page (README or alphabetic index) @@ -17204,7 +17207,7 @@ module YARD::Templates::Helpers::HtmlHelper # @return [String] the URL pointing to the first main page the # user should see. # - # source://yard//lib/yard/templates/helpers/html_helper.rb#442 + # source://yard//lib/yard/templates/helpers/html_helper.rb#446 def url_for_main; end private @@ -17213,18 +17216,18 @@ module YARD::Templates::Helpers::HtmlHelper # # @since 0.5.3 # - # source://yard//lib/yard/templates/helpers/html_helper.rb#609 + # source://yard//lib/yard/templates/helpers/html_helper.rb#613 def convert_method_to_overload(meth); end # Parses code block's HTML attributes in order to detect the programming # language of what's enclosed in that code block. # - # @param pre_html_attrs [String, nil] HTML attribute list of +pre+ element # @param code_html_attrs [String, nil] HTML attribute list of +code+ # element + # @param pre_html_attrs [String, nil] HTML attribute list of +pre+ element # @return [String, nil] detected programming language # - # source://yard//lib/yard/templates/helpers/html_helper.rb#664 + # source://yard//lib/yard/templates/helpers/html_helper.rb#668 def detect_lang_in_codeblock_attributes(pre_html_attrs, code_html_attrs); end # Parses code blocks out of html and performs syntax highlighting @@ -17234,7 +17237,7 @@ module YARD::Templates::Helpers::HtmlHelper # @return [String] highlighted html # @see #html_syntax_highlight # - # source://yard//lib/yard/templates/helpers/html_helper.rb#640 + # source://yard//lib/yard/templates/helpers/html_helper.rb#644 def parse_codeblocks(html); end # Parses !!!lang out of codeblock, returning the codeblock language @@ -17245,7 +17248,7 @@ module YARD::Templates::Helpers::HtmlHelper # remaining source # @since 0.7.5 # - # source://yard//lib/yard/templates/helpers/html_helper.rb#624 + # source://yard//lib/yard/templates/helpers/html_helper.rb#628 def parse_lang_for_codeblock(source); end # Converts a set of hash options into HTML attributes for a tag @@ -17253,7 +17256,7 @@ module YARD::Templates::Helpers::HtmlHelper # @param opts [Hash{String => String}] the tag options # @return [String] the tag attributes of an HTML tag # - # source://yard//lib/yard/templates/helpers/html_helper.rb#603 + # source://yard//lib/yard/templates/helpers/html_helper.rb#607 def tag_attrs(opts = T.unsafe(nil)); end # Escapes a URL @@ -17261,7 +17264,7 @@ module YARD::Templates::Helpers::HtmlHelper # @param text [String] the URL # @return [String] the escaped URL # - # source://yard//lib/yard/templates/helpers/html_helper.rb#31 + # source://yard//lib/yard/templates/helpers/html_helper.rb#35 def urlencode(text); end class << self @@ -17270,19 +17273,19 @@ module YARD::Templates::Helpers::HtmlHelper # @param text [String] the URL # @return [String] the escaped URL # - # source://yard//lib/yard/templates/helpers/html_helper.rb#47 + # source://yard//lib/yard/templates/helpers/html_helper.rb#51 def urlencode(text); end end end # @private # -# source://yard//lib/yard/templates/helpers/html_helper.rb#15 +# source://yard//lib/yard/templates/helpers/html_helper.rb#19 YARD::Templates::Helpers::HtmlHelper::ASCIIDOC_ATTRIBUTES = T.let(T.unsafe(nil), Hash) # @private # -# source://yard//lib/yard/templates/helpers/html_helper.rb#12 +# source://yard//lib/yard/templates/helpers/html_helper.rb#16 YARD::Templates::Helpers::HtmlHelper::URLMATCH = T.let(T.unsafe(nil), Regexp) # Helper methods for syntax highlighting. @@ -17329,9 +17332,10 @@ end # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#12 class YARD::Templates::Helpers::Markup::RDocMarkup + # @param text [String] # @return [RDocMarkup] a new instance of RDocMarkup # - # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#41 + # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#42 def initialize(text); end # Returns the value of attribute from_path. @@ -17346,7 +17350,9 @@ class YARD::Templates::Helpers::Markup::RDocMarkup # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#35 def from_path=(_arg0); end - # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#50 + # @return [String] + # + # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#52 def to_html; end private @@ -17356,14 +17362,14 @@ class YARD::Templates::Helpers::Markup::RDocMarkup # # @todo Refactor into own SimpleMarkup subclass # - # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#87 + # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#89 def fix_dash_dash(text); end # Fixes RDoc behaviour with ++ only supporting alphanumeric text. # # @todo Refactor into own SimpleMarkup subclass # - # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#66 + # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#68 def fix_typewriter(text); end end @@ -17375,24 +17381,24 @@ class YARD::Templates::Helpers::Markup::RDocMarkupToHtml < ::RDoc::Markup::ToHtm # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#16 def initialize; end - # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#100 + # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#102 def accept_paragraph(*args); end # Returns the value of attribute from_path. # - # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#93 + # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#95 def from_path; end # Sets the attribute from_path # # @param value the value to set the attribute from_path to. # - # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#93 + # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#95 def from_path=(_arg0); end # Disable auto-link of URLs # - # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#96 + # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#98 def handle_special_HYPERLINK(special); end end @@ -17547,8 +17553,8 @@ end module YARD::Templates::Helpers::ModuleHelper # Prunes the method listing by running the verifier and removing attributes/aliases # - # @param list [Array] a list of methods # @param hide_attributes [Boolean] whether to prune attribute methods from the list + # @param list [Array] a list of methods # @return [Array] a pruned list of methods # # source://yard//lib/yard/templates/helpers/module_helper.rb#11 @@ -17776,9 +17782,9 @@ module YARD::Templates::Template # body { css styles here } # p.class { other styles } # - # @param basename [String] the name of the file # @param allow_inherited [Boolean] whether inherited templates can # be inserted with +{{{__super__}}}+ + # @param basename [String] the name of the file # @raise [ArgumentError] # @return [String] the contents of a file identified by +basename+. All # template paths (including any mixed in templates) are searched for @@ -17815,10 +17821,10 @@ module YARD::Templates::Template # Runs a template on +sects+ using extra options. This method should # not be called directly. Instead, call the class method {ClassMethods#run} # + # @param break_first [Boolean] if true, renders only the first section # @param opts [Hash, nil] any extra options to apply to sections # @param sects [Section, Array] a section list of sections to render # @param start_at [Fixnum] the index in the section list to start from - # @param break_first [Boolean] if true, renders only the first section # @return [String] the rendered sections joined together # @yield [opts] calls for the subsections to be rendered # @yieldparam opts [Hash] any extra options to yield @@ -17840,14 +17846,14 @@ module YARD::Templates::Template # Sets the sections (and subsections) to be rendered for the template # - # @example Sets a set of erb sections - # sections :a, :b, :c # searches for a.erb, b.erb, c.erb - # @example Sets a set of method and erb sections - # sections :a, :b, :c # a is a method, the rest are erb files # @example Sections with subsections # sections :header, [:name, :children] # # the above will call header.erb and only renders the subsections # # if they are yielded by the template (see #yieldall) + # @example Sets a set of erb sections + # sections :a, :b, :c # searches for a.erb, b.erb, c.erb + # @example Sets a set of method and erb sections + # sections :a, :b, :c # a is a method, the rest are erb files # @param args [Array] the sections # to use to render the template. For symbols and strings, the # section will be executed as a method (if one exists), or rendered @@ -17943,8 +17949,8 @@ module YARD::Templates::Template # Includes the {extra_includes} modules into the template object. # - # @param template [Template] the template object to mixin the extra includes. # @param options [SymbolHash] the options hash containing all template information + # @param template [Template] the template object to mixin the extra includes. # @return [void] # # source://yard//lib/yard/templates/template.rb#38 @@ -18288,6 +18294,10 @@ YARD::VERSION = T.let(T.unsafe(nil), String) # * +@@TAGNAME+ is translated into +object.tags('TAGNAME')+ # * +object+ can be omitted as target for method calls (it is implied) # +# @example Check if there are any @param tags +# Verifier.new('@@param.empty?') +# # Equivalent to: +# Verifier.new('object.tags(:param).empty?') # @example Create a verifier to check for objects that don't have @private tags # verifier = Verifier.new('!@private') # verifier.call(object) # => true (no @private tag) @@ -18295,20 +18305,16 @@ YARD::VERSION = T.let(T.unsafe(nil), String) # Verifier.new('@return.text.empty?') # # Equivalent to: # Verifier.new('object.tag(:return).text.empty?') -# @example Check if there are any @param tags -# Verifier.new('@@param.empty?') +# @example Specifying multiple expressions +# Verifier.new('@return', '@param', '@yield') # # Equivalent to: -# Verifier.new('object.tags(:param).empty?') +# Verifier.new('@return && @param && @yield') # @example Using +object+ or +o+ to look up object attributes directly # Verifier.new('object.docstring == "hello world"') # # Equivalent to: # Verifier.new('o.docstring == "hello world"') # @example Without using +object+ or +o+ # Verifier.new('tag(:return).size == 1 || has_tag?(:author)') -# @example Specifying multiple expressions -# Verifier.new('@return', '@param', '@yield') -# # Equivalent to: -# Verifier.new('@return && @param && @yield') # # source://yard//lib/yard/verifier.rb#34 class YARD::Verifier diff --git a/test/integration_test.rb b/test/integration_test.rb index 4095ebc6aa..7a5429c937 100644 --- a/test/integration_test.rb +++ b/test/integration_test.rb @@ -30,7 +30,7 @@ def test_ruby_lsp_check_works def test_activation_script_succeeds_even_on_binary_encoding ENV["LC_ALL"] = "C" ENV["LANG"] = "C" - ENV["PS1"] = "\xE2\x96\xB7".b + ENV["NOT_VALID"] = "\xE2\x96\xB7".b _stdout, stderr, status = Open3.capture3( "ruby", @@ -49,7 +49,7 @@ def test_activation_script_succeeds_even_on_binary_encoding refute_nil(gem_path) assert(yjit) - assert(fields.find { |f| f.start_with?("PS1RUBY_LSP_VS") }) + assert(fields.find { |f| f.start_with?("NOT_VALIDRUBY_LSP_VS") }) fields.each do |field| key, value = field.split("RUBY_LSP_VS")