From bd0631c5ddb370aca712d9ab928b7dfb33e1a58c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 5 Nov 2024 04:46:43 +0000 Subject: [PATCH] Update RBIs [dependabot skip] --- .../{prism@0.30.0.rbi => prism@1.2.0.rbi} | 5204 ++++++++++++----- .../gems/{rbi@0.1.14.rbi => rbi@0.2.1.rbi} | 852 ++- .../gems/{spoom@1.4.2.rbi => spoom@1.5.0.rbi} | 28 +- ...0c40b3c4b1498c1276bc2e74ada37469c8354.rbi} | 29 +- .../gems/{thor@1.3.1.rbi => thor@1.3.2.rbi} | 3 + 5 files changed, 4695 insertions(+), 1421 deletions(-) rename sorbet/rbi/gems/{prism@0.30.0.rbi => prism@1.2.0.rbi} (68%) rename sorbet/rbi/gems/{rbi@0.1.14.rbi => rbi@0.2.1.rbi} (72%) rename sorbet/rbi/gems/{spoom@1.4.2.rbi => spoom@1.5.0.rbi} (99%) rename sorbet/rbi/gems/{tapioca@0.16.1-f2010b52a1980b51f649ac4277f37a98f0accce5.rbi => tapioca@0.16.3-1c80c40b3c4b1498c1276bc2e74ada37469c8354.rbi} (99%) rename sorbet/rbi/gems/{thor@1.3.1.rbi => thor@1.3.2.rbi} (99%) diff --git a/sorbet/rbi/gems/prism@0.30.0.rbi b/sorbet/rbi/gems/prism@1.2.0.rbi similarity index 68% rename from sorbet/rbi/gems/prism@0.30.0.rbi rename to sorbet/rbi/gems/prism@1.2.0.rbi index 3c467a3e7..10fee43ed 100644 --- a/sorbet/rbi/gems/prism@0.30.0.rbi +++ b/sorbet/rbi/gems/prism@1.2.0.rbi @@ -7,6 +7,11 @@ # typed: strict +# =begin +# This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/rbi/prism/dsl.rbi.erb +# if you are looking to modify the template +# =end # =begin # This file is generated by the templates/template.rb script and should not be # modified manually. See templates/rbi/prism/node.rbi.erb @@ -64,6 +69,13 @@ class Prism::ASCIISource < ::Prism::Source sig { params(byte_offset: Integer).returns(Integer) } def character_offset(byte_offset); end + sig do + params( + encoding: Encoding + ).returns(T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer))) + end + def code_units_cache(encoding); end + sig { params(byte_offset: Integer, encoding: Encoding).returns(Integer) } def code_units_column(byte_offset, encoding); end @@ -75,13 +87,15 @@ class Prism::AliasGlobalVariableNode < ::Prism::Node sig do params( source: Prism::Source, - new_name: Prism::Node, - old_name: Prism::Node, - keyword_loc: Prism::Location, - location: Prism::Location + node_id: Integer, + location: Prism::Location, + flags: Integer, + new_name: T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode), + old_name: T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::SymbolNode, Prism::MissingNode), + keyword_loc: Prism::Location ).void end - def initialize(source, new_name, old_name, keyword_loc, location); end + def initialize(source, node_id, location, flags, new_name, old_name, keyword_loc); end def ===(other); end @@ -99,13 +113,15 @@ class Prism::AliasGlobalVariableNode < ::Prism::Node sig do params( - new_name: Prism::Node, - old_name: Prism::Node, - keyword_loc: Prism::Location, - location: Prism::Location + node_id: Integer, + location: Prism::Location, + flags: Integer, + new_name: T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode), + old_name: T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::SymbolNode, Prism::MissingNode), + keyword_loc: Prism::Location ).returns(Prism::AliasGlobalVariableNode) end - def copy(new_name: T.unsafe(nil), old_name: T.unsafe(nil), keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), new_name: T.unsafe(nil), old_name: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -125,10 +141,12 @@ class Prism::AliasGlobalVariableNode < ::Prism::Node sig { returns(Prism::Location) } def keyword_loc; end - sig { returns(Prism::Node) } + sig { returns(T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)) } def new_name; end - sig { returns(Prism::Node) } + sig do + returns(T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::SymbolNode, Prism::MissingNode)) + end def old_name; end sig { override.returns(Symbol) } @@ -143,13 +161,15 @@ class Prism::AliasMethodNode < ::Prism::Node sig do params( source: Prism::Source, - new_name: Prism::Node, - old_name: Prism::Node, - keyword_loc: Prism::Location, - location: Prism::Location + node_id: Integer, + location: Prism::Location, + flags: Integer, + new_name: T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode), + old_name: T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode, Prism::GlobalVariableReadNode, Prism::MissingNode), + keyword_loc: Prism::Location ).void end - def initialize(source, new_name, old_name, keyword_loc, location); end + def initialize(source, node_id, location, flags, new_name, old_name, keyword_loc); end def ===(other); end @@ -167,13 +187,15 @@ class Prism::AliasMethodNode < ::Prism::Node sig do params( - new_name: Prism::Node, - old_name: Prism::Node, - keyword_loc: Prism::Location, - location: Prism::Location + node_id: Integer, + location: Prism::Location, + flags: Integer, + new_name: T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode), + old_name: T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode, Prism::GlobalVariableReadNode, Prism::MissingNode), + keyword_loc: Prism::Location ).returns(Prism::AliasMethodNode) end - def copy(new_name: T.unsafe(nil), old_name: T.unsafe(nil), keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), new_name: T.unsafe(nil), old_name: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -193,10 +215,12 @@ class Prism::AliasMethodNode < ::Prism::Node sig { returns(Prism::Location) } def keyword_loc; end - sig { returns(Prism::Node) } + sig { returns(T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)) } def new_name; end - sig { returns(Prism::Node) } + sig do + returns(T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode, Prism::GlobalVariableReadNode, Prism::MissingNode)) + end def old_name; end sig { override.returns(Symbol) } @@ -211,13 +235,15 @@ class Prism::AlternationPatternNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, left: Prism::Node, right: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).void end - def initialize(source, left, right, operator_loc, location); end + def initialize(source, node_id, location, flags, left, right, operator_loc); end def ===(other); end @@ -235,13 +261,15 @@ class Prism::AlternationPatternNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, left: Prism::Node, right: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).returns(Prism::AlternationPatternNode) end - def copy(left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -279,13 +307,15 @@ class Prism::AndNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, left: Prism::Node, right: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).void end - def initialize(source, left, right, operator_loc, location); end + def initialize(source, node_id, location, flags, left, right, operator_loc); end def ===(other); end @@ -303,13 +333,15 @@ class Prism::AndNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, left: Prism::Node, right: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).returns(Prism::AndNode) end - def copy(left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -347,12 +379,13 @@ class Prism::ArgumentsNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, - arguments: T::Array[Prism::Node], - location: Prism::Location + arguments: T::Array[Prism::Node] ).void end - def initialize(source, flags, arguments, location); end + def initialize(source, node_id, location, flags, arguments); end def ===(other); end @@ -371,20 +404,30 @@ class Prism::ArgumentsNode < ::Prism::Node sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end + sig { returns(T::Boolean) } + def contains_forwarding?; end + sig { returns(T::Boolean) } def contains_keyword_splat?; end sig { returns(T::Boolean) } def contains_keywords?; end + sig { returns(T::Boolean) } + def contains_multiple_splats?; end + + sig { returns(T::Boolean) } + def contains_splat?; end + sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, - arguments: T::Array[Prism::Node], - location: Prism::Location + arguments: T::Array[Prism::Node] ).returns(Prism::ArgumentsNode) end - def copy(flags: T.unsafe(nil), arguments: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), arguments: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -401,11 +444,6 @@ class Prism::ArgumentsNode < ::Prism::Node sig { override.returns(Symbol) } def type; end - protected - - sig { returns(Integer) } - def flags; end - class << self def type; end end @@ -414,21 +452,25 @@ end # Flags for arguments nodes. module Prism::ArgumentsNodeFlags; end +Prism::ArgumentsNodeFlags::CONTAINS_FORWARDING = T.let(T.unsafe(nil), Integer) Prism::ArgumentsNodeFlags::CONTAINS_KEYWORDS = T.let(T.unsafe(nil), Integer) Prism::ArgumentsNodeFlags::CONTAINS_KEYWORD_SPLAT = T.let(T.unsafe(nil), Integer) +Prism::ArgumentsNodeFlags::CONTAINS_MULTIPLE_SPLATS = T.let(T.unsafe(nil), Integer) +Prism::ArgumentsNodeFlags::CONTAINS_SPLAT = T.let(T.unsafe(nil), Integer) class Prism::ArrayNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, elements: T::Array[Prism::Node], opening_loc: T.nilable(Prism::Location), - closing_loc: T.nilable(Prism::Location), - location: Prism::Location + closing_loc: T.nilable(Prism::Location) ).void end - def initialize(source, flags, elements, opening_loc, closing_loc, location); end + def initialize(source, node_id, location, flags, elements, opening_loc, closing_loc); end def ===(other); end @@ -455,14 +497,15 @@ class Prism::ArrayNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, elements: T::Array[Prism::Node], opening_loc: T.nilable(Prism::Location), - closing_loc: T.nilable(Prism::Location), - location: Prism::Location + closing_loc: T.nilable(Prism::Location) ).returns(Prism::ArrayNode) end - def copy(flags: T.unsafe(nil), elements: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), elements: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -488,11 +531,6 @@ class Prism::ArrayNode < ::Prism::Node sig { override.returns(Symbol) } def type; end - protected - - sig { returns(Integer) } - def flags; end - class << self def type; end end @@ -507,16 +545,18 @@ class Prism::ArrayPatternNode < ::Prism::Node sig do params( source: Prism::Source, - constant: T.nilable(Prism::Node), + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), requireds: T::Array[Prism::Node], rest: T.nilable(Prism::Node), posts: T::Array[Prism::Node], opening_loc: T.nilable(Prism::Location), - closing_loc: T.nilable(Prism::Location), - location: Prism::Location + closing_loc: T.nilable(Prism::Location) ).void end - def initialize(source, constant, requireds, rest, posts, opening_loc, closing_loc, location); end + def initialize(source, node_id, location, flags, constant, requireds, rest, posts, opening_loc, closing_loc); end def ===(other); end @@ -538,21 +578,23 @@ class Prism::ArrayPatternNode < ::Prism::Node sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - sig { returns(T.nilable(Prism::Node)) } + sig { returns(T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode))) } def constant; end sig do params( - constant: T.nilable(Prism::Node), + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), requireds: T::Array[Prism::Node], rest: T.nilable(Prism::Node), posts: T::Array[Prism::Node], opening_loc: T.nilable(Prism::Location), - closing_loc: T.nilable(Prism::Location), - location: Prism::Location + closing_loc: T.nilable(Prism::Location) ).returns(Prism::ArrayPatternNode) end - def copy(constant: T.unsafe(nil), requireds: T.unsafe(nil), rest: T.unsafe(nil), posts: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), constant: T.unsafe(nil), requireds: T.unsafe(nil), rest: T.unsafe(nil), posts: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -593,13 +635,15 @@ class Prism::AssocNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, key: Prism::Node, value: Prism::Node, - operator_loc: T.nilable(Prism::Location), - location: Prism::Location + operator_loc: T.nilable(Prism::Location) ).void end - def initialize(source, key, value, operator_loc, location); end + def initialize(source, node_id, location, flags, key, value, operator_loc); end def ===(other); end @@ -617,13 +661,15 @@ class Prism::AssocNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, key: Prism::Node, value: Prism::Node, - operator_loc: T.nilable(Prism::Location), - location: Prism::Location + operator_loc: T.nilable(Prism::Location) ).returns(Prism::AssocNode) end - def copy(key: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), key: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -661,12 +707,14 @@ class Prism::AssocSplatNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, value: T.nilable(Prism::Node), - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).void end - def initialize(source, value, operator_loc, location); end + def initialize(source, node_id, location, flags, value, operator_loc); end def ===(other); end @@ -684,12 +732,14 @@ class Prism::AssocSplatNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, value: T.nilable(Prism::Node), - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).returns(Prism::AssocSplatNode) end - def copy(value: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -723,8 +773,8 @@ end Prism::BACKEND = T.let(T.unsafe(nil), Symbol) class Prism::BackReferenceReadNode < ::Prism::Node - sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } - def initialize(source, name, location); end + 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 def ===(other); end @@ -740,8 +790,15 @@ class Prism::BackReferenceReadNode < ::Prism::Node sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - sig { params(name: Symbol, location: Prism::Location).returns(Prism::BackReferenceReadNode) } - def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::BackReferenceReadNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -781,16 +838,18 @@ class Prism::BeginNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, begin_keyword_loc: T.nilable(Prism::Location), statements: T.nilable(Prism::StatementsNode), rescue_clause: T.nilable(Prism::RescueNode), else_clause: T.nilable(Prism::ElseNode), ensure_clause: T.nilable(Prism::EnsureNode), - end_keyword_loc: T.nilable(Prism::Location), - location: Prism::Location + end_keyword_loc: T.nilable(Prism::Location) ).void end - def initialize(source, begin_keyword_loc, statements, rescue_clause, else_clause, ensure_clause, end_keyword_loc, location); end + def initialize(source, node_id, location, flags, begin_keyword_loc, statements, rescue_clause, else_clause, ensure_clause, end_keyword_loc); end def ===(other); end @@ -814,16 +873,18 @@ class Prism::BeginNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, begin_keyword_loc: T.nilable(Prism::Location), statements: T.nilable(Prism::StatementsNode), rescue_clause: T.nilable(Prism::RescueNode), else_clause: T.nilable(Prism::ElseNode), ensure_clause: T.nilable(Prism::EnsureNode), - end_keyword_loc: T.nilable(Prism::Location), - location: Prism::Location + end_keyword_loc: T.nilable(Prism::Location) ).returns(Prism::BeginNode) end - def copy(begin_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), rescue_clause: T.unsafe(nil), else_clause: T.unsafe(nil), ensure_clause: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), begin_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), rescue_clause: T.unsafe(nil), else_clause: T.unsafe(nil), ensure_clause: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -849,7 +910,7 @@ class Prism::BeginNode < ::Prism::Node sig { override.returns(String) } def inspect; end - def newline!(lines); end + def newline_flag!(lines); end sig { returns(T.nilable(Prism::RescueNode)) } def rescue_clause; end @@ -869,12 +930,14 @@ class Prism::BlockArgumentNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, expression: T.nilable(Prism::Node), - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).void end - def initialize(source, expression, operator_loc, location); end + def initialize(source, node_id, location, flags, expression, operator_loc); end def ===(other); end @@ -892,12 +955,14 @@ class Prism::BlockArgumentNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, expression: T.nilable(Prism::Node), - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).returns(Prism::BlockArgumentNode) end - def copy(expression: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), expression: T.unsafe(nil), operator_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -929,8 +994,8 @@ class Prism::BlockArgumentNode < ::Prism::Node end class Prism::BlockLocalVariableNode < ::Prism::Node - sig { params(source: Prism::Source, flags: Integer, name: Symbol, location: Prism::Location).void } - def initialize(source, flags, name, location); end + 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 def ===(other); end @@ -946,8 +1011,15 @@ class Prism::BlockLocalVariableNode < ::Prism::Node sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - sig { params(flags: Integer, name: Symbol, location: Prism::Location).returns(Prism::BlockLocalVariableNode) } - def copy(flags: T.unsafe(nil), name: T.unsafe(nil), location: T.unsafe(nil)); end + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::BlockLocalVariableNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -970,11 +1042,6 @@ class Prism::BlockLocalVariableNode < ::Prism::Node sig { override.returns(Symbol) } def type; end - protected - - sig { returns(Integer) } - def flags; end - class << self def type; end end @@ -984,22 +1051,24 @@ class Prism::BlockNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, locals: T::Array[Symbol], - parameters: T.nilable(Prism::Node), - body: T.nilable(Prism::Node), + parameters: T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode)), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), opening_loc: Prism::Location, - closing_loc: Prism::Location, - location: Prism::Location + closing_loc: Prism::Location ).void end - def initialize(source, locals, parameters, body, opening_loc, closing_loc, location); end + def initialize(source, node_id, location, flags, locals, parameters, body, opening_loc, closing_loc); end def ===(other); end sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - sig { returns(T.nilable(Prism::Node)) } + sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } def body; end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } @@ -1019,15 +1088,17 @@ class Prism::BlockNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, locals: T::Array[Symbol], - parameters: T.nilable(Prism::Node), - body: T.nilable(Prism::Node), + parameters: T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode)), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), opening_loc: Prism::Location, - closing_loc: Prism::Location, - location: Prism::Location + closing_loc: Prism::Location ).returns(Prism::BlockNode) end - def copy(locals: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -1050,7 +1121,7 @@ class Prism::BlockNode < ::Prism::Node sig { returns(Prism::Location) } def opening_loc; end - sig { returns(T.nilable(Prism::Node)) } + sig { returns(T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode))) } def parameters; end sig { override.returns(Symbol) } @@ -1065,14 +1136,15 @@ class Prism::BlockParameterNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, name: T.nilable(Symbol), name_loc: T.nilable(Prism::Location), - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).void end - def initialize(source, flags, name, name_loc, operator_loc, location); end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc); end def ===(other); end @@ -1090,14 +1162,15 @@ class Prism::BlockParameterNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, name: T.nilable(Symbol), name_loc: T.nilable(Prism::Location), - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).returns(Prism::BlockParameterNode) end - def copy(flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -1129,11 +1202,6 @@ class Prism::BlockParameterNode < ::Prism::Node sig { override.returns(Symbol) } def type; end - protected - - sig { returns(Integer) } - def flags; end - class << self def type; end end @@ -1143,14 +1211,16 @@ class Prism::BlockParametersNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, parameters: T.nilable(Prism::ParametersNode), locals: T::Array[Prism::BlockLocalVariableNode], opening_loc: T.nilable(Prism::Location), - closing_loc: T.nilable(Prism::Location), - location: Prism::Location + closing_loc: T.nilable(Prism::Location) ).void end - def initialize(source, parameters, locals, opening_loc, closing_loc, location); end + def initialize(source, node_id, location, flags, parameters, locals, opening_loc, closing_loc); end def ===(other); end @@ -1174,14 +1244,16 @@ class Prism::BlockParametersNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, parameters: T.nilable(Prism::ParametersNode), locals: T::Array[Prism::BlockLocalVariableNode], opening_loc: T.nilable(Prism::Location), - closing_loc: T.nilable(Prism::Location), - location: Prism::Location + closing_loc: T.nilable(Prism::Location) ).returns(Prism::BlockParametersNode) end - def copy(parameters: T.unsafe(nil), locals: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), parameters: T.unsafe(nil), locals: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -1219,12 +1291,14 @@ class Prism::BreakNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, arguments: T.nilable(Prism::ArgumentsNode), - keyword_loc: Prism::Location, - location: Prism::Location + keyword_loc: Prism::Location ).void end - def initialize(source, arguments, keyword_loc, location); end + def initialize(source, node_id, location, flags, arguments, keyword_loc); end def ===(other); end @@ -1245,12 +1319,14 @@ class Prism::BreakNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, arguments: T.nilable(Prism::ArgumentsNode), - keyword_loc: Prism::Location, - location: Prism::Location + keyword_loc: Prism::Location ).returns(Prism::BreakNode) end - def copy(arguments: T.unsafe(nil), keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), arguments: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -1282,6 +1358,8 @@ class Prism::CallAndWriteNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), @@ -1289,11 +1367,10 @@ class Prism::CallAndWriteNode < ::Prism::Node read_name: Symbol, write_name: Symbol, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, location); end + def initialize(source, node_id, location, flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value); end def ===(other); end @@ -1320,6 +1397,8 @@ class Prism::CallAndWriteNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), @@ -1327,11 +1406,10 @@ class Prism::CallAndWriteNode < ::Prism::Node read_name: Symbol, write_name: Symbol, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).returns(Prism::CallAndWriteNode) end - def copy(flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), message_loc: T.unsafe(nil), read_name: T.unsafe(nil), write_name: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), message_loc: T.unsafe(nil), read_name: T.unsafe(nil), write_name: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -1381,11 +1459,6 @@ class Prism::CallAndWriteNode < ::Prism::Node sig { returns(Symbol) } def write_name; end - protected - - sig { returns(Integer) } - def flags; end - class << self def type; end end @@ -1395,6 +1468,8 @@ class Prism::CallNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), @@ -1403,11 +1478,10 @@ class Prism::CallNode < ::Prism::Node opening_loc: T.nilable(Prism::Location), arguments: T.nilable(Prism::ArgumentsNode), closing_loc: T.nilable(Prism::Location), - block: T.nilable(Prism::Node), - location: Prism::Location + block: T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode)) ).void end - def initialize(source, flags, receiver, call_operator_loc, name, message_loc, opening_loc, arguments, closing_loc, block, location); end + def initialize(source, node_id, location, flags, receiver, call_operator_loc, name, message_loc, opening_loc, arguments, closing_loc, block); end def ===(other); end @@ -1420,7 +1494,7 @@ class Prism::CallNode < ::Prism::Node sig { returns(T::Boolean) } def attribute_write?; end - sig { returns(T.nilable(Prism::Node)) } + sig { returns(T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode))) } def block; end sig { returns(T.nilable(String)) } @@ -1446,6 +1520,8 @@ class Prism::CallNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), @@ -1454,11 +1530,10 @@ class Prism::CallNode < ::Prism::Node opening_loc: T.nilable(Prism::Location), arguments: T.nilable(Prism::ArgumentsNode), closing_loc: T.nilable(Prism::Location), - block: T.nilable(Prism::Node), - location: Prism::Location + block: T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode)) ).returns(Prism::CallNode) end - def copy(flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), name: T.unsafe(nil), message_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), name: T.unsafe(nil), message_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -1505,11 +1580,6 @@ class Prism::CallNode < ::Prism::Node sig { returns(T::Boolean) } def variable_call?; end - protected - - sig { returns(Integer) } - def flags; end - class << self def type; end end @@ -1527,6 +1597,8 @@ class Prism::CallOperatorWriteNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), @@ -1535,11 +1607,10 @@ class Prism::CallOperatorWriteNode < ::Prism::Node write_name: Symbol, binary_operator: Symbol, binary_operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, flags, receiver, call_operator_loc, message_loc, read_name, write_name, binary_operator, binary_operator_loc, value, location); end + def initialize(source, node_id, location, flags, receiver, call_operator_loc, message_loc, read_name, write_name, binary_operator, binary_operator_loc, value); end def ===(other); end @@ -1572,6 +1643,8 @@ class Prism::CallOperatorWriteNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), @@ -1580,11 +1653,10 @@ class Prism::CallOperatorWriteNode < ::Prism::Node write_name: Symbol, binary_operator: Symbol, binary_operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).returns(Prism::CallOperatorWriteNode) end - def copy(flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), message_loc: T.unsafe(nil), read_name: T.unsafe(nil), write_name: T.unsafe(nil), binary_operator: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), message_loc: T.unsafe(nil), read_name: T.unsafe(nil), write_name: T.unsafe(nil), binary_operator: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -1631,11 +1703,6 @@ class Prism::CallOperatorWriteNode < ::Prism::Node sig { returns(Symbol) } def write_name; end - protected - - sig { returns(Integer) } - def flags; end - class << self def type; end end @@ -1645,6 +1712,8 @@ class Prism::CallOrWriteNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), @@ -1652,11 +1721,10 @@ class Prism::CallOrWriteNode < ::Prism::Node read_name: Symbol, write_name: Symbol, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, location); end + def initialize(source, node_id, location, flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value); end def ===(other); end @@ -1683,6 +1751,8 @@ class Prism::CallOrWriteNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), @@ -1690,11 +1760,10 @@ class Prism::CallOrWriteNode < ::Prism::Node read_name: Symbol, write_name: Symbol, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).returns(Prism::CallOrWriteNode) end - def copy(flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), message_loc: T.unsafe(nil), read_name: T.unsafe(nil), write_name: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), message_loc: T.unsafe(nil), read_name: T.unsafe(nil), write_name: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -1744,11 +1813,6 @@ class Prism::CallOrWriteNode < ::Prism::Node sig { returns(Symbol) } def write_name; end - protected - - sig { returns(Integer) } - def flags; end - class << self def type; end end @@ -1758,15 +1822,16 @@ class Prism::CallTargetNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, receiver: Prism::Node, call_operator_loc: Prism::Location, name: Symbol, - message_loc: Prism::Location, - location: Prism::Location + message_loc: Prism::Location ).void end - def initialize(source, flags, receiver, call_operator_loc, name, message_loc, location); end + def initialize(source, node_id, location, flags, receiver, call_operator_loc, name, message_loc); end def ===(other); end @@ -1793,15 +1858,16 @@ class Prism::CallTargetNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, receiver: Prism::Node, call_operator_loc: Prism::Location, name: Symbol, - message_loc: Prism::Location, - location: Prism::Location + message_loc: Prism::Location ).returns(Prism::CallTargetNode) end - def copy(flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), name: T.unsafe(nil), message_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), name: T.unsafe(nil), message_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -1839,11 +1905,6 @@ class Prism::CallTargetNode < ::Prism::Node sig { returns(T::Boolean) } def variable_call?; end - protected - - sig { returns(Integer) } - def flags; end - class << self def type; end end @@ -1853,13 +1914,15 @@ class Prism::CapturePatternNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, value: Prism::Node, - target: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + target: Prism::LocalVariableTargetNode, + operator_loc: Prism::Location ).void end - def initialize(source, value, target, operator_loc, location); end + def initialize(source, node_id, location, flags, value, target, operator_loc); end def ===(other); end @@ -1877,13 +1940,15 @@ class Prism::CapturePatternNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, value: Prism::Node, - target: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + target: Prism::LocalVariableTargetNode, + operator_loc: Prism::Location ).returns(Prism::CapturePatternNode) end - def copy(value: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -1903,7 +1968,7 @@ class Prism::CapturePatternNode < ::Prism::Node sig { returns(Prism::Location) } def operator_loc; end - sig { returns(Prism::Node) } + sig { returns(Prism::LocalVariableTargetNode) } def target; end sig { override.returns(Symbol) } @@ -1921,15 +1986,17 @@ class Prism::CaseMatchNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, predicate: T.nilable(Prism::Node), - conditions: T::Array[Prism::Node], - consequent: T.nilable(Prism::ElseNode), + conditions: T::Array[Prism::InNode], + else_clause: T.nilable(Prism::ElseNode), case_keyword_loc: Prism::Location, - end_keyword_loc: Prism::Location, - location: Prism::Location + end_keyword_loc: Prism::Location ).void end - def initialize(source, predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, location); end + def initialize(source, node_id, location, flags, predicate, conditions, else_clause, case_keyword_loc, end_keyword_loc); end def ===(other); end @@ -1951,23 +2018,24 @@ class Prism::CaseMatchNode < ::Prism::Node sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - sig { returns(T::Array[Prism::Node]) } + sig { returns(T::Array[Prism::InNode]) } def conditions; end - sig { returns(T.nilable(Prism::ElseNode)) } def consequent; end sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, predicate: T.nilable(Prism::Node), - conditions: T::Array[Prism::Node], - consequent: T.nilable(Prism::ElseNode), + conditions: T::Array[Prism::InNode], + else_clause: T.nilable(Prism::ElseNode), case_keyword_loc: Prism::Location, - end_keyword_loc: Prism::Location, - location: Prism::Location + end_keyword_loc: Prism::Location ).returns(Prism::CaseMatchNode) end - def copy(predicate: T.unsafe(nil), conditions: T.unsafe(nil), consequent: T.unsafe(nil), case_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), predicate: T.unsafe(nil), conditions: T.unsafe(nil), else_clause: T.unsafe(nil), case_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -1975,6 +2043,9 @@ class Prism::CaseMatchNode < ::Prism::Node sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + sig { returns(T.nilable(Prism::ElseNode)) } + def else_clause; end + sig { returns(String) } def end_keyword; end @@ -2002,15 +2073,17 @@ class Prism::CaseNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, predicate: T.nilable(Prism::Node), - conditions: T::Array[Prism::Node], - consequent: T.nilable(Prism::ElseNode), + conditions: T::Array[Prism::WhenNode], + else_clause: T.nilable(Prism::ElseNode), case_keyword_loc: Prism::Location, - end_keyword_loc: Prism::Location, - location: Prism::Location + end_keyword_loc: Prism::Location ).void end - def initialize(source, predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, location); end + def initialize(source, node_id, location, flags, predicate, conditions, else_clause, case_keyword_loc, end_keyword_loc); end def ===(other); end @@ -2032,23 +2105,24 @@ class Prism::CaseNode < ::Prism::Node sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - sig { returns(T::Array[Prism::Node]) } + sig { returns(T::Array[Prism::WhenNode]) } def conditions; end - sig { returns(T.nilable(Prism::ElseNode)) } def consequent; end sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, predicate: T.nilable(Prism::Node), - conditions: T::Array[Prism::Node], - consequent: T.nilable(Prism::ElseNode), + conditions: T::Array[Prism::WhenNode], + else_clause: T.nilable(Prism::ElseNode), case_keyword_loc: Prism::Location, - end_keyword_loc: Prism::Location, - location: Prism::Location + end_keyword_loc: Prism::Location ).returns(Prism::CaseNode) end - def copy(predicate: T.unsafe(nil), conditions: T.unsafe(nil), consequent: T.unsafe(nil), case_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), predicate: T.unsafe(nil), conditions: T.unsafe(nil), else_clause: T.unsafe(nil), case_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -2056,6 +2130,9 @@ class Prism::CaseNode < ::Prism::Node sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + sig { returns(T.nilable(Prism::ElseNode)) } + def else_clause; end + sig { returns(String) } def end_keyword; end @@ -2083,25 +2160,27 @@ class Prism::ClassNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, locals: T::Array[Symbol], class_keyword_loc: Prism::Location, - constant_path: Prism::Node, + constant_path: T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::CallNode), inheritance_operator_loc: T.nilable(Prism::Location), superclass: T.nilable(Prism::Node), - body: T.nilable(Prism::Node), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), end_keyword_loc: Prism::Location, - name: Symbol, - location: Prism::Location + name: Symbol ).void end - def initialize(source, locals, class_keyword_loc, constant_path, inheritance_operator_loc, superclass, body, end_keyword_loc, name, location); end + def initialize(source, node_id, location, flags, locals, class_keyword_loc, constant_path, inheritance_operator_loc, superclass, body, end_keyword_loc, name); end def ===(other); end sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - sig { returns(T.nilable(Prism::Node)) } + sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } def body; end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } @@ -2119,23 +2198,25 @@ class Prism::ClassNode < ::Prism::Node sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - sig { returns(Prism::Node) } + sig { returns(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::CallNode)) } def constant_path; end sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, locals: T::Array[Symbol], class_keyword_loc: Prism::Location, - constant_path: Prism::Node, + constant_path: T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::CallNode), inheritance_operator_loc: T.nilable(Prism::Location), superclass: T.nilable(Prism::Node), - body: T.nilable(Prism::Node), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), end_keyword_loc: Prism::Location, - name: Symbol, - location: Prism::Location + name: Symbol ).returns(Prism::ClassNode) end - def copy(locals: T.unsafe(nil), class_keyword_loc: T.unsafe(nil), constant_path: T.unsafe(nil), inheritance_operator_loc: T.unsafe(nil), superclass: T.unsafe(nil), body: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), name: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), class_keyword_loc: T.unsafe(nil), constant_path: T.unsafe(nil), inheritance_operator_loc: T.unsafe(nil), superclass: T.unsafe(nil), body: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), name: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -2182,14 +2263,16 @@ class Prism::ClassVariableAndWriteNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, name, name_loc, operator_loc, value, location); end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end def ===(other); end @@ -2207,14 +2290,16 @@ class Prism::ClassVariableAndWriteNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).returns(Prism::ClassVariableAndWriteNode) end - def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -2257,15 +2342,17 @@ class Prism::ClassVariableOperatorWriteNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, binary_operator_loc: Prism::Location, value: Prism::Node, - binary_operator: Symbol, - location: Prism::Location + binary_operator: Symbol ).void end - def initialize(source, name, name_loc, binary_operator_loc, value, binary_operator, location); end + def initialize(source, node_id, location, flags, name, name_loc, binary_operator_loc, value, binary_operator); end def ===(other); end @@ -2289,15 +2376,17 @@ class Prism::ClassVariableOperatorWriteNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, binary_operator_loc: Prism::Location, value: Prism::Node, - binary_operator: Symbol, - location: Prism::Location + binary_operator: Symbol ).returns(Prism::ClassVariableOperatorWriteNode) end - def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -2337,14 +2426,16 @@ class Prism::ClassVariableOrWriteNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, name, name_loc, operator_loc, value, location); end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end def ===(other); end @@ -2362,14 +2453,16 @@ class Prism::ClassVariableOrWriteNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).returns(Prism::ClassVariableOrWriteNode) end - def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -2409,8 +2502,8 @@ class Prism::ClassVariableOrWriteNode < ::Prism::Node end class Prism::ClassVariableReadNode < ::Prism::Node - sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } - def initialize(source, name, location); end + 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 def ===(other); end @@ -2426,8 +2519,15 @@ class Prism::ClassVariableReadNode < ::Prism::Node sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - sig { params(name: Symbol, location: Prism::Location).returns(Prism::ClassVariableReadNode) } - def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::ClassVariableReadNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -2453,8 +2553,8 @@ class Prism::ClassVariableReadNode < ::Prism::Node end class Prism::ClassVariableTargetNode < ::Prism::Node - sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } - def initialize(source, name, location); end + 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 def ===(other); end @@ -2470,8 +2570,15 @@ class Prism::ClassVariableTargetNode < ::Prism::Node sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - sig { params(name: Symbol, location: Prism::Location).returns(Prism::ClassVariableTargetNode) } - def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::ClassVariableTargetNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -2500,14 +2607,16 @@ class Prism::ClassVariableWriteNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, value: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).void end - def initialize(source, name, name_loc, value, operator_loc, location); end + def initialize(source, node_id, location, flags, name, name_loc, value, operator_loc); end def ===(other); end @@ -2525,14 +2634,16 @@ class Prism::ClassVariableWriteNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, value: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).returns(Prism::ClassVariableWriteNode) end - def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -2569,6 +2680,26 @@ class Prism::ClassVariableWriteNode < ::Prism::Node end end +class Prism::CodeUnitsCache + sig { params(source: String, encoding: Encoding).void } + def initialize(source, encoding); end + + sig { params(byte_offset: Integer).returns(Integer) } + def [](byte_offset); end +end + +class Prism::CodeUnitsCache::LengthCounter + def initialize(source, encoding); end + + def count(byte_offset, byte_length); end +end + +class Prism::CodeUnitsCache::UTF16Counter + def initialize(source, encoding); end + + def count(byte_offset, byte_length); end +end + class Prism::Comment abstract! @@ -2757,14 +2888,16 @@ class Prism::ConstantAndWriteNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, name, name_loc, operator_loc, value, location); end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end def ===(other); end @@ -2782,14 +2915,16 @@ class Prism::ConstantAndWriteNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).returns(Prism::ConstantAndWriteNode) end - def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -2832,15 +2967,17 @@ class Prism::ConstantOperatorWriteNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, binary_operator_loc: Prism::Location, value: Prism::Node, - binary_operator: Symbol, - location: Prism::Location + binary_operator: Symbol ).void end - def initialize(source, name, name_loc, binary_operator_loc, value, binary_operator, location); end + def initialize(source, node_id, location, flags, name, name_loc, binary_operator_loc, value, binary_operator); end def ===(other); end @@ -2864,15 +3001,17 @@ class Prism::ConstantOperatorWriteNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, binary_operator_loc: Prism::Location, value: Prism::Node, - binary_operator: Symbol, - location: Prism::Location + binary_operator: Symbol ).returns(Prism::ConstantOperatorWriteNode) end - def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -2912,14 +3051,16 @@ class Prism::ConstantOrWriteNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, name, name_loc, operator_loc, value, location); end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end def ===(other); end @@ -2937,14 +3078,16 @@ class Prism::ConstantOrWriteNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).returns(Prism::ConstantOrWriteNode) end - def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -2987,13 +3130,15 @@ class Prism::ConstantPathAndWriteNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, target: Prism::ConstantPathNode, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, target, operator_loc, value, location); end + def initialize(source, node_id, location, flags, target, operator_loc, value); end def ===(other); end @@ -3011,13 +3156,15 @@ class Prism::ConstantPathAndWriteNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, target: Prism::ConstantPathNode, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).returns(Prism::ConstantPathAndWriteNode) end - def copy(target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -3055,14 +3202,16 @@ class Prism::ConstantPathNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, parent: T.nilable(Prism::Node), name: T.nilable(Symbol), delimiter_loc: Prism::Location, - name_loc: Prism::Location, - location: Prism::Location + name_loc: Prism::Location ).void end - def initialize(source, parent, name, delimiter_loc, name_loc, location); end + def initialize(source, node_id, location, flags, parent, name, delimiter_loc, name_loc); end def ===(other); end @@ -3082,14 +3231,16 @@ class Prism::ConstantPathNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, parent: T.nilable(Prism::Node), name: T.nilable(Symbol), delimiter_loc: Prism::Location, - name_loc: Prism::Location, - location: Prism::Location + name_loc: Prism::Location ).returns(Prism::ConstantPathNode) end - def copy(parent: T.unsafe(nil), name: T.unsafe(nil), delimiter_loc: T.unsafe(nil), name_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), parent: T.unsafe(nil), name: T.unsafe(nil), delimiter_loc: T.unsafe(nil), name_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -3139,14 +3290,16 @@ class Prism::ConstantPathOperatorWriteNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, target: Prism::ConstantPathNode, binary_operator_loc: Prism::Location, value: Prism::Node, - binary_operator: Symbol, - location: Prism::Location + binary_operator: Symbol ).void end - def initialize(source, target, binary_operator_loc, value, binary_operator, location); end + def initialize(source, node_id, location, flags, target, binary_operator_loc, value, binary_operator); end def ===(other); end @@ -3170,14 +3323,16 @@ class Prism::ConstantPathOperatorWriteNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, target: Prism::ConstantPathNode, binary_operator_loc: Prism::Location, value: Prism::Node, - binary_operator: Symbol, - location: Prism::Location + binary_operator: Symbol ).returns(Prism::ConstantPathOperatorWriteNode) end - def copy(target: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -3212,13 +3367,15 @@ class Prism::ConstantPathOrWriteNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, target: Prism::ConstantPathNode, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, target, operator_loc, value, location); end + def initialize(source, node_id, location, flags, target, operator_loc, value); end def ===(other); end @@ -3236,13 +3393,15 @@ class Prism::ConstantPathOrWriteNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, target: Prism::ConstantPathNode, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).returns(Prism::ConstantPathOrWriteNode) end - def copy(target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -3280,14 +3439,16 @@ class Prism::ConstantPathTargetNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, parent: T.nilable(Prism::Node), name: T.nilable(Symbol), delimiter_loc: Prism::Location, - name_loc: Prism::Location, - location: Prism::Location + name_loc: Prism::Location ).void end - def initialize(source, parent, name, delimiter_loc, name_loc, location); end + def initialize(source, node_id, location, flags, parent, name, delimiter_loc, name_loc); end def ===(other); end @@ -3307,14 +3468,16 @@ class Prism::ConstantPathTargetNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, parent: T.nilable(Prism::Node), name: T.nilable(Symbol), delimiter_loc: Prism::Location, - name_loc: Prism::Location, - location: Prism::Location + name_loc: Prism::Location ).returns(Prism::ConstantPathTargetNode) end - def copy(parent: T.unsafe(nil), name: T.unsafe(nil), delimiter_loc: T.unsafe(nil), name_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), parent: T.unsafe(nil), name: T.unsafe(nil), delimiter_loc: T.unsafe(nil), name_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -3361,13 +3524,15 @@ class Prism::ConstantPathWriteNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, target: Prism::ConstantPathNode, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, target, operator_loc, value, location); end + def initialize(source, node_id, location, flags, target, operator_loc, value); end def ===(other); end @@ -3385,13 +3550,15 @@ class Prism::ConstantPathWriteNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, target: Prism::ConstantPathNode, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).returns(Prism::ConstantPathWriteNode) end - def copy(target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -3426,8 +3593,8 @@ class Prism::ConstantPathWriteNode < ::Prism::Node end class Prism::ConstantReadNode < ::Prism::Node - sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } - def initialize(source, name, location); end + 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 def ===(other); end @@ -3443,8 +3610,15 @@ class Prism::ConstantReadNode < ::Prism::Node sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - sig { params(name: Symbol, location: Prism::Location).returns(Prism::ConstantReadNode) } - def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::ConstantReadNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -3476,8 +3650,8 @@ class Prism::ConstantReadNode < ::Prism::Node end class Prism::ConstantTargetNode < ::Prism::Node - sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } - def initialize(source, name, location); end + 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 def ===(other); end @@ -3493,8 +3667,15 @@ class Prism::ConstantTargetNode < ::Prism::Node sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - sig { params(name: Symbol, location: Prism::Location).returns(Prism::ConstantTargetNode) } - def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::ConstantTargetNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -3529,265 +3710,2186 @@ class Prism::ConstantWriteNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, value: Prism::Node, + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, value, operator_loc); end + + def ===(other); end + + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::ConstantWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + sig { returns(String) } + def full_name; end + + sig { returns(T::Array[Symbol]) } + def full_name_parts; end + + sig { override.returns(String) } + def inspect; end + + sig { returns(Symbol) } + def name; end + + sig { returns(Prism::Location) } + def name_loc; end + + sig { returns(String) } + def operator; end + + sig { returns(Prism::Location) } + def operator_loc; end + + sig { override.returns(Symbol) } + def type; end + + sig { returns(Prism::Node) } + def value; end + + class << self + def type; end + end +end + +module Prism::DSL + extend ::Prism::DSL + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + new_name: T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode), + old_name: T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::SymbolNode, Prism::MissingNode), + keyword_loc: Prism::Location + ).returns(Prism::AliasGlobalVariableNode) + end + def alias_global_variable_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), new_name: T.unsafe(nil), old_name: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + new_name: T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode), + old_name: T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode, Prism::GlobalVariableReadNode, Prism::MissingNode), + keyword_loc: Prism::Location + ).returns(Prism::AliasMethodNode) + end + def alias_method_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), new_name: T.unsafe(nil), old_name: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::AlternationPatternNode) + end + def alternation_pattern_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::AndNode) + end + def and_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + arguments: T::Array[Prism::Node] + ).returns(Prism::ArgumentsNode) + end + def arguments_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), arguments: T.unsafe(nil)); end + + sig { params(name: Symbol).returns(Integer) } + def arguments_node_flag(name); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + elements: T::Array[Prism::Node], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::ArrayNode) + end + def array_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), elements: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + sig { params(name: Symbol).returns(Integer) } + def array_node_flag(name); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), + requireds: T::Array[Prism::Node], + rest: T.nilable(Prism::Node), + posts: T::Array[Prism::Node], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::ArrayPatternNode) + end + def array_pattern_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), constant: T.unsafe(nil), requireds: T.unsafe(nil), rest: T.unsafe(nil), posts: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + key: Prism::Node, + value: Prism::Node, + operator_loc: T.nilable(Prism::Location) + ).returns(Prism::AssocNode) + end + def assoc_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), key: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).returns(Prism::AssocSplatNode) + end + def assoc_splat_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::BackReferenceReadNode) + end + def back_reference_read_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + begin_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + rescue_clause: T.nilable(Prism::RescueNode), + else_clause: T.nilable(Prism::ElseNode), + ensure_clause: T.nilable(Prism::EnsureNode), + end_keyword_loc: T.nilable(Prism::Location) + ).returns(Prism::BeginNode) + end + def begin_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), begin_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), rescue_clause: T.unsafe(nil), else_clause: T.unsafe(nil), ensure_clause: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + expression: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).returns(Prism::BlockArgumentNode) + end + def block_argument_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), expression: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::BlockLocalVariableNode) + end + def block_local_variable_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + parameters: T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode)), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).returns(Prism::BlockNode) + end + def block_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location + ).returns(Prism::BlockParameterNode) + end + def block_parameter_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + parameters: T.nilable(Prism::ParametersNode), + locals: T::Array[Prism::BlockLocalVariableNode], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::BlockParametersNode) + end + def block_parameters_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), parameters: T.unsafe(nil), locals: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + arguments: T.nilable(Prism::ArgumentsNode), + keyword_loc: Prism::Location + ).returns(Prism::BreakNode) + end + def break_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), arguments: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + read_name: Symbol, + write_name: Symbol, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::CallAndWriteNode) + end + def call_and_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), message_loc: T.unsafe(nil), read_name: T.unsafe(nil), write_name: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + name: Symbol, + message_loc: T.nilable(Prism::Location), + opening_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: T.nilable(Prism::Location), + block: T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode)) + ).returns(Prism::CallNode) + end + def call_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), name: T.unsafe(nil), message_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil)); end + + sig { params(name: Symbol).returns(Integer) } + def call_node_flag(name); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + read_name: Symbol, + write_name: Symbol, + binary_operator: Symbol, + binary_operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::CallOperatorWriteNode) + end + def call_operator_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), message_loc: T.unsafe(nil), read_name: T.unsafe(nil), write_name: T.unsafe(nil), binary_operator: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + read_name: Symbol, + write_name: Symbol, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::CallOrWriteNode) + end + def call_or_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), message_loc: T.unsafe(nil), read_name: T.unsafe(nil), write_name: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: Prism::Node, + call_operator_loc: Prism::Location, + name: Symbol, + message_loc: Prism::Location + ).returns(Prism::CallTargetNode) + end + def call_target_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), name: T.unsafe(nil), message_loc: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Prism::Node, + target: Prism::LocalVariableTargetNode, + operator_loc: Prism::Location + ).returns(Prism::CapturePatternNode) + end + def capture_pattern_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + predicate: T.nilable(Prism::Node), + conditions: T::Array[Prism::InNode], + else_clause: T.nilable(Prism::ElseNode), + case_keyword_loc: Prism::Location, + end_keyword_loc: Prism::Location + ).returns(Prism::CaseMatchNode) + end + def case_match_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), predicate: T.unsafe(nil), conditions: T.unsafe(nil), else_clause: T.unsafe(nil), case_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + predicate: T.nilable(Prism::Node), + conditions: T::Array[Prism::WhenNode], + else_clause: T.nilable(Prism::ElseNode), + case_keyword_loc: Prism::Location, + end_keyword_loc: Prism::Location + ).returns(Prism::CaseNode) + end + def case_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), predicate: T.unsafe(nil), conditions: T.unsafe(nil), else_clause: T.unsafe(nil), case_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + class_keyword_loc: Prism::Location, + constant_path: T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::CallNode), + inheritance_operator_loc: T.nilable(Prism::Location), + superclass: T.nilable(Prism::Node), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location, + name: Symbol + ).returns(Prism::ClassNode) + end + def class_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), class_keyword_loc: T.unsafe(nil), constant_path: T.unsafe(nil), inheritance_operator_loc: T.unsafe(nil), superclass: T.unsafe(nil), body: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), name: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ClassVariableAndWriteNode) + end + def class_variable_and_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).returns(Prism::ClassVariableOperatorWriteNode) + end + def class_variable_operator_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ClassVariableOrWriteNode) + end + def class_variable_or_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::ClassVariableReadNode) + end + def class_variable_read_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::ClassVariableTargetNode) + end + def class_variable_target_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::ClassVariableWriteNode) + end + def class_variable_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ConstantAndWriteNode) + end + def constant_and_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).returns(Prism::ConstantOperatorWriteNode) + end + def constant_operator_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ConstantOrWriteNode) + end + def constant_or_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ConstantPathAndWriteNode) + end + def constant_path_and_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + parent: T.nilable(Prism::Node), + name: T.nilable(Symbol), + delimiter_loc: Prism::Location, + name_loc: Prism::Location + ).returns(Prism::ConstantPathNode) + end + def constant_path_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), parent: T.unsafe(nil), name: T.unsafe(nil), delimiter_loc: T.unsafe(nil), name_loc: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).returns(Prism::ConstantPathOperatorWriteNode) + end + def constant_path_operator_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ConstantPathOrWriteNode) + end + def constant_path_or_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + parent: T.nilable(Prism::Node), + name: T.nilable(Symbol), + delimiter_loc: Prism::Location, + name_loc: Prism::Location + ).returns(Prism::ConstantPathTargetNode) + end + def constant_path_target_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), parent: T.unsafe(nil), name: T.unsafe(nil), delimiter_loc: T.unsafe(nil), name_loc: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ConstantPathWriteNode) + end + def constant_path_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::ConstantReadNode) + end + def constant_read_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::ConstantTargetNode) + end + def constant_target_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::ConstantWriteNode) + end + def constant_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + receiver: T.nilable(Prism::Node), + parameters: T.nilable(Prism::ParametersNode), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + locals: T::Array[Symbol], + def_keyword_loc: Prism::Location, + operator_loc: T.nilable(Prism::Location), + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + equal_loc: T.nilable(Prism::Location), + end_keyword_loc: T.nilable(Prism::Location) + ).returns(Prism::DefNode) + end + def def_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), receiver: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil), locals: T.unsafe(nil), def_keyword_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil), equal_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + lparen_loc: T.nilable(Prism::Location), + value: Prism::Node, + rparen_loc: T.nilable(Prism::Location), + keyword_loc: Prism::Location + ).returns(Prism::DefinedNode) + end + def defined_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), lparen_loc: T.unsafe(nil), value: T.unsafe(nil), rparen_loc: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + else_keyword_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + end_keyword_loc: T.nilable(Prism::Location) + ).returns(Prism::ElseNode) + end + def else_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), else_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + closing_loc: Prism::Location + ).returns(Prism::EmbeddedStatementsNode) + end + def embedded_statements_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), statements: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + operator_loc: Prism::Location, + variable: T.any(Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode) + ).returns(Prism::EmbeddedVariableNode) + end + def embedded_variable_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), operator_loc: T.unsafe(nil), variable: T.unsafe(nil)); end + + sig { params(name: Symbol).returns(Integer) } + def encoding_flag(name); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + ensure_keyword_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + end_keyword_loc: Prism::Location + ).returns(Prism::EnsureNode) + end + def ensure_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), ensure_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::FalseNode) + end + def false_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), + left: Prism::SplatNode, + requireds: T::Array[Prism::Node], + right: T.any(Prism::SplatNode, Prism::MissingNode), + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::FindPatternNode) + end + def find_pattern_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), constant: T.unsafe(nil), left: T.unsafe(nil), requireds: T.unsafe(nil), right: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: T.nilable(Prism::Node), + right: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).returns(Prism::FlipFlopNode) + end + def flip_flop_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Float + ).returns(Prism::FloatNode) + end + def float_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + index: T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode), + collection: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + for_keyword_loc: Prism::Location, + in_keyword_loc: Prism::Location, + do_keyword_loc: T.nilable(Prism::Location), + end_keyword_loc: Prism::Location + ).returns(Prism::ForNode) + end + def for_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), index: T.unsafe(nil), collection: T.unsafe(nil), statements: T.unsafe(nil), for_keyword_loc: T.unsafe(nil), in_keyword_loc: T.unsafe(nil), do_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::ForwardingArgumentsNode) + end + def forwarding_arguments_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::ForwardingParameterNode) + end + def forwarding_parameter_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + block: T.nilable(Prism::BlockNode) + ).returns(Prism::ForwardingSuperNode) + end + def forwarding_super_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), block: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::GlobalVariableAndWriteNode) + end + def global_variable_and_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).returns(Prism::GlobalVariableOperatorWriteNode) + end + def global_variable_operator_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::GlobalVariableOrWriteNode) + end + def global_variable_or_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::GlobalVariableReadNode) + end + def global_variable_read_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::GlobalVariableTargetNode) + end + def global_variable_target_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::GlobalVariableWriteNode) + end + def global_variable_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)], + closing_loc: Prism::Location + ).returns(Prism::HashNode) + end + def hash_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), elements: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), + elements: T::Array[Prism::AssocNode], + rest: T.nilable(T.any(Prism::AssocSplatNode, Prism::NoKeywordsParameterNode)), + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::HashPatternNode) + end + def hash_pattern_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), constant: T.unsafe(nil), elements: T.unsafe(nil), rest: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + if_keyword_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + subsequent: T.nilable(T.any(Prism::ElseNode, Prism::IfNode)), + end_keyword_loc: T.nilable(Prism::Location) + ).returns(Prism::IfNode) + end + def if_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), if_keyword_loc: T.unsafe(nil), predicate: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), subsequent: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + numeric: T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode) + ).returns(Prism::ImaginaryNode) + end + def imaginary_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), numeric: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: T.any(Prism::LocalVariableReadNode, Prism::CallNode, Prism::ConstantReadNode, Prism::LocalVariableTargetNode) + ).returns(Prism::ImplicitNode) + end + def implicit_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::ImplicitRestNode) + end + def implicit_rest_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + pattern: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + in_loc: Prism::Location, + then_loc: T.nilable(Prism::Location) + ).returns(Prism::InNode) + end + def in_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), pattern: T.unsafe(nil), statements: T.unsafe(nil), in_loc: T.unsafe(nil), then_loc: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::BlockArgumentNode), + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::IndexAndWriteNode) + end + def index_and_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::BlockArgumentNode), + binary_operator: Symbol, + binary_operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::IndexOperatorWriteNode) + end + def index_operator_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil), binary_operator: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::BlockArgumentNode), + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::IndexOrWriteNode) + end + def index_or_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: Prism::Node, + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::BlockArgumentNode) + ).returns(Prism::IndexTargetNode) + end + def index_target_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::InstanceVariableAndWriteNode) + end + def instance_variable_and_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).returns(Prism::InstanceVariableOperatorWriteNode) + end + def instance_variable_operator_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::InstanceVariableOrWriteNode) + end + def instance_variable_or_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::InstanceVariableReadNode) + end + def instance_variable_read_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::InstanceVariableTargetNode) + end + def instance_variable_target_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::InstanceVariableWriteNode) + end + def instance_variable_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + sig { params(name: Symbol).returns(Integer) } + def integer_base_flag(name); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Integer + ).returns(Prism::IntegerNode) + end + def integer_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location + ).returns(Prism::InterpolatedMatchLastLineNode) + end + def interpolated_match_last_line_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location + ).returns(Prism::InterpolatedRegularExpressionNode) + end + def interpolated_regular_expression_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode, Prism::InterpolatedStringNode)], + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::InterpolatedStringNode) + end + def interpolated_string_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + sig { params(name: Symbol).returns(Integer) } + def interpolated_string_node_flag(name); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::InterpolatedSymbolNode) + end + def interpolated_symbol_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location + ).returns(Prism::InterpolatedXStringNode) + end + def interpolated_x_string_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::ItLocalVariableReadNode) + end + def it_local_variable_read_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::ItParametersNode) + end + def it_parameters_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)] + ).returns(Prism::KeywordHashNode) + end + def keyword_hash_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), elements: T.unsafe(nil)); end + + sig { params(name: Symbol).returns(Integer) } + def keyword_hash_node_flag(name); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location + ).returns(Prism::KeywordRestParameterNode) + end + def keyword_rest_parameter_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + operator_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location, + parameters: T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode)), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)) + ).returns(Prism::LambdaNode) + end + def lambda_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + depth: Integer + ).returns(Prism::LocalVariableAndWriteNode) + end + def local_variable_and_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + binary_operator: Symbol, + depth: Integer + ).returns(Prism::LocalVariableOperatorWriteNode) + end + def local_variable_operator_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), binary_operator: T.unsafe(nil), depth: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + depth: Integer + ).returns(Prism::LocalVariableOrWriteNode) + end + def local_variable_or_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer + ).returns(Prism::LocalVariableReadNode) + end + def local_variable_read_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer + ).returns(Prism::LocalVariableTargetNode) + end + def local_variable_target_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::LocalVariableWriteNode) + end + def local_variable_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + sig { params(source: Prism::Source, start_offset: Integer, length: Integer).returns(Prism::Location) } + def location(source: T.unsafe(nil), start_offset: T.unsafe(nil), length: T.unsafe(nil)); end + + sig { params(name: Symbol).returns(Integer) } + def loop_flag(name); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String + ).returns(Prism::MatchLastLineNode) + end + def match_last_line_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Prism::Node, + pattern: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::MatchPredicateNode) + end + def match_predicate_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), pattern: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Prism::Node, + pattern: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::MatchRequiredNode) + end + def match_required_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), pattern: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + call: Prism::CallNode, + targets: T::Array[Prism::LocalVariableTargetNode] + ).returns(Prism::MatchWriteNode) + end + def match_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), call: T.unsafe(nil), targets: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::MissingNode) + end + def missing_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + module_keyword_loc: Prism::Location, + constant_path: T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::MissingNode), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location, + name: Symbol + ).returns(Prism::ModuleNode) + end + def module_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), module_keyword_loc: T.unsafe(nil), constant_path: T.unsafe(nil), body: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), name: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + rest: T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode)), + rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location) + ).returns(Prism::MultiTargetNode) + end + def multi_target_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), lefts: T.unsafe(nil), rest: T.unsafe(nil), rights: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + rest: T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode)), + rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), operator_loc: Prism::Location, - location: Prism::Location - ).void + value: Prism::Node + ).returns(Prism::MultiWriteNode) + end + def multi_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), lefts: T.unsafe(nil), rest: T.unsafe(nil), rights: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + arguments: T.nilable(Prism::ArgumentsNode), + keyword_loc: Prism::Location + ).returns(Prism::NextNode) + end + def next_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), arguments: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::NilNode) + end + def nil_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + operator_loc: Prism::Location, + keyword_loc: Prism::Location + ).returns(Prism::NoKeywordsParameterNode) + end + def no_keywords_parameter_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), operator_loc: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + maximum: Integer + ).returns(Prism::NumberedParametersNode) + end + def numbered_parameters_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), maximum: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + number: Integer + ).returns(Prism::NumberedReferenceReadNode) + end + def numbered_reference_read_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), number: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::OptionalKeywordParameterNode) + end + def optional_keyword_parameter_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::OptionalParameterNode) + end + def optional_parameter_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::OrNode) + end + def or_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + sig { params(name: Symbol).returns(Integer) } + def parameter_flag(name); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + requireds: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode)], + optionals: T::Array[Prism::OptionalParameterNode], + rest: T.nilable(T.any(Prism::RestParameterNode, Prism::ImplicitRestNode)), + posts: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode, Prism::KeywordRestParameterNode, Prism::NoKeywordsParameterNode, Prism::ForwardingParameterNode)], + keywords: T::Array[T.any(Prism::RequiredKeywordParameterNode, Prism::OptionalKeywordParameterNode)], + keyword_rest: T.nilable(T.any(Prism::KeywordRestParameterNode, Prism::ForwardingParameterNode, Prism::NoKeywordsParameterNode)), + block: T.nilable(Prism::BlockParameterNode) + ).returns(Prism::ParametersNode) + end + def parameters_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), requireds: T.unsafe(nil), optionals: T.unsafe(nil), rest: T.unsafe(nil), posts: T.unsafe(nil), keywords: T.unsafe(nil), keyword_rest: T.unsafe(nil), block: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + body: T.nilable(Prism::Node), + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).returns(Prism::ParenthesesNode) + end + def parentheses_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), body: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + expression: Prism::Node, + operator_loc: Prism::Location, + lparen_loc: Prism::Location, + rparen_loc: Prism::Location + ).returns(Prism::PinnedExpressionNode) + end + def pinned_expression_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), expression: T.unsafe(nil), operator_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + variable: T.any(Prism::LocalVariableReadNode, Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::ItLocalVariableReadNode, Prism::MissingNode), + operator_loc: Prism::Location + ).returns(Prism::PinnedVariableNode) + end + def pinned_variable_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), variable: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + statements: T.nilable(Prism::StatementsNode), + keyword_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).returns(Prism::PostExecutionNode) + end + def post_execution_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), statements: T.unsafe(nil), keyword_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + statements: T.nilable(Prism::StatementsNode), + keyword_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).returns(Prism::PreExecutionNode) + end + def pre_execution_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), statements: T.unsafe(nil), keyword_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + statements: Prism::StatementsNode + ).returns(Prism::ProgramNode) + end + def program_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), statements: T.unsafe(nil)); end + + sig { params(name: Symbol).returns(Integer) } + def range_flag(name); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: T.nilable(Prism::Node), + right: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).returns(Prism::RangeNode) + end + def range_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + numerator: Integer, + denominator: Integer + ).returns(Prism::RationalNode) + end + def rational_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), numerator: T.unsafe(nil), denominator: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::RedoNode) + end + def redo_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + sig { params(name: Symbol).returns(Integer) } + def regular_expression_flag(name); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String + ).returns(Prism::RegularExpressionNode) + end + def regular_expression_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location + ).returns(Prism::RequiredKeywordParameterNode) + end + def required_keyword_parameter_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::RequiredParameterNode) + end + def required_parameter_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + expression: Prism::Node, + keyword_loc: Prism::Location, + rescue_expression: Prism::Node + ).returns(Prism::RescueModifierNode) + end + def rescue_modifier_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), expression: T.unsafe(nil), keyword_loc: T.unsafe(nil), rescue_expression: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + exceptions: T::Array[Prism::Node], + operator_loc: T.nilable(Prism::Location), + reference: T.nilable(T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode)), + statements: T.nilable(Prism::StatementsNode), + subsequent: T.nilable(Prism::RescueNode) + ).returns(Prism::RescueNode) + end + def rescue_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), exceptions: T.unsafe(nil), operator_loc: T.unsafe(nil), reference: T.unsafe(nil), statements: T.unsafe(nil), subsequent: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location + ).returns(Prism::RestParameterNode) + end + def rest_parameter_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::RetryNode) + end + def retry_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode) + ).returns(Prism::ReturnNode) + end + def return_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), arguments: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::SelfNode) end - def initialize(source, name, name_loc, value, operator_loc, location); end + def self_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - def ===(other); end + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + write: T.any(Prism::ConstantWriteNode, Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode, Prism::ConstantOperatorWriteNode, Prism::ConstantPathWriteNode, Prism::ConstantPathAndWriteNode, Prism::ConstantPathOrWriteNode, Prism::ConstantPathOperatorWriteNode) + ).returns(Prism::ShareableConstantNode) + end + def shareable_constant_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), write: T.unsafe(nil)); end - sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } - def accept(visitor); end + sig { params(name: Symbol).returns(Integer) } + def shareable_constant_node_flag(name); end - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + class_keyword_loc: Prism::Location, + operator_loc: Prism::Location, + expression: Prism::Node, + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location + ).returns(Prism::SingletonClassNode) + end + def singleton_class_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), class_keyword_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), expression: T.unsafe(nil), body: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end - sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } - def comment_targets; end + sig { params(string: String).returns(Prism::Source) } + def source(string); end - sig { override.returns(T::Array[Prism::Node]) } - def compact_child_nodes; end + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::SourceEncodingNode) + end + def source_encoding_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end sig do params( - name: Symbol, - name_loc: Prism::Location, - value: Prism::Node, + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + filepath: String + ).returns(Prism::SourceFileNode) + end + def source_file_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), filepath: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::SourceLineNode) + end + def source_line_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, operator_loc: Prism::Location, - location: Prism::Location - ).returns(Prism::ConstantWriteNode) + expression: T.nilable(Prism::Node) + ).returns(Prism::SplatNode) end - def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def splat_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), operator_loc: T.unsafe(nil), expression: T.unsafe(nil)); end - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + body: T::Array[Prism::Node] + ).returns(Prism::StatementsNode) + end + def statements_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), body: T.unsafe(nil)); end - sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } - def deconstruct_keys(keys); end + sig { params(name: Symbol).returns(Integer) } + def string_flag(name); end - sig { override.returns(T::Array[Prism::Reflection::Field]) } - def fields; end + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + content_loc: Prism::Location, + closing_loc: T.nilable(Prism::Location), + unescaped: String + ).returns(Prism::StringNode) + end + def string_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end - sig { returns(String) } - def full_name; end + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + lparen_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + rparen_loc: T.nilable(Prism::Location), + block: T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode)) + ).returns(Prism::SuperNode) + end + def super_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), arguments: T.unsafe(nil), rparen_loc: T.unsafe(nil), block: T.unsafe(nil)); end - sig { returns(T::Array[Symbol]) } - def full_name_parts; end + sig { params(name: Symbol).returns(Integer) } + def symbol_flag(name); end - sig { override.returns(String) } - def inspect; end + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + value_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + unescaped: String + ).returns(Prism::SymbolNode) + end + def symbol_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), value_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end - sig { returns(Symbol) } - def name; end + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::TrueNode) + end + def true_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - sig { returns(Prism::Location) } - def name_loc; end + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + names: T::Array[T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)], + keyword_loc: Prism::Location + ).returns(Prism::UndefNode) + end + def undef_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), names: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end - sig { returns(String) } - def operator; end + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + predicate: Prism::Node, + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + else_clause: T.nilable(Prism::ElseNode), + end_keyword_loc: T.nilable(Prism::Location) + ).returns(Prism::UnlessNode) + end + def unless_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), predicate: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), else_clause: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end - sig { returns(Prism::Location) } - def operator_loc; end + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + closing_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + statements: T.nilable(Prism::StatementsNode) + ).returns(Prism::UntilNode) + end + def until_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), predicate: T.unsafe(nil), statements: T.unsafe(nil)); end - sig { override.returns(Symbol) } - def type; end + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + conditions: T::Array[Prism::Node], + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode) + ).returns(Prism::WhenNode) + end + def when_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), conditions: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil)); end - sig { returns(Prism::Node) } - def value; end + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + closing_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + statements: T.nilable(Prism::StatementsNode) + ).returns(Prism::WhileNode) + end + def while_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), predicate: T.unsafe(nil), statements: T.unsafe(nil)); end - class << self - def type; end + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String + ).returns(Prism::XStringNode) end -end + def x_string_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end + + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + lparen_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + rparen_loc: T.nilable(Prism::Location) + ).returns(Prism::YieldNode) + end + def yield_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), arguments: T.unsafe(nil), rparen_loc: T.unsafe(nil)); end -module Prism::DSL private - def AliasGlobalVariableNode(new_name, old_name, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def AliasMethodNode(new_name, old_name, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def AlternationPatternNode(left, right, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def AndNode(left, right, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def ArgumentsNode(flags, arguments, source = T.unsafe(nil), location = T.unsafe(nil)); end - def ArrayNode(flags, elements, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def ArrayPatternNode(constant, requireds, rest, posts, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def AssocNode(key, value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def AssocSplatNode(value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def BackReferenceReadNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end - def BeginNode(begin_keyword_loc, statements, rescue_clause, else_clause, ensure_clause, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def BlockArgumentNode(expression, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def BlockLocalVariableNode(flags, name, source = T.unsafe(nil), location = T.unsafe(nil)); end - def BlockNode(locals, parameters, body, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def BlockParameterNode(flags, name, name_loc, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def BlockParametersNode(parameters, locals, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def BreakNode(arguments, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def CallAndWriteNode(flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end - def CallNode(flags, receiver, call_operator_loc, name, message_loc, opening_loc, arguments, closing_loc, block, source = T.unsafe(nil), location = T.unsafe(nil)); end - def CallOperatorWriteNode(flags, receiver, call_operator_loc, message_loc, read_name, write_name, binary_operator, binary_operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end - def CallOrWriteNode(flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end - def CallTargetNode(flags, receiver, call_operator_loc, name, message_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def CapturePatternNode(value, target, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def CaseMatchNode(predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def CaseNode(predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def ClassNode(locals, class_keyword_loc, constant_path, inheritance_operator_loc, superclass, body, end_keyword_loc, name, source = T.unsafe(nil), location = T.unsafe(nil)); end - def ClassVariableAndWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end - def ClassVariableOperatorWriteNode(name, name_loc, binary_operator_loc, value, binary_operator, source = T.unsafe(nil), location = T.unsafe(nil)); end - def ClassVariableOrWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end - def ClassVariableReadNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end - def ClassVariableTargetNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end - def ClassVariableWriteNode(name, name_loc, value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def ConstantAndWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end - def ConstantOperatorWriteNode(name, name_loc, binary_operator_loc, value, binary_operator, source = T.unsafe(nil), location = T.unsafe(nil)); end - def ConstantOrWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end - def ConstantPathAndWriteNode(target, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end - def ConstantPathNode(parent, name, delimiter_loc, name_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def ConstantPathOperatorWriteNode(target, binary_operator_loc, value, binary_operator, source = T.unsafe(nil), location = T.unsafe(nil)); end - def ConstantPathOrWriteNode(target, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end - def ConstantPathTargetNode(parent, name, delimiter_loc, name_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def ConstantPathWriteNode(target, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end - def ConstantReadNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end - def ConstantTargetNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end - def ConstantWriteNode(name, name_loc, value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def DefNode(name, name_loc, receiver, parameters, body, locals, def_keyword_loc, operator_loc, lparen_loc, rparen_loc, equal_loc, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def DefinedNode(lparen_loc, value, rparen_loc, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def ElseNode(else_keyword_loc, statements, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def EmbeddedStatementsNode(opening_loc, statements, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def EmbeddedVariableNode(operator_loc, variable, source = T.unsafe(nil), location = T.unsafe(nil)); end - def EnsureNode(ensure_keyword_loc, statements, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def FalseNode(source = T.unsafe(nil), location = T.unsafe(nil)); end - def FindPatternNode(constant, left, requireds, right, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def FlipFlopNode(flags, left, right, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def FloatNode(value, source = T.unsafe(nil), location = T.unsafe(nil)); end - def ForNode(index, collection, statements, for_keyword_loc, in_keyword_loc, do_keyword_loc, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def ForwardingArgumentsNode(source = T.unsafe(nil), location = T.unsafe(nil)); end - def ForwardingParameterNode(source = T.unsafe(nil), location = T.unsafe(nil)); end - def ForwardingSuperNode(block, source = T.unsafe(nil), location = T.unsafe(nil)); end - def GlobalVariableAndWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end - def GlobalVariableOperatorWriteNode(name, name_loc, binary_operator_loc, value, binary_operator, source = T.unsafe(nil), location = T.unsafe(nil)); end - def GlobalVariableOrWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end - def GlobalVariableReadNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end - def GlobalVariableTargetNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end - def GlobalVariableWriteNode(name, name_loc, value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def HashNode(opening_loc, elements, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def HashPatternNode(constant, elements, rest, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def IfNode(if_keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def ImaginaryNode(numeric, source = T.unsafe(nil), location = T.unsafe(nil)); end - def ImplicitNode(value, source = T.unsafe(nil), location = T.unsafe(nil)); end - def ImplicitRestNode(source = T.unsafe(nil), location = T.unsafe(nil)); end - def InNode(pattern, statements, in_loc, then_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def IndexAndWriteNode(flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end - def IndexOperatorWriteNode(flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, binary_operator, binary_operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end - def IndexOrWriteNode(flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end - def IndexTargetNode(flags, receiver, opening_loc, arguments, closing_loc, block, source = T.unsafe(nil), location = T.unsafe(nil)); end - def InstanceVariableAndWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end - def InstanceVariableOperatorWriteNode(name, name_loc, binary_operator_loc, value, binary_operator, source = T.unsafe(nil), location = T.unsafe(nil)); end - def InstanceVariableOrWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end - def InstanceVariableReadNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end - def InstanceVariableTargetNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end - def InstanceVariableWriteNode(name, name_loc, value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def IntegerNode(flags, value, source = T.unsafe(nil), location = T.unsafe(nil)); end - def InterpolatedMatchLastLineNode(flags, opening_loc, parts, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def InterpolatedRegularExpressionNode(flags, opening_loc, parts, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def InterpolatedStringNode(flags, opening_loc, parts, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def InterpolatedSymbolNode(opening_loc, parts, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def InterpolatedXStringNode(opening_loc, parts, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def ItLocalVariableReadNode(source = T.unsafe(nil), location = T.unsafe(nil)); end - def ItParametersNode(source = T.unsafe(nil), location = T.unsafe(nil)); end - def KeywordHashNode(flags, elements, source = T.unsafe(nil), location = T.unsafe(nil)); end - def KeywordRestParameterNode(flags, name, name_loc, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def LambdaNode(locals, operator_loc, opening_loc, closing_loc, parameters, body, source = T.unsafe(nil), location = T.unsafe(nil)); end - def LocalVariableAndWriteNode(name_loc, operator_loc, value, name, depth, source = T.unsafe(nil), location = T.unsafe(nil)); end - def LocalVariableOperatorWriteNode(name_loc, binary_operator_loc, value, name, binary_operator, depth, source = T.unsafe(nil), location = T.unsafe(nil)); end - def LocalVariableOrWriteNode(name_loc, operator_loc, value, name, depth, source = T.unsafe(nil), location = T.unsafe(nil)); end - def LocalVariableReadNode(name, depth, source = T.unsafe(nil), location = T.unsafe(nil)); end - def LocalVariableTargetNode(name, depth, source = T.unsafe(nil), location = T.unsafe(nil)); end - def LocalVariableWriteNode(name, depth, name_loc, value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def Location(source = T.unsafe(nil), start_offset = T.unsafe(nil), length = T.unsafe(nil)); end - def MatchLastLineNode(flags, opening_loc, content_loc, closing_loc, unescaped, source = T.unsafe(nil), location = T.unsafe(nil)); end - def MatchPredicateNode(value, pattern, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def MatchRequiredNode(value, pattern, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def MatchWriteNode(call, targets, source = T.unsafe(nil), location = T.unsafe(nil)); end - def MissingNode(source = T.unsafe(nil), location = T.unsafe(nil)); end - def ModuleNode(locals, module_keyword_loc, constant_path, body, end_keyword_loc, name, source = T.unsafe(nil), location = T.unsafe(nil)); end - def MultiTargetNode(lefts, rest, rights, lparen_loc, rparen_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def MultiWriteNode(lefts, rest, rights, lparen_loc, rparen_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end - def NextNode(arguments, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def NilNode(source = T.unsafe(nil), location = T.unsafe(nil)); end - def NoKeywordsParameterNode(operator_loc, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def NumberedParametersNode(maximum, source = T.unsafe(nil), location = T.unsafe(nil)); end - def NumberedReferenceReadNode(number, source = T.unsafe(nil), location = T.unsafe(nil)); end - def OptionalKeywordParameterNode(flags, name, name_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end - def OptionalParameterNode(flags, name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end - def OrNode(left, right, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def ParametersNode(requireds, optionals, rest, posts, keywords, keyword_rest, block, source = T.unsafe(nil), location = T.unsafe(nil)); end - def ParenthesesNode(body, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def PinnedExpressionNode(expression, operator_loc, lparen_loc, rparen_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def PinnedVariableNode(variable, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def PostExecutionNode(statements, keyword_loc, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def PreExecutionNode(statements, keyword_loc, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def ProgramNode(locals, statements, source = T.unsafe(nil), location = T.unsafe(nil)); end - def RangeNode(flags, left, right, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def RationalNode(flags, numerator, denominator, source = T.unsafe(nil), location = T.unsafe(nil)); end - def RedoNode(source = T.unsafe(nil), location = T.unsafe(nil)); end - def RegularExpressionNode(flags, opening_loc, content_loc, closing_loc, unescaped, source = T.unsafe(nil), location = T.unsafe(nil)); end - def RequiredKeywordParameterNode(flags, name, name_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def RequiredParameterNode(flags, name, source = T.unsafe(nil), location = T.unsafe(nil)); end - def RescueModifierNode(expression, keyword_loc, rescue_expression, source = T.unsafe(nil), location = T.unsafe(nil)); end - def RescueNode(keyword_loc, exceptions, operator_loc, reference, statements, consequent, source = T.unsafe(nil), location = T.unsafe(nil)); end - def RestParameterNode(flags, name, name_loc, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def RetryNode(source = T.unsafe(nil), location = T.unsafe(nil)); end - def ReturnNode(flags, keyword_loc, arguments, source = T.unsafe(nil), location = T.unsafe(nil)); end - def SelfNode(source = T.unsafe(nil), location = T.unsafe(nil)); end - def ShareableConstantNode(flags, write, source = T.unsafe(nil), location = T.unsafe(nil)); end - def SingletonClassNode(locals, class_keyword_loc, operator_loc, expression, body, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def SourceEncodingNode(source = T.unsafe(nil), location = T.unsafe(nil)); end - def SourceFileNode(flags, filepath, source = T.unsafe(nil), location = T.unsafe(nil)); end - def SourceLineNode(source = T.unsafe(nil), location = T.unsafe(nil)); end - def SplatNode(operator_loc, expression, source = T.unsafe(nil), location = T.unsafe(nil)); end - def StatementsNode(body, source = T.unsafe(nil), location = T.unsafe(nil)); end - def StringNode(flags, opening_loc, content_loc, closing_loc, unescaped, source = T.unsafe(nil), location = T.unsafe(nil)); end - def SuperNode(keyword_loc, lparen_loc, arguments, rparen_loc, block, source = T.unsafe(nil), location = T.unsafe(nil)); end - def SymbolNode(flags, opening_loc, value_loc, closing_loc, unescaped, source = T.unsafe(nil), location = T.unsafe(nil)); end - def TrueNode(source = T.unsafe(nil), location = T.unsafe(nil)); end - def UndefNode(names, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def UnlessNode(keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - def UntilNode(flags, keyword_loc, closing_loc, predicate, statements, source = T.unsafe(nil), location = T.unsafe(nil)); end - def WhenNode(keyword_loc, conditions, then_keyword_loc, statements, source = T.unsafe(nil), location = T.unsafe(nil)); end - def WhileNode(flags, keyword_loc, closing_loc, predicate, statements, source = T.unsafe(nil), location = T.unsafe(nil)); end - def XStringNode(flags, opening_loc, content_loc, closing_loc, unescaped, source = T.unsafe(nil), location = T.unsafe(nil)); end - def YieldNode(keyword_loc, lparen_loc, arguments, rparen_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + sig { returns(Prism::Location) } + def default_location; end + + sig { params(source: Prism::Source, location: Prism::Location).returns(Prism::Node) } + def default_node(source, location); end + + sig { returns(Prism::Source) } + def default_source; end end class Prism::DefNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, receiver: T.nilable(Prism::Node), parameters: T.nilable(Prism::ParametersNode), - body: T.nilable(Prism::Node), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), locals: T::Array[Symbol], def_keyword_loc: Prism::Location, operator_loc: T.nilable(Prism::Location), lparen_loc: T.nilable(Prism::Location), rparen_loc: T.nilable(Prism::Location), equal_loc: T.nilable(Prism::Location), - end_keyword_loc: T.nilable(Prism::Location), - location: Prism::Location + end_keyword_loc: T.nilable(Prism::Location) ).void end - def initialize(source, name, name_loc, receiver, parameters, body, locals, def_keyword_loc, operator_loc, lparen_loc, rparen_loc, equal_loc, end_keyword_loc, location); end + def initialize(source, node_id, location, flags, name, name_loc, receiver, parameters, body, locals, def_keyword_loc, operator_loc, lparen_loc, rparen_loc, equal_loc, end_keyword_loc); end def ===(other); end sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - sig { returns(T.nilable(Prism::Node)) } + sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } def body; end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } @@ -3801,22 +5903,24 @@ class Prism::DefNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, receiver: T.nilable(Prism::Node), parameters: T.nilable(Prism::ParametersNode), - body: T.nilable(Prism::Node), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), locals: T::Array[Symbol], def_keyword_loc: Prism::Location, operator_loc: T.nilable(Prism::Location), lparen_loc: T.nilable(Prism::Location), rparen_loc: T.nilable(Prism::Location), equal_loc: T.nilable(Prism::Location), - end_keyword_loc: T.nilable(Prism::Location), - location: Prism::Location + end_keyword_loc: T.nilable(Prism::Location) ).returns(Prism::DefNode) end - def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), receiver: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil), locals: T.unsafe(nil), def_keyword_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil), equal_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), receiver: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil), locals: T.unsafe(nil), def_keyword_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil), equal_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -3893,14 +5997,16 @@ class Prism::DefinedNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, lparen_loc: T.nilable(Prism::Location), value: Prism::Node, rparen_loc: T.nilable(Prism::Location), - keyword_loc: Prism::Location, - location: Prism::Location + keyword_loc: Prism::Location ).void end - def initialize(source, lparen_loc, value, rparen_loc, keyword_loc, location); end + def initialize(source, node_id, location, flags, lparen_loc, value, rparen_loc, keyword_loc); end def ===(other); end @@ -3918,14 +6024,16 @@ class Prism::DefinedNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, lparen_loc: T.nilable(Prism::Location), value: Prism::Node, rparen_loc: T.nilable(Prism::Location), - keyword_loc: Prism::Location, - location: Prism::Location + keyword_loc: Prism::Location ).returns(Prism::DefinedNode) end - def copy(lparen_loc: T.unsafe(nil), value: T.unsafe(nil), rparen_loc: T.unsafe(nil), keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), lparen_loc: T.unsafe(nil), value: T.unsafe(nil), rparen_loc: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -3969,13 +6077,15 @@ class Prism::DefinedNode < ::Prism::Node end class Prism::DesugarAndWriteNode - def initialize(node, source, read_class, write_class, *arguments); end + include ::Prism::DSL + + def initialize(node, default_source, read_class, write_class, **arguments); end def arguments; end def compile; end + def default_source; end def node; end def read_class; end - def source; end def write_class; end end @@ -3998,35 +6108,41 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler end class Prism::DesugarOperatorWriteNode - def initialize(node, source, read_class, write_class, *arguments); end + include ::Prism::DSL + + def initialize(node, default_source, read_class, write_class, **arguments); end def arguments; end def compile; end + def default_source; end def node; end def read_class; end - def source; end def write_class; end end class Prism::DesugarOrWriteDefinedNode - def initialize(node, source, read_class, write_class, *arguments); end + include ::Prism::DSL + + def initialize(node, default_source, read_class, write_class, **arguments); end def arguments; end def compile; end + def default_source; end def node; end def read_class; end - def source; end def write_class; end end class Prism::DesugarOrWriteNode - def initialize(node, source, read_class, write_class, *arguments); end + include ::Prism::DSL + + def initialize(node, default_source, read_class, write_class, **arguments); end def arguments; end def compile; end + def default_source; end def node; end def read_class; end - def source; end def write_class; end end @@ -4519,7 +6635,6 @@ class Prism::DotVisitor < ::Prism::Visitor def parameter_flags_inspect(node); end def range_flags_inspect(node); end def regular_expression_flags_inspect(node); end - def return_node_flags_inspect(node); end def shareable_constant_node_flags_inspect(node); end def string_flags_inspect(node); end def symbol_flags_inspect(node); end @@ -4559,13 +6674,15 @@ class Prism::ElseNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, else_keyword_loc: Prism::Location, statements: T.nilable(Prism::StatementsNode), - end_keyword_loc: T.nilable(Prism::Location), - location: Prism::Location + end_keyword_loc: T.nilable(Prism::Location) ).void end - def initialize(source, else_keyword_loc, statements, end_keyword_loc, location); end + def initialize(source, node_id, location, flags, else_keyword_loc, statements, end_keyword_loc); end def ===(other); end @@ -4583,13 +6700,15 @@ class Prism::ElseNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, else_keyword_loc: Prism::Location, statements: T.nilable(Prism::StatementsNode), - end_keyword_loc: T.nilable(Prism::Location), - location: Prism::Location + end_keyword_loc: T.nilable(Prism::Location) ).returns(Prism::ElseNode) end - def copy(else_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), else_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -4638,13 +6757,15 @@ class Prism::EmbeddedStatementsNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, opening_loc: Prism::Location, statements: T.nilable(Prism::StatementsNode), - closing_loc: Prism::Location, - location: Prism::Location + closing_loc: Prism::Location ).void end - def initialize(source, opening_loc, statements, closing_loc, location); end + def initialize(source, node_id, location, flags, opening_loc, statements, closing_loc); end def ===(other); end @@ -4668,13 +6789,15 @@ class Prism::EmbeddedStatementsNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, opening_loc: Prism::Location, statements: T.nilable(Prism::StatementsNode), - closing_loc: Prism::Location, - location: Prism::Location + closing_loc: Prism::Location ).returns(Prism::EmbeddedStatementsNode) end - def copy(opening_loc: T.unsafe(nil), statements: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), statements: T.unsafe(nil), closing_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -4709,12 +6832,14 @@ class Prism::EmbeddedVariableNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, operator_loc: Prism::Location, - variable: Prism::Node, - location: Prism::Location + variable: T.any(Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode) ).void end - def initialize(source, operator_loc, variable, location); end + def initialize(source, node_id, location, flags, operator_loc, variable); end def ===(other); end @@ -4732,12 +6857,14 @@ class Prism::EmbeddedVariableNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, operator_loc: Prism::Location, - variable: Prism::Node, - location: Prism::Location + variable: T.any(Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode) ).returns(Prism::EmbeddedVariableNode) end - def copy(operator_loc: T.unsafe(nil), variable: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), operator_loc: T.unsafe(nil), variable: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -4760,7 +6887,9 @@ class Prism::EmbeddedVariableNode < ::Prism::Node sig { override.returns(Symbol) } def type; end - sig { returns(Prism::Node) } + sig do + returns(T.any(Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)) + end def variable; end class << self @@ -4778,13 +6907,15 @@ class Prism::EnsureNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, ensure_keyword_loc: Prism::Location, statements: T.nilable(Prism::StatementsNode), - end_keyword_loc: Prism::Location, - location: Prism::Location + end_keyword_loc: Prism::Location ).void end - def initialize(source, ensure_keyword_loc, statements, end_keyword_loc, location); end + def initialize(source, node_id, location, flags, ensure_keyword_loc, statements, end_keyword_loc); end def ===(other); end @@ -4802,13 +6933,15 @@ class Prism::EnsureNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, ensure_keyword_loc: Prism::Location, statements: T.nilable(Prism::StatementsNode), - end_keyword_loc: Prism::Location, - location: Prism::Location + end_keyword_loc: Prism::Location ).returns(Prism::EnsureNode) end - def copy(ensure_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), ensure_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -4846,8 +6979,8 @@ class Prism::EnsureNode < ::Prism::Node end class Prism::FalseNode < ::Prism::Node - sig { params(source: Prism::Source, location: Prism::Location).void } - def initialize(source, location); end + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end def ===(other); end @@ -4863,8 +6996,8 @@ class Prism::FalseNode < ::Prism::Node sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - sig { params(location: Prism::Location).returns(Prism::FalseNode) } - def copy(location: T.unsafe(nil)); end + 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 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -4890,16 +7023,18 @@ class Prism::FindPatternNode < ::Prism::Node sig do params( source: Prism::Source, - constant: T.nilable(Prism::Node), - left: Prism::Node, + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), + left: Prism::SplatNode, requireds: T::Array[Prism::Node], - right: Prism::Node, + right: T.any(Prism::SplatNode, Prism::MissingNode), opening_loc: T.nilable(Prism::Location), - closing_loc: T.nilable(Prism::Location), - location: Prism::Location + closing_loc: T.nilable(Prism::Location) ).void end - def initialize(source, constant, left, requireds, right, opening_loc, closing_loc, location); end + def initialize(source, node_id, location, flags, constant, left, requireds, right, opening_loc, closing_loc); end def ===(other); end @@ -4921,21 +7056,23 @@ class Prism::FindPatternNode < ::Prism::Node sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - sig { returns(T.nilable(Prism::Node)) } + sig { returns(T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode))) } def constant; end sig do params( - constant: T.nilable(Prism::Node), - left: Prism::Node, + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), + left: Prism::SplatNode, requireds: T::Array[Prism::Node], - right: Prism::Node, + right: T.any(Prism::SplatNode, Prism::MissingNode), opening_loc: T.nilable(Prism::Location), - closing_loc: T.nilable(Prism::Location), - location: Prism::Location + closing_loc: T.nilable(Prism::Location) ).returns(Prism::FindPatternNode) end - def copy(constant: T.unsafe(nil), left: T.unsafe(nil), requireds: T.unsafe(nil), right: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), constant: T.unsafe(nil), left: T.unsafe(nil), requireds: T.unsafe(nil), right: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -4949,7 +7086,7 @@ class Prism::FindPatternNode < ::Prism::Node sig { override.returns(String) } def inspect; end - sig { returns(Prism::Node) } + sig { returns(Prism::SplatNode) } def left; end sig { returns(T.nilable(String)) } @@ -4961,7 +7098,7 @@ class Prism::FindPatternNode < ::Prism::Node sig { returns(T::Array[Prism::Node]) } def requireds; end - sig { returns(Prism::Node) } + sig { returns(T.any(Prism::SplatNode, Prism::MissingNode)) } def right; end sig { override.returns(Symbol) } @@ -4976,14 +7113,15 @@ class Prism::FlipFlopNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, left: T.nilable(Prism::Node), right: T.nilable(Prism::Node), - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).void end - def initialize(source, flags, left, right, operator_loc, location); end + def initialize(source, node_id, location, flags, left, right, operator_loc); end def ===(other); end @@ -5001,14 +7139,15 @@ class Prism::FlipFlopNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, left: T.nilable(Prism::Node), right: T.nilable(Prism::Node), - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).returns(Prism::FlipFlopNode) end - def copy(flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -5040,19 +7179,14 @@ class Prism::FlipFlopNode < ::Prism::Node sig { override.returns(Symbol) } def type; end - protected - - sig { returns(Integer) } - def flags; end - class << self def type; end end end class Prism::FloatNode < ::Prism::Node - sig { params(source: Prism::Source, value: Float, location: Prism::Location).void } - def initialize(source, value, location); end + 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 def ===(other); end @@ -5068,8 +7202,8 @@ class Prism::FloatNode < ::Prism::Node sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - sig { params(value: Float, location: Prism::Location).returns(Prism::FloatNode) } - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + 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 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -5098,17 +7232,19 @@ class Prism::ForNode < ::Prism::Node sig do params( source: Prism::Source, - index: Prism::Node, + node_id: Integer, + location: Prism::Location, + flags: Integer, + index: T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode), collection: Prism::Node, statements: T.nilable(Prism::StatementsNode), for_keyword_loc: Prism::Location, in_keyword_loc: Prism::Location, do_keyword_loc: T.nilable(Prism::Location), - end_keyword_loc: Prism::Location, - location: Prism::Location + end_keyword_loc: Prism::Location ).void end - def initialize(source, index, collection, statements, for_keyword_loc, in_keyword_loc, do_keyword_loc, end_keyword_loc, location); end + def initialize(source, node_id, location, flags, index, collection, statements, for_keyword_loc, in_keyword_loc, do_keyword_loc, end_keyword_loc); end def ===(other); end @@ -5129,17 +7265,19 @@ class Prism::ForNode < ::Prism::Node sig do params( - index: Prism::Node, + node_id: Integer, + location: Prism::Location, + flags: Integer, + index: T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode), collection: Prism::Node, statements: T.nilable(Prism::StatementsNode), for_keyword_loc: Prism::Location, in_keyword_loc: Prism::Location, do_keyword_loc: T.nilable(Prism::Location), - end_keyword_loc: Prism::Location, - location: Prism::Location + end_keyword_loc: Prism::Location ).returns(Prism::ForNode) end - def copy(index: T.unsafe(nil), collection: T.unsafe(nil), statements: T.unsafe(nil), for_keyword_loc: T.unsafe(nil), in_keyword_loc: T.unsafe(nil), do_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), index: T.unsafe(nil), collection: T.unsafe(nil), statements: T.unsafe(nil), for_keyword_loc: T.unsafe(nil), in_keyword_loc: T.unsafe(nil), do_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -5174,7 +7312,9 @@ class Prism::ForNode < ::Prism::Node sig { returns(Prism::Location) } def in_keyword_loc; end - sig { returns(Prism::Node) } + sig do + returns(T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode)) + end def index; end sig { override.returns(String) } @@ -5192,8 +7332,8 @@ class Prism::ForNode < ::Prism::Node end class Prism::ForwardingArgumentsNode < ::Prism::Node - sig { params(source: Prism::Source, location: Prism::Location).void } - def initialize(source, location); end + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end def ===(other); end @@ -5209,8 +7349,8 @@ class Prism::ForwardingArgumentsNode < ::Prism::Node sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - sig { params(location: Prism::Location).returns(Prism::ForwardingArgumentsNode) } - def copy(location: T.unsafe(nil)); end + 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 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -5233,8 +7373,8 @@ class Prism::ForwardingArgumentsNode < ::Prism::Node end class Prism::ForwardingParameterNode < ::Prism::Node - sig { params(source: Prism::Source, location: Prism::Location).void } - def initialize(source, location); end + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end def ===(other); end @@ -5250,8 +7390,8 @@ class Prism::ForwardingParameterNode < ::Prism::Node sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - sig { params(location: Prism::Location).returns(Prism::ForwardingParameterNode) } - def copy(location: T.unsafe(nil)); end + 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 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -5274,8 +7414,16 @@ class Prism::ForwardingParameterNode < ::Prism::Node end class Prism::ForwardingSuperNode < ::Prism::Node - sig { params(source: Prism::Source, block: T.nilable(Prism::BlockNode), location: Prism::Location).void } - def initialize(source, block, location); end + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + block: T.nilable(Prism::BlockNode) + ).void + end + def initialize(source, node_id, location, flags, block); end def ===(other); end @@ -5294,8 +7442,15 @@ class Prism::ForwardingSuperNode < ::Prism::Node sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - sig { params(block: T.nilable(Prism::BlockNode), location: Prism::Location).returns(Prism::ForwardingSuperNode) } - def copy(block: T.unsafe(nil), location: T.unsafe(nil)); end + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + block: T.nilable(Prism::BlockNode) + ).returns(Prism::ForwardingSuperNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), block: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -5321,14 +7476,16 @@ class Prism::GlobalVariableAndWriteNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, name, name_loc, operator_loc, value, location); end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end def ===(other); end @@ -5346,14 +7503,16 @@ class Prism::GlobalVariableAndWriteNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).returns(Prism::GlobalVariableAndWriteNode) end - def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -5396,15 +7555,17 @@ class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, binary_operator_loc: Prism::Location, value: Prism::Node, - binary_operator: Symbol, - location: Prism::Location + binary_operator: Symbol ).void end - def initialize(source, name, name_loc, binary_operator_loc, value, binary_operator, location); end + def initialize(source, node_id, location, flags, name, name_loc, binary_operator_loc, value, binary_operator); end def ===(other); end @@ -5428,15 +7589,17 @@ class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, binary_operator_loc: Prism::Location, value: Prism::Node, - binary_operator: Symbol, - location: Prism::Location + binary_operator: Symbol ).returns(Prism::GlobalVariableOperatorWriteNode) end - def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -5476,14 +7639,16 @@ class Prism::GlobalVariableOrWriteNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, name, name_loc, operator_loc, value, location); end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end def ===(other); end @@ -5501,14 +7666,16 @@ class Prism::GlobalVariableOrWriteNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).returns(Prism::GlobalVariableOrWriteNode) end - def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -5548,8 +7715,8 @@ class Prism::GlobalVariableOrWriteNode < ::Prism::Node end class Prism::GlobalVariableReadNode < ::Prism::Node - sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } - def initialize(source, name, location); end + 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 def ===(other); end @@ -5565,8 +7732,15 @@ class Prism::GlobalVariableReadNode < ::Prism::Node sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - sig { params(name: Symbol, location: Prism::Location).returns(Prism::GlobalVariableReadNode) } - def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::GlobalVariableReadNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -5592,8 +7766,8 @@ class Prism::GlobalVariableReadNode < ::Prism::Node end class Prism::GlobalVariableTargetNode < ::Prism::Node - sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } - def initialize(source, name, location); end + 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 def ===(other); end @@ -5609,8 +7783,15 @@ class Prism::GlobalVariableTargetNode < ::Prism::Node sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - sig { params(name: Symbol, location: Prism::Location).returns(Prism::GlobalVariableTargetNode) } - def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::GlobalVariableTargetNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -5639,14 +7820,16 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, value: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).void end - def initialize(source, name, name_loc, value, operator_loc, location); end + def initialize(source, node_id, location, flags, name, name_loc, value, operator_loc); end def ===(other); end @@ -5664,14 +7847,16 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, value: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).returns(Prism::GlobalVariableWriteNode) end - def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -5712,13 +7897,15 @@ class Prism::HashNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, opening_loc: Prism::Location, elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)], - closing_loc: Prism::Location, - location: Prism::Location + closing_loc: Prism::Location ).void end - def initialize(source, opening_loc, elements, closing_loc, location); end + def initialize(source, node_id, location, flags, opening_loc, elements, closing_loc); end def ===(other); end @@ -5742,13 +7929,15 @@ class Prism::HashNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, opening_loc: Prism::Location, elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)], - closing_loc: Prism::Location, - location: Prism::Location + closing_loc: Prism::Location ).returns(Prism::HashNode) end - def copy(opening_loc: T.unsafe(nil), elements: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), elements: T.unsafe(nil), closing_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -5783,15 +7972,17 @@ class Prism::HashPatternNode < ::Prism::Node sig do params( source: Prism::Source, - constant: T.nilable(Prism::Node), + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), elements: T::Array[Prism::AssocNode], rest: T.nilable(T.any(Prism::AssocSplatNode, Prism::NoKeywordsParameterNode)), opening_loc: T.nilable(Prism::Location), - closing_loc: T.nilable(Prism::Location), - location: Prism::Location + closing_loc: T.nilable(Prism::Location) ).void end - def initialize(source, constant, elements, rest, opening_loc, closing_loc, location); end + def initialize(source, node_id, location, flags, constant, elements, rest, opening_loc, closing_loc); end def ===(other); end @@ -5813,20 +8004,22 @@ class Prism::HashPatternNode < ::Prism::Node sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - sig { returns(T.nilable(Prism::Node)) } + sig { returns(T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode))) } def constant; end sig do params( - constant: T.nilable(Prism::Node), + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), elements: T::Array[Prism::AssocNode], rest: T.nilable(T.any(Prism::AssocSplatNode, Prism::NoKeywordsParameterNode)), opening_loc: T.nilable(Prism::Location), - closing_loc: T.nilable(Prism::Location), - location: Prism::Location + closing_loc: T.nilable(Prism::Location) ).returns(Prism::HashPatternNode) end - def copy(constant: T.unsafe(nil), elements: T.unsafe(nil), rest: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), constant: T.unsafe(nil), elements: T.unsafe(nil), rest: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -5868,16 +8061,18 @@ class Prism::IfNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, if_keyword_loc: T.nilable(Prism::Location), predicate: Prism::Node, then_keyword_loc: T.nilable(Prism::Location), statements: T.nilable(Prism::StatementsNode), - consequent: T.nilable(Prism::Node), - end_keyword_loc: T.nilable(Prism::Location), - location: Prism::Location + subsequent: T.nilable(T.any(Prism::ElseNode, Prism::IfNode)), + end_keyword_loc: T.nilable(Prism::Location) ).void end - def initialize(source, if_keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, location); end + def initialize(source, node_id, location, flags, if_keyword_loc, predicate, then_keyword_loc, statements, subsequent, end_keyword_loc); end def ===(other); end @@ -5893,21 +8088,22 @@ class Prism::IfNode < ::Prism::Node sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - sig { returns(T.nilable(Prism::Node)) } def consequent; end sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, if_keyword_loc: T.nilable(Prism::Location), predicate: Prism::Node, then_keyword_loc: T.nilable(Prism::Location), statements: T.nilable(Prism::StatementsNode), - consequent: T.nilable(Prism::Node), - end_keyword_loc: T.nilable(Prism::Location), - location: Prism::Location + subsequent: T.nilable(T.any(Prism::ElseNode, Prism::IfNode)), + end_keyword_loc: T.nilable(Prism::Location) ).returns(Prism::IfNode) end - def copy(if_keyword_loc: T.unsafe(nil), predicate: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), consequent: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), if_keyword_loc: T.unsafe(nil), predicate: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), subsequent: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -5933,7 +8129,7 @@ class Prism::IfNode < ::Prism::Node sig { override.returns(String) } def inspect; end - def newline!(lines); end + def newline_flag!(lines); end sig { returns(Prism::Node) } def predicate; end @@ -5941,6 +8137,9 @@ class Prism::IfNode < ::Prism::Node sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end + sig { returns(T.nilable(T.any(Prism::ElseNode, Prism::IfNode))) } + def subsequent; end + sig { returns(T.nilable(String)) } def then_keyword; end @@ -5959,11 +8158,13 @@ class Prism::ImaginaryNode < ::Prism::Node sig do params( source: Prism::Source, - numeric: T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode), - location: Prism::Location + node_id: Integer, + location: Prism::Location, + flags: Integer, + numeric: T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode) ).void end - def initialize(source, numeric, location); end + def initialize(source, node_id, location, flags, numeric); end def ===(other); end @@ -5981,11 +8182,13 @@ class Prism::ImaginaryNode < ::Prism::Node sig do params( - numeric: T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode), - location: Prism::Location + node_id: Integer, + location: Prism::Location, + flags: Integer, + numeric: T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode) ).returns(Prism::ImaginaryNode) end - def copy(numeric: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), numeric: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -6014,8 +8217,16 @@ class Prism::ImaginaryNode < ::Prism::Node end class Prism::ImplicitNode < ::Prism::Node - sig { params(source: Prism::Source, value: Prism::Node, location: Prism::Location).void } - def initialize(source, value, location); end + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: T.any(Prism::LocalVariableReadNode, Prism::CallNode, Prism::ConstantReadNode, Prism::LocalVariableTargetNode) + ).void + end + def initialize(source, node_id, location, flags, value); end def ===(other); end @@ -6031,8 +8242,15 @@ class Prism::ImplicitNode < ::Prism::Node sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - sig { params(value: Prism::Node, location: Prism::Location).returns(Prism::ImplicitNode) } - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: T.any(Prism::LocalVariableReadNode, Prism::CallNode, Prism::ConstantReadNode, Prism::LocalVariableTargetNode) + ).returns(Prism::ImplicitNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -6049,7 +8267,9 @@ class Prism::ImplicitNode < ::Prism::Node sig { override.returns(Symbol) } def type; end - sig { returns(Prism::Node) } + sig do + returns(T.any(Prism::LocalVariableReadNode, Prism::CallNode, Prism::ConstantReadNode, Prism::LocalVariableTargetNode)) + end def value; end class << self @@ -6058,8 +8278,8 @@ class Prism::ImplicitNode < ::Prism::Node end class Prism::ImplicitRestNode < ::Prism::Node - sig { params(source: Prism::Source, location: Prism::Location).void } - def initialize(source, location); end + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end def ===(other); end @@ -6075,8 +8295,8 @@ class Prism::ImplicitRestNode < ::Prism::Node sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - sig { params(location: Prism::Location).returns(Prism::ImplicitRestNode) } - def copy(location: T.unsafe(nil)); end + 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 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -6102,14 +8322,16 @@ class Prism::InNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, pattern: Prism::Node, statements: T.nilable(Prism::StatementsNode), in_loc: Prism::Location, - then_loc: T.nilable(Prism::Location), - location: Prism::Location + then_loc: T.nilable(Prism::Location) ).void end - def initialize(source, pattern, statements, in_loc, then_loc, location); end + def initialize(source, node_id, location, flags, pattern, statements, in_loc, then_loc); end def ===(other); end @@ -6127,14 +8349,16 @@ class Prism::InNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, pattern: Prism::Node, statements: T.nilable(Prism::StatementsNode), in_loc: Prism::Location, - then_loc: T.nilable(Prism::Location), - location: Prism::Location + then_loc: T.nilable(Prism::Location) ).returns(Prism::InNode) end - def copy(pattern: T.unsafe(nil), statements: T.unsafe(nil), in_loc: T.unsafe(nil), then_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), pattern: T.unsafe(nil), statements: T.unsafe(nil), in_loc: T.unsafe(nil), then_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -6178,19 +8402,20 @@ class Prism::IndexAndWriteNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), opening_loc: Prism::Location, arguments: T.nilable(Prism::ArgumentsNode), closing_loc: Prism::Location, - block: T.nilable(Prism::Node), + block: T.nilable(Prism::BlockArgumentNode), operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value, location); end + def initialize(source, node_id, location, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value); end def ===(other); end @@ -6203,7 +8428,7 @@ class Prism::IndexAndWriteNode < ::Prism::Node sig { returns(T::Boolean) } def attribute_write?; end - sig { returns(T.nilable(Prism::Node)) } + sig { returns(T.nilable(Prism::BlockArgumentNode)) } def block; end sig { returns(T.nilable(String)) } @@ -6229,19 +8454,20 @@ class Prism::IndexAndWriteNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), opening_loc: Prism::Location, arguments: T.nilable(Prism::ArgumentsNode), closing_loc: Prism::Location, - block: T.nilable(Prism::Node), + block: T.nilable(Prism::BlockArgumentNode), operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).returns(Prism::IndexAndWriteNode) end - def copy(flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -6285,11 +8511,6 @@ class Prism::IndexAndWriteNode < ::Prism::Node sig { returns(T::Boolean) } def variable_call?; end - protected - - sig { returns(Integer) } - def flags; end - class << self def type; end end @@ -6299,20 +8520,21 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), opening_loc: Prism::Location, arguments: T.nilable(Prism::ArgumentsNode), closing_loc: Prism::Location, - block: T.nilable(Prism::Node), + block: T.nilable(Prism::BlockArgumentNode), binary_operator: Symbol, binary_operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, binary_operator, binary_operator_loc, value, location); end + def initialize(source, node_id, location, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, binary_operator, binary_operator_loc, value); end def ===(other); end @@ -6331,7 +8553,7 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node sig { returns(Prism::Location) } def binary_operator_loc; end - sig { returns(T.nilable(Prism::Node)) } + sig { returns(T.nilable(Prism::BlockArgumentNode)) } def block; end sig { returns(T.nilable(String)) } @@ -6357,20 +8579,21 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), opening_loc: Prism::Location, arguments: T.nilable(Prism::ArgumentsNode), closing_loc: Prism::Location, - block: T.nilable(Prism::Node), + block: T.nilable(Prism::BlockArgumentNode), binary_operator: Symbol, binary_operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).returns(Prism::IndexOperatorWriteNode) end - def copy(flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil), binary_operator: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil), binary_operator: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -6411,11 +8634,6 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node sig { returns(T::Boolean) } def variable_call?; end - protected - - sig { returns(Integer) } - def flags; end - class << self def type; end end @@ -6425,19 +8643,20 @@ class Prism::IndexOrWriteNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), opening_loc: Prism::Location, arguments: T.nilable(Prism::ArgumentsNode), closing_loc: Prism::Location, - block: T.nilable(Prism::Node), + block: T.nilable(Prism::BlockArgumentNode), operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value, location); end + def initialize(source, node_id, location, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value); end def ===(other); end @@ -6450,7 +8669,7 @@ class Prism::IndexOrWriteNode < ::Prism::Node sig { returns(T::Boolean) } def attribute_write?; end - sig { returns(T.nilable(Prism::Node)) } + sig { returns(T.nilable(Prism::BlockArgumentNode)) } def block; end sig { returns(T.nilable(String)) } @@ -6476,19 +8695,20 @@ class Prism::IndexOrWriteNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), opening_loc: Prism::Location, arguments: T.nilable(Prism::ArgumentsNode), closing_loc: Prism::Location, - block: T.nilable(Prism::Node), + block: T.nilable(Prism::BlockArgumentNode), operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).returns(Prism::IndexOrWriteNode) end - def copy(flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -6532,11 +8752,6 @@ class Prism::IndexOrWriteNode < ::Prism::Node sig { returns(T::Boolean) } def variable_call?; end - protected - - sig { returns(Integer) } - def flags; end - class << self def type; end end @@ -6546,16 +8761,17 @@ class Prism::IndexTargetNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, receiver: Prism::Node, opening_loc: Prism::Location, arguments: T.nilable(Prism::ArgumentsNode), closing_loc: Prism::Location, - block: T.nilable(Prism::Node), - location: Prism::Location + block: T.nilable(Prism::BlockArgumentNode) ).void end - def initialize(source, flags, receiver, opening_loc, arguments, closing_loc, block, location); end + def initialize(source, node_id, location, flags, receiver, opening_loc, arguments, closing_loc, block); end def ===(other); end @@ -6568,7 +8784,7 @@ class Prism::IndexTargetNode < ::Prism::Node sig { returns(T::Boolean) } def attribute_write?; end - sig { returns(T.nilable(Prism::Node)) } + sig { returns(T.nilable(Prism::BlockArgumentNode)) } def block; end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } @@ -6588,16 +8804,17 @@ class Prism::IndexTargetNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, receiver: Prism::Node, opening_loc: Prism::Location, arguments: T.nilable(Prism::ArgumentsNode), closing_loc: Prism::Location, - block: T.nilable(Prism::Node), - location: Prism::Location + block: T.nilable(Prism::BlockArgumentNode) ).returns(Prism::IndexTargetNode) end - def copy(flags: T.unsafe(nil), receiver: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -6632,11 +8849,6 @@ class Prism::IndexTargetNode < ::Prism::Node sig { returns(T::Boolean) } def variable_call?; end - protected - - sig { returns(Integer) } - def flags; end - class << self def type; end end @@ -6833,14 +9045,16 @@ class Prism::InstanceVariableAndWriteNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, name, name_loc, operator_loc, value, location); end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end def ===(other); end @@ -6858,14 +9072,16 @@ class Prism::InstanceVariableAndWriteNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).returns(Prism::InstanceVariableAndWriteNode) end - def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -6908,15 +9124,17 @@ class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, binary_operator_loc: Prism::Location, value: Prism::Node, - binary_operator: Symbol, - location: Prism::Location + binary_operator: Symbol ).void end - def initialize(source, name, name_loc, binary_operator_loc, value, binary_operator, location); end + def initialize(source, node_id, location, flags, name, name_loc, binary_operator_loc, value, binary_operator); end def ===(other); end @@ -6940,15 +9158,17 @@ class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, binary_operator_loc: Prism::Location, value: Prism::Node, - binary_operator: Symbol, - location: Prism::Location + binary_operator: Symbol ).returns(Prism::InstanceVariableOperatorWriteNode) end - def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -6988,14 +9208,16 @@ class Prism::InstanceVariableOrWriteNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, name, name_loc, operator_loc, value, location); end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end def ===(other); end @@ -7013,14 +9235,16 @@ class Prism::InstanceVariableOrWriteNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).returns(Prism::InstanceVariableOrWriteNode) end - def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -7060,8 +9284,8 @@ class Prism::InstanceVariableOrWriteNode < ::Prism::Node end class Prism::InstanceVariableReadNode < ::Prism::Node - sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } - def initialize(source, name, location); end + 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 def ===(other); end @@ -7077,8 +9301,15 @@ class Prism::InstanceVariableReadNode < ::Prism::Node sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - sig { params(name: Symbol, location: Prism::Location).returns(Prism::InstanceVariableReadNode) } - def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::InstanceVariableReadNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -7104,8 +9335,8 @@ class Prism::InstanceVariableReadNode < ::Prism::Node end class Prism::InstanceVariableTargetNode < ::Prism::Node - sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } - def initialize(source, name, location); end + 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 def ===(other); end @@ -7121,8 +9352,15 @@ class Prism::InstanceVariableTargetNode < ::Prism::Node sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - sig { params(name: Symbol, location: Prism::Location).returns(Prism::InstanceVariableTargetNode) } - def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::InstanceVariableTargetNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -7151,14 +9389,16 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, value: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).void end - def initialize(source, name, name_loc, value, operator_loc, location); end + def initialize(source, node_id, location, flags, name, name_loc, value, operator_loc); end def ===(other); end @@ -7176,14 +9416,16 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, value: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).returns(Prism::InstanceVariableWriteNode) end - def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -7229,8 +9471,16 @@ Prism::IntegerBaseFlags::HEXADECIMAL = T.let(T.unsafe(nil), Integer) Prism::IntegerBaseFlags::OCTAL = T.let(T.unsafe(nil), Integer) class Prism::IntegerNode < ::Prism::Node - sig { params(source: Prism::Source, flags: Integer, value: Integer, location: Prism::Location).void } - def initialize(source, flags, value, location); end + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Integer + ).void + end + def initialize(source, node_id, location, flags, value); end def ===(other); end @@ -7249,8 +9499,15 @@ class Prism::IntegerNode < ::Prism::Node sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - sig { params(flags: Integer, value: Integer, location: Prism::Location).returns(Prism::IntegerNode) } - def copy(flags: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Integer + ).returns(Prism::IntegerNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil)); end sig { returns(T::Boolean) } def decimal?; end @@ -7279,11 +9536,6 @@ class Prism::IntegerNode < ::Prism::Node sig { returns(Integer) } def value; end - protected - - sig { returns(Integer) } - def flags; end - class << self def type; end end @@ -7295,14 +9547,15 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, opening_loc: Prism::Location, parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], - closing_loc: Prism::Location, - location: Prism::Location + closing_loc: Prism::Location ).void end - def initialize(source, flags, opening_loc, parts, closing_loc, location); end + def initialize(source, node_id, location, flags, opening_loc, parts, closing_loc); end def ===(other); end @@ -7329,14 +9582,15 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, opening_loc: Prism::Location, parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], - closing_loc: Prism::Location, - location: Prism::Location + closing_loc: Prism::Location ).returns(Prism::InterpolatedMatchLastLineNode) end - def copy(flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -7371,7 +9625,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node sig { returns(T::Boolean) } def multi_line?; end - def newline!(lines); end + def newline_flag!(lines); end sig { returns(T::Boolean) } def once?; end @@ -7397,11 +9651,6 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node sig { returns(T::Boolean) } def windows_31j?; end - protected - - sig { returns(Integer) } - def flags; end - class << self def type; end end @@ -7413,14 +9662,15 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, opening_loc: Prism::Location, parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], - closing_loc: Prism::Location, - location: Prism::Location + closing_loc: Prism::Location ).void end - def initialize(source, flags, opening_loc, parts, closing_loc, location); end + def initialize(source, node_id, location, flags, opening_loc, parts, closing_loc); end def ===(other); end @@ -7447,14 +9697,15 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, opening_loc: Prism::Location, parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], - closing_loc: Prism::Location, - location: Prism::Location + closing_loc: Prism::Location ).returns(Prism::InterpolatedRegularExpressionNode) end - def copy(flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -7489,7 +9740,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node sig { returns(T::Boolean) } def multi_line?; end - def newline!(lines); end + def newline_flag!(lines); end sig { returns(T::Boolean) } def once?; end @@ -7515,11 +9766,6 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node sig { returns(T::Boolean) } def windows_31j?; end - protected - - sig { returns(Integer) } - def flags; end - class << self def type; end end @@ -7531,14 +9777,15 @@ class Prism::InterpolatedStringNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, opening_loc: T.nilable(Prism::Location), parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode, Prism::InterpolatedStringNode)], - closing_loc: T.nilable(Prism::Location), - location: Prism::Location + closing_loc: T.nilable(Prism::Location) ).void end - def initialize(source, flags, opening_loc, parts, closing_loc, location); end + def initialize(source, node_id, location, flags, opening_loc, parts, closing_loc); end def ===(other); end @@ -7562,14 +9809,15 @@ class Prism::InterpolatedStringNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, opening_loc: T.nilable(Prism::Location), parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode, Prism::InterpolatedStringNode)], - closing_loc: T.nilable(Prism::Location), - location: Prism::Location + closing_loc: T.nilable(Prism::Location) ).returns(Prism::InterpolatedStringNode) end - def copy(flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -7592,7 +9840,7 @@ class Prism::InterpolatedStringNode < ::Prism::Node sig { returns(T::Boolean) } def mutable?; end - def newline!(lines); end + def newline_flag!(lines); end sig { returns(T.nilable(String)) } def opening; end @@ -7608,11 +9856,6 @@ class Prism::InterpolatedStringNode < ::Prism::Node sig { override.returns(Symbol) } def type; end - protected - - sig { returns(Integer) } - def flags; end - class << self def type; end end @@ -7628,13 +9871,15 @@ class Prism::InterpolatedSymbolNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, opening_loc: T.nilable(Prism::Location), parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], - closing_loc: T.nilable(Prism::Location), - location: Prism::Location + closing_loc: T.nilable(Prism::Location) ).void end - def initialize(source, opening_loc, parts, closing_loc, location); end + def initialize(source, node_id, location, flags, opening_loc, parts, closing_loc); end def ===(other); end @@ -7658,13 +9903,15 @@ class Prism::InterpolatedSymbolNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, opening_loc: T.nilable(Prism::Location), parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], - closing_loc: T.nilable(Prism::Location), - location: Prism::Location + closing_loc: T.nilable(Prism::Location) ).returns(Prism::InterpolatedSymbolNode) end - def copy(opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -7678,7 +9925,7 @@ class Prism::InterpolatedSymbolNode < ::Prism::Node sig { override.returns(String) } def inspect; end - def newline!(lines); end + def newline_flag!(lines); end sig { returns(T.nilable(String)) } def opening; end @@ -7703,13 +9950,15 @@ class Prism::InterpolatedXStringNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, opening_loc: Prism::Location, parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], - closing_loc: Prism::Location, - location: Prism::Location + closing_loc: Prism::Location ).void end - def initialize(source, opening_loc, parts, closing_loc, location); end + def initialize(source, node_id, location, flags, opening_loc, parts, closing_loc); end def ===(other); end @@ -7733,13 +9982,15 @@ class Prism::InterpolatedXStringNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, opening_loc: Prism::Location, parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], - closing_loc: Prism::Location, - location: Prism::Location + closing_loc: Prism::Location ).returns(Prism::InterpolatedXStringNode) end - def copy(opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -7756,7 +10007,7 @@ class Prism::InterpolatedXStringNode < ::Prism::Node sig { override.returns(String) } def inspect; end - def newline!(lines); end + def newline_flag!(lines); end sig { returns(String) } def opening; end @@ -7776,8 +10027,8 @@ class Prism::InterpolatedXStringNode < ::Prism::Node end class Prism::ItLocalVariableReadNode < ::Prism::Node - sig { params(source: Prism::Source, location: Prism::Location).void } - def initialize(source, location); end + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end def ===(other); end @@ -7793,8 +10044,8 @@ class Prism::ItLocalVariableReadNode < ::Prism::Node sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - sig { params(location: Prism::Location).returns(Prism::ItLocalVariableReadNode) } - def copy(location: T.unsafe(nil)); end + 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 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -7817,8 +10068,8 @@ class Prism::ItLocalVariableReadNode < ::Prism::Node end class Prism::ItParametersNode < ::Prism::Node - sig { params(source: Prism::Source, location: Prism::Location).void } - def initialize(source, location); end + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end def ===(other); end @@ -7834,8 +10085,8 @@ class Prism::ItParametersNode < ::Prism::Node sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - sig { params(location: Prism::Location).returns(Prism::ItParametersNode) } - def copy(location: T.unsafe(nil)); end + 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 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -7861,12 +10112,13 @@ class Prism::KeywordHashNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, - elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)], - location: Prism::Location + elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)] ).void end - def initialize(source, flags, elements, location); end + def initialize(source, node_id, location, flags, elements); end def ===(other); end @@ -7884,12 +10136,13 @@ class Prism::KeywordHashNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, - elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)], - location: Prism::Location + elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)] ).returns(Prism::KeywordHashNode) end - def copy(flags: T.unsafe(nil), elements: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), elements: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -7912,11 +10165,6 @@ class Prism::KeywordHashNode < ::Prism::Node sig { override.returns(Symbol) } def type; end - protected - - sig { returns(Integer) } - def flags; end - class << self def type; end end @@ -7931,14 +10179,15 @@ class Prism::KeywordRestParameterNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, name: T.nilable(Symbol), name_loc: T.nilable(Prism::Location), - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).void end - def initialize(source, flags, name, name_loc, operator_loc, location); end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc); end def ===(other); end @@ -7956,14 +10205,15 @@ class Prism::KeywordRestParameterNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, name: T.nilable(Symbol), name_loc: T.nilable(Prism::Location), - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).returns(Prism::KeywordRestParameterNode) end - def copy(flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -7995,11 +10245,6 @@ class Prism::KeywordRestParameterNode < ::Prism::Node sig { override.returns(Symbol) } def type; end - protected - - sig { returns(Integer) } - def flags; end - class << self def type; end end @@ -8009,23 +10254,25 @@ class Prism::LambdaNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, locals: T::Array[Symbol], operator_loc: Prism::Location, opening_loc: Prism::Location, closing_loc: Prism::Location, - parameters: T.nilable(Prism::Node), - body: T.nilable(Prism::Node), - location: Prism::Location + parameters: T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode)), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)) ).void end - def initialize(source, locals, operator_loc, opening_loc, closing_loc, parameters, body, location); end + def initialize(source, node_id, location, flags, locals, operator_loc, opening_loc, closing_loc, parameters, body); end def ===(other); end sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - sig { returns(T.nilable(Prism::Node)) } + sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } def body; end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } @@ -8045,16 +10292,18 @@ class Prism::LambdaNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, locals: T::Array[Symbol], operator_loc: Prism::Location, opening_loc: Prism::Location, closing_loc: Prism::Location, - parameters: T.nilable(Prism::Node), - body: T.nilable(Prism::Node), - location: Prism::Location + parameters: T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode)), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)) ).returns(Prism::LambdaNode) end - def copy(locals: T.unsafe(nil), operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -8083,7 +10332,7 @@ class Prism::LambdaNode < ::Prism::Node sig { returns(Prism::Location) } def operator_loc; end - sig { returns(T.nilable(Prism::Node)) } + sig { returns(T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode))) } def parameters; end sig { override.returns(Symbol) } @@ -8210,15 +10459,17 @@ class Prism::LocalVariableAndWriteNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name_loc: Prism::Location, operator_loc: Prism::Location, value: Prism::Node, name: Symbol, - depth: Integer, - location: Prism::Location + depth: Integer ).void end - def initialize(source, name_loc, operator_loc, value, name, depth, location); end + def initialize(source, node_id, location, flags, name_loc, operator_loc, value, name, depth); end def ===(other); end @@ -8236,15 +10487,17 @@ class Prism::LocalVariableAndWriteNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name_loc: Prism::Location, operator_loc: Prism::Location, value: Prism::Node, name: Symbol, - depth: Integer, - location: Prism::Location + depth: Integer ).returns(Prism::LocalVariableAndWriteNode) end - def copy(name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -8290,16 +10543,18 @@ class Prism::LocalVariableOperatorWriteNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name_loc: Prism::Location, binary_operator_loc: Prism::Location, value: Prism::Node, name: Symbol, binary_operator: Symbol, - depth: Integer, - location: Prism::Location + depth: Integer ).void end - def initialize(source, name_loc, binary_operator_loc, value, name, binary_operator, depth, location); end + def initialize(source, node_id, location, flags, name_loc, binary_operator_loc, value, name, binary_operator, depth); end def ===(other); end @@ -8323,16 +10578,18 @@ class Prism::LocalVariableOperatorWriteNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name_loc: Prism::Location, binary_operator_loc: Prism::Location, value: Prism::Node, name: Symbol, binary_operator: Symbol, - depth: Integer, - location: Prism::Location + depth: Integer ).returns(Prism::LocalVariableOperatorWriteNode) end - def copy(name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), binary_operator: T.unsafe(nil), depth: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), binary_operator: T.unsafe(nil), depth: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -8375,15 +10632,17 @@ class Prism::LocalVariableOrWriteNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name_loc: Prism::Location, operator_loc: Prism::Location, value: Prism::Node, name: Symbol, - depth: Integer, - location: Prism::Location + depth: Integer ).void end - def initialize(source, name_loc, operator_loc, value, name, depth, location); end + def initialize(source, node_id, location, flags, name_loc, operator_loc, value, name, depth); end def ===(other); end @@ -8401,15 +10660,17 @@ class Prism::LocalVariableOrWriteNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name_loc: Prism::Location, operator_loc: Prism::Location, value: Prism::Node, name: Symbol, - depth: Integer, - location: Prism::Location + depth: Integer ).returns(Prism::LocalVariableOrWriteNode) end - def copy(name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -8452,8 +10713,17 @@ class Prism::LocalVariableOrWriteNode < ::Prism::Node end class Prism::LocalVariableReadNode < ::Prism::Node - sig { params(source: Prism::Source, name: Symbol, depth: Integer, location: Prism::Location).void } - def initialize(source, name, depth, location); end + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer + ).void + end + def initialize(source, node_id, location, flags, name, depth); end def ===(other); end @@ -8469,8 +10739,16 @@ class Prism::LocalVariableReadNode < ::Prism::Node sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - sig { params(name: Symbol, depth: Integer, location: Prism::Location).returns(Prism::LocalVariableReadNode) } - def copy(name: T.unsafe(nil), depth: T.unsafe(nil), location: T.unsafe(nil)); end + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer + ).returns(Prism::LocalVariableReadNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -8499,8 +10777,17 @@ class Prism::LocalVariableReadNode < ::Prism::Node end class Prism::LocalVariableTargetNode < ::Prism::Node - sig { params(source: Prism::Source, name: Symbol, depth: Integer, location: Prism::Location).void } - def initialize(source, name, depth, location); end + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer + ).void + end + def initialize(source, node_id, location, flags, name, depth); end def ===(other); end @@ -8516,8 +10803,16 @@ class Prism::LocalVariableTargetNode < ::Prism::Node sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - sig { params(name: Symbol, depth: Integer, location: Prism::Location).returns(Prism::LocalVariableTargetNode) } - def copy(name: T.unsafe(nil), depth: T.unsafe(nil), location: T.unsafe(nil)); end + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer + ).returns(Prism::LocalVariableTargetNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -8549,15 +10844,17 @@ class Prism::LocalVariableWriteNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, depth: Integer, name_loc: Prism::Location, value: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).void end - def initialize(source, name, depth, name_loc, value, operator_loc, location); end + def initialize(source, node_id, location, flags, name, depth, name_loc, value, operator_loc); end def ===(other); end @@ -8575,15 +10872,17 @@ class Prism::LocalVariableWriteNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, depth: Integer, name_loc: Prism::Location, value: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).returns(Prism::LocalVariableWriteNode) end - def copy(name: T.unsafe(nil), depth: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -8633,6 +10932,34 @@ class Prism::Location sig { params(string: String).returns(Prism::Location) } def adjoin(string); end + sig do + params( + cache: T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer)) + ).returns(Integer) + end + def cached_end_code_units_column(cache); end + + sig do + params( + cache: T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer)) + ).returns(Integer) + end + def cached_end_code_units_offset(cache); end + + sig do + params( + cache: T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer)) + ).returns(Integer) + end + def cached_start_code_units_column(cache); end + + sig do + params( + cache: T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer)) + ).returns(Integer) + end + def cached_start_code_units_offset(cache); end + sig { returns(Prism::Location) } def chop; end @@ -8762,15 +11089,16 @@ class Prism::MatchLastLineNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, opening_loc: Prism::Location, content_loc: Prism::Location, closing_loc: Prism::Location, - unescaped: String, - location: Prism::Location + unescaped: String ).void end - def initialize(source, flags, opening_loc, content_loc, closing_loc, unescaped, location); end + def initialize(source, node_id, location, flags, opening_loc, content_loc, closing_loc, unescaped); end def ===(other); end @@ -8803,15 +11131,16 @@ class Prism::MatchLastLineNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, opening_loc: Prism::Location, content_loc: Prism::Location, closing_loc: Prism::Location, - unescaped: String, - location: Prism::Location + unescaped: String ).returns(Prism::MatchLastLineNode) end - def copy(flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -8870,11 +11199,6 @@ class Prism::MatchLastLineNode < ::Prism::Node sig { returns(T::Boolean) } def windows_31j?; end - protected - - sig { returns(Integer) } - def flags; end - class << self def type; end end @@ -8884,13 +11208,15 @@ class Prism::MatchPredicateNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, value: Prism::Node, pattern: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).void end - def initialize(source, value, pattern, operator_loc, location); end + def initialize(source, node_id, location, flags, value, pattern, operator_loc); end def ===(other); end @@ -8908,13 +11234,15 @@ class Prism::MatchPredicateNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, value: Prism::Node, pattern: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).returns(Prism::MatchPredicateNode) end - def copy(value: T.unsafe(nil), pattern: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), pattern: T.unsafe(nil), operator_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -8952,13 +11280,15 @@ class Prism::MatchRequiredNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, value: Prism::Node, pattern: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).void end - def initialize(source, value, pattern, operator_loc, location); end + def initialize(source, node_id, location, flags, value, pattern, operator_loc); end def ===(other); end @@ -8976,13 +11306,15 @@ class Prism::MatchRequiredNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, value: Prism::Node, pattern: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).returns(Prism::MatchRequiredNode) end - def copy(value: T.unsafe(nil), pattern: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), pattern: T.unsafe(nil), operator_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -9020,12 +11352,14 @@ class Prism::MatchWriteNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, call: Prism::CallNode, - targets: T::Array[Prism::LocalVariableTargetNode], - location: Prism::Location + targets: T::Array[Prism::LocalVariableTargetNode] ).void end - def initialize(source, call, targets, location); end + def initialize(source, node_id, location, flags, call, targets); end def ===(other); end @@ -9046,12 +11380,14 @@ class Prism::MatchWriteNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, call: Prism::CallNode, - targets: T::Array[Prism::LocalVariableTargetNode], - location: Prism::Location + targets: T::Array[Prism::LocalVariableTargetNode] ).returns(Prism::MatchWriteNode) end - def copy(call: T.unsafe(nil), targets: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), call: T.unsafe(nil), targets: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -9077,8 +11413,8 @@ class Prism::MatchWriteNode < ::Prism::Node end class Prism::MissingNode < ::Prism::Node - sig { params(source: Prism::Source, location: Prism::Location).void } - def initialize(source, location); end + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end def ===(other); end @@ -9094,8 +11430,8 @@ class Prism::MissingNode < ::Prism::Node sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - sig { params(location: Prism::Location).returns(Prism::MissingNode) } - def copy(location: T.unsafe(nil)); end + 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 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -9121,23 +11457,25 @@ class Prism::ModuleNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, locals: T::Array[Symbol], module_keyword_loc: Prism::Location, - constant_path: Prism::Node, - body: T.nilable(Prism::Node), + constant_path: T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::MissingNode), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), end_keyword_loc: Prism::Location, - name: Symbol, - location: Prism::Location + name: Symbol ).void end - def initialize(source, locals, module_keyword_loc, constant_path, body, end_keyword_loc, name, location); end + def initialize(source, node_id, location, flags, locals, module_keyword_loc, constant_path, body, end_keyword_loc, name); end def ===(other); end sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - sig { returns(T.nilable(Prism::Node)) } + sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } def body; end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } @@ -9149,21 +11487,23 @@ class Prism::ModuleNode < ::Prism::Node sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - sig { returns(Prism::Node) } + sig { returns(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::MissingNode)) } def constant_path; end sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, locals: T::Array[Symbol], module_keyword_loc: Prism::Location, - constant_path: Prism::Node, - body: T.nilable(Prism::Node), + constant_path: T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::MissingNode), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), end_keyword_loc: Prism::Location, - name: Symbol, - location: Prism::Location + name: Symbol ).returns(Prism::ModuleNode) end - def copy(locals: T.unsafe(nil), module_keyword_loc: T.unsafe(nil), constant_path: T.unsafe(nil), body: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), name: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), module_keyword_loc: T.unsafe(nil), constant_path: T.unsafe(nil), body: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), name: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -9207,15 +11547,17 @@ class Prism::MultiTargetNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], - rest: T.nilable(Prism::Node), - rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode)], + rest: T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode)), + rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], lparen_loc: T.nilable(Prism::Location), - rparen_loc: T.nilable(Prism::Location), - location: Prism::Location + rparen_loc: T.nilable(Prism::Location) ).void end - def initialize(source, lefts, rest, rights, lparen_loc, rparen_loc, location); end + def initialize(source, node_id, location, flags, lefts, rest, rights, lparen_loc, rparen_loc); end def ===(other); end @@ -9233,15 +11575,17 @@ class Prism::MultiTargetNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], - rest: T.nilable(Prism::Node), - rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode)], + rest: T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode)), + rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], lparen_loc: T.nilable(Prism::Location), - rparen_loc: T.nilable(Prism::Location), - location: Prism::Location + rparen_loc: T.nilable(Prism::Location) ).returns(Prism::MultiTargetNode) end - def copy(lefts: T.unsafe(nil), rest: T.unsafe(nil), rights: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), lefts: T.unsafe(nil), rest: T.unsafe(nil), rights: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -9266,11 +11610,11 @@ class Prism::MultiTargetNode < ::Prism::Node sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end - sig { returns(T.nilable(Prism::Node)) } + sig { returns(T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode))) } def rest; end sig do - returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode)]) + returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)]) end def rights; end @@ -9292,17 +11636,19 @@ class Prism::MultiWriteNode < ::Prism::Node sig do params( source: Prism::Source, - lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode)], - rest: T.nilable(Prism::Node), - rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode)], + node_id: Integer, + location: Prism::Location, + flags: Integer, + lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + rest: T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode)), + rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], lparen_loc: T.nilable(Prism::Location), rparen_loc: T.nilable(Prism::Location), operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, lefts, rest, rights, lparen_loc, rparen_loc, operator_loc, value, location); end + def initialize(source, node_id, location, flags, lefts, rest, rights, lparen_loc, rparen_loc, operator_loc, value); end def ===(other); end @@ -9320,17 +11666,19 @@ class Prism::MultiWriteNode < ::Prism::Node sig do params( - lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode)], - rest: T.nilable(Prism::Node), - rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode)], + node_id: Integer, + location: Prism::Location, + flags: Integer, + lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + rest: T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode)), + rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], lparen_loc: T.nilable(Prism::Location), rparen_loc: T.nilable(Prism::Location), operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).returns(Prism::MultiWriteNode) end - def copy(lefts: T.unsafe(nil), rest: T.unsafe(nil), rights: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), lefts: T.unsafe(nil), rest: T.unsafe(nil), rights: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -9345,7 +11693,7 @@ class Prism::MultiWriteNode < ::Prism::Node def inspect; end sig do - returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode)]) + returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)]) end def lefts; end @@ -9361,11 +11709,11 @@ class Prism::MultiWriteNode < ::Prism::Node sig { returns(Prism::Location) } def operator_loc; end - sig { returns(T.nilable(Prism::Node)) } + sig { returns(T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode))) } def rest; end sig do - returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode)]) + returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)]) end def rights; end @@ -9544,12 +11892,14 @@ class Prism::NextNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, arguments: T.nilable(Prism::ArgumentsNode), - keyword_loc: Prism::Location, - location: Prism::Location + keyword_loc: Prism::Location ).void end - def initialize(source, arguments, keyword_loc, location); end + def initialize(source, node_id, location, flags, arguments, keyword_loc); end def ===(other); end @@ -9570,12 +11920,14 @@ class Prism::NextNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, arguments: T.nilable(Prism::ArgumentsNode), - keyword_loc: Prism::Location, - location: Prism::Location + keyword_loc: Prism::Location ).returns(Prism::NextNode) end - def copy(arguments: T.unsafe(nil), keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), arguments: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -9604,8 +11956,8 @@ class Prism::NextNode < ::Prism::Node end class Prism::NilNode < ::Prism::Node - sig { params(source: Prism::Source, location: Prism::Location).void } - def initialize(source, location); end + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end def ===(other); end @@ -9621,8 +11973,8 @@ class Prism::NilNode < ::Prism::Node sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - sig { params(location: Prism::Location).returns(Prism::NilNode) } - def copy(location: T.unsafe(nil)); end + 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 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -9648,12 +12000,14 @@ class Prism::NoKeywordsParameterNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, operator_loc: Prism::Location, - keyword_loc: Prism::Location, - location: Prism::Location + keyword_loc: Prism::Location ).void end - def initialize(source, operator_loc, keyword_loc, location); end + def initialize(source, node_id, location, flags, operator_loc, keyword_loc); end def ===(other); end @@ -9671,12 +12025,14 @@ class Prism::NoKeywordsParameterNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, operator_loc: Prism::Location, - keyword_loc: Prism::Location, - location: Prism::Location + keyword_loc: Prism::Location ).returns(Prism::NoKeywordsParameterNode) end - def copy(operator_loc: T.unsafe(nil), keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), operator_loc: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -9716,6 +12072,9 @@ class Prism::Node sig { abstract.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end + sig { params(block: T.proc.params(node: Prism::Node).returns(T::Boolean)).returns(T.nilable(Prism::Node)) } + def breadth_first_search(&block); end + sig { abstract.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end @@ -9742,9 +12101,15 @@ class Prism::Node sig { returns(Prism::Location) } def location; end - def newline!(lines); end + sig { returns(T::Boolean) } def newline?; end + def newline_flag!(lines); end + def newline_flag?; end + + sig { returns(Integer) } + def node_id; end + sig { params(q: T.untyped).void } def pretty_print(q); end @@ -9763,6 +12128,9 @@ class Prism::Node sig { returns(Integer) } def start_offset; end + sig { returns(T::Boolean) } + def static_literal?; end + sig { returns(String) } def to_dot; end @@ -9772,6 +12140,11 @@ class Prism::Node sig { abstract.returns(Symbol) } def type; end + protected + + sig { returns(Integer) } + def flags; end + private sig { returns(Prism::Source) } @@ -9783,9 +12156,23 @@ class Prism::Node end end +# The flags that are common to all nodes. +module Prism::NodeFlags; end + +Prism::NodeFlags::NEWLINE = T.let(T.unsafe(nil), Integer) +Prism::NodeFlags::STATIC_LITERAL = T.let(T.unsafe(nil), Integer) + class Prism::NumberedParametersNode < ::Prism::Node - sig { params(source: Prism::Source, maximum: Integer, location: Prism::Location).void } - def initialize(source, maximum, location); end + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + maximum: Integer + ).void + end + def initialize(source, node_id, location, flags, maximum); end def ===(other); end @@ -9801,8 +12188,15 @@ class Prism::NumberedParametersNode < ::Prism::Node sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - sig { params(maximum: Integer, location: Prism::Location).returns(Prism::NumberedParametersNode) } - def copy(maximum: T.unsafe(nil), location: T.unsafe(nil)); end + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + maximum: Integer + ).returns(Prism::NumberedParametersNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), maximum: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -9828,8 +12222,16 @@ class Prism::NumberedParametersNode < ::Prism::Node end class Prism::NumberedReferenceReadNode < ::Prism::Node - sig { params(source: Prism::Source, number: Integer, location: Prism::Location).void } - def initialize(source, number, location); end + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + number: Integer + ).void + end + def initialize(source, node_id, location, flags, number); end def ===(other); end @@ -9845,8 +12247,15 @@ class Prism::NumberedReferenceReadNode < ::Prism::Node sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - sig { params(number: Integer, location: Prism::Location).returns(Prism::NumberedReferenceReadNode) } - def copy(number: T.unsafe(nil), location: T.unsafe(nil)); end + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + number: Integer + ).returns(Prism::NumberedReferenceReadNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), number: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -9875,14 +12284,15 @@ class Prism::OptionalKeywordParameterNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, name: Symbol, name_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, flags, name, name_loc, value, location); end + def initialize(source, node_id, location, flags, name, name_loc, value); end def ===(other); end @@ -9900,14 +12310,15 @@ class Prism::OptionalKeywordParameterNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, name: Symbol, name_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).returns(Prism::OptionalKeywordParameterNode) end - def copy(flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -9936,11 +12347,6 @@ class Prism::OptionalKeywordParameterNode < ::Prism::Node sig { returns(Prism::Node) } def value; end - protected - - sig { returns(Integer) } - def flags; end - class << self def type; end end @@ -9950,15 +12356,16 @@ class Prism::OptionalParameterNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, flags, name, name_loc, operator_loc, value, location); end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end def ===(other); end @@ -9976,15 +12383,16 @@ class Prism::OptionalParameterNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).returns(Prism::OptionalParameterNode) end - def copy(flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -10019,11 +12427,6 @@ class Prism::OptionalParameterNode < ::Prism::Node sig { returns(Prism::Node) } def value; end - protected - - sig { returns(Integer) } - def flags; end - class << self def type; end end @@ -10033,13 +12436,15 @@ class Prism::OrNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, left: Prism::Node, right: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).void end - def initialize(source, left, right, operator_loc, location); end + def initialize(source, node_id, location, flags, left, right, operator_loc); end def ===(other); end @@ -10057,13 +12462,15 @@ class Prism::OrNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, left: Prism::Node, right: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).returns(Prism::OrNode) end - def copy(left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -10184,17 +12591,19 @@ class Prism::ParametersNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, requireds: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode)], optionals: T::Array[Prism::OptionalParameterNode], rest: T.nilable(T.any(Prism::RestParameterNode, Prism::ImplicitRestNode)), posts: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode, Prism::KeywordRestParameterNode, Prism::NoKeywordsParameterNode, Prism::ForwardingParameterNode)], keywords: T::Array[T.any(Prism::RequiredKeywordParameterNode, Prism::OptionalKeywordParameterNode)], keyword_rest: T.nilable(T.any(Prism::KeywordRestParameterNode, Prism::ForwardingParameterNode, Prism::NoKeywordsParameterNode)), - block: T.nilable(Prism::BlockParameterNode), - location: Prism::Location + block: T.nilable(Prism::BlockParameterNode) ).void end - def initialize(source, requireds, optionals, rest, posts, keywords, keyword_rest, block, location); end + def initialize(source, node_id, location, flags, requireds, optionals, rest, posts, keywords, keyword_rest, block); end def ===(other); end @@ -10215,17 +12624,19 @@ class Prism::ParametersNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, requireds: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode)], optionals: T::Array[Prism::OptionalParameterNode], rest: T.nilable(T.any(Prism::RestParameterNode, Prism::ImplicitRestNode)), posts: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode, Prism::KeywordRestParameterNode, Prism::NoKeywordsParameterNode, Prism::ForwardingParameterNode)], keywords: T::Array[T.any(Prism::RequiredKeywordParameterNode, Prism::OptionalKeywordParameterNode)], keyword_rest: T.nilable(T.any(Prism::KeywordRestParameterNode, Prism::ForwardingParameterNode, Prism::NoKeywordsParameterNode)), - block: T.nilable(Prism::BlockParameterNode), - location: Prism::Location + block: T.nilable(Prism::BlockParameterNode) ).returns(Prism::ParametersNode) end - def copy(requireds: T.unsafe(nil), optionals: T.unsafe(nil), rest: T.unsafe(nil), posts: T.unsafe(nil), keywords: T.unsafe(nil), keyword_rest: T.unsafe(nil), block: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), requireds: T.unsafe(nil), optionals: T.unsafe(nil), rest: T.unsafe(nil), posts: T.unsafe(nil), keywords: T.unsafe(nil), keyword_rest: T.unsafe(nil), block: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -10276,13 +12687,15 @@ class Prism::ParenthesesNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, body: T.nilable(Prism::Node), opening_loc: Prism::Location, - closing_loc: Prism::Location, - location: Prism::Location + closing_loc: Prism::Location ).void end - def initialize(source, body, opening_loc, closing_loc, location); end + def initialize(source, node_id, location, flags, body, opening_loc, closing_loc); end def ===(other); end @@ -10309,13 +12722,15 @@ class Prism::ParenthesesNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, body: T.nilable(Prism::Node), opening_loc: Prism::Location, - closing_loc: Prism::Location, - location: Prism::Location + closing_loc: Prism::Location ).returns(Prism::ParenthesesNode) end - def copy(body: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), body: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -10329,7 +12744,7 @@ class Prism::ParenthesesNode < ::Prism::Node sig { override.returns(String) } def inspect; end - def newline!(lines); end + def newline_flag!(lines); end sig { returns(String) } def opening; end @@ -10408,6 +12823,7 @@ class Prism::ParseResult < ::Prism::Result sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + def errors_format; end def mark_newlines!; end sig { returns(Prism::ProgramNode) } @@ -10447,6 +12863,13 @@ class Prism::ParseResult::Comments::NodeTarget def trailing_comment(comment); end end +class Prism::ParseResult::Errors + def initialize(parse_result); end + + def format; end + def parse_result; end +end + class Prism::ParseResult::Newlines < ::Prism::Visitor def initialize(lines); end @@ -10513,14 +12936,16 @@ class Prism::PinnedExpressionNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, expression: Prism::Node, operator_loc: Prism::Location, lparen_loc: Prism::Location, - rparen_loc: Prism::Location, - location: Prism::Location + rparen_loc: Prism::Location ).void end - def initialize(source, expression, operator_loc, lparen_loc, rparen_loc, location); end + def initialize(source, node_id, location, flags, expression, operator_loc, lparen_loc, rparen_loc); end def ===(other); end @@ -10538,14 +12963,16 @@ class Prism::PinnedExpressionNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, expression: Prism::Node, operator_loc: Prism::Location, lparen_loc: Prism::Location, - rparen_loc: Prism::Location, - location: Prism::Location + rparen_loc: Prism::Location ).returns(Prism::PinnedExpressionNode) end - def copy(expression: T.unsafe(nil), operator_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), expression: T.unsafe(nil), operator_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -10592,12 +13019,14 @@ class Prism::PinnedVariableNode < ::Prism::Node sig do params( source: Prism::Source, - variable: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + node_id: Integer, + location: Prism::Location, + flags: Integer, + variable: T.any(Prism::LocalVariableReadNode, Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::ItLocalVariableReadNode, Prism::MissingNode), + operator_loc: Prism::Location ).void end - def initialize(source, variable, operator_loc, location); end + def initialize(source, node_id, location, flags, variable, operator_loc); end def ===(other); end @@ -10615,12 +13044,14 @@ class Prism::PinnedVariableNode < ::Prism::Node sig do params( - variable: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + node_id: Integer, + location: Prism::Location, + flags: Integer, + variable: T.any(Prism::LocalVariableReadNode, Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::ItLocalVariableReadNode, Prism::MissingNode), + operator_loc: Prism::Location ).returns(Prism::PinnedVariableNode) end - def copy(variable: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), variable: T.unsafe(nil), operator_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -10643,7 +13074,9 @@ class Prism::PinnedVariableNode < ::Prism::Node sig { override.returns(Symbol) } def type; end - sig { returns(Prism::Node) } + sig do + returns(T.any(Prism::LocalVariableReadNode, Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::ItLocalVariableReadNode, Prism::MissingNode)) + end def variable; end class << self @@ -10655,14 +13088,16 @@ class Prism::PostExecutionNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, statements: T.nilable(Prism::StatementsNode), keyword_loc: Prism::Location, opening_loc: Prism::Location, - closing_loc: Prism::Location, - location: Prism::Location + closing_loc: Prism::Location ).void end - def initialize(source, statements, keyword_loc, opening_loc, closing_loc, location); end + def initialize(source, node_id, location, flags, statements, keyword_loc, opening_loc, closing_loc); end def ===(other); end @@ -10686,14 +13121,16 @@ class Prism::PostExecutionNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, statements: T.nilable(Prism::StatementsNode), keyword_loc: Prism::Location, opening_loc: Prism::Location, - closing_loc: Prism::Location, - location: Prism::Location + closing_loc: Prism::Location ).returns(Prism::PostExecutionNode) end - def copy(statements: T.unsafe(nil), keyword_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), statements: T.unsafe(nil), keyword_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -10734,14 +13171,16 @@ class Prism::PreExecutionNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, statements: T.nilable(Prism::StatementsNode), keyword_loc: Prism::Location, opening_loc: Prism::Location, - closing_loc: Prism::Location, - location: Prism::Location + closing_loc: Prism::Location ).void end - def initialize(source, statements, keyword_loc, opening_loc, closing_loc, location); end + def initialize(source, node_id, location, flags, statements, keyword_loc, opening_loc, closing_loc); end def ===(other); end @@ -10765,14 +13204,16 @@ class Prism::PreExecutionNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, statements: T.nilable(Prism::StatementsNode), keyword_loc: Prism::Location, opening_loc: Prism::Location, - closing_loc: Prism::Location, - location: Prism::Location + closing_loc: Prism::Location ).returns(Prism::PreExecutionNode) end - def copy(statements: T.unsafe(nil), keyword_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), statements: T.unsafe(nil), keyword_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -10813,12 +13254,14 @@ class Prism::ProgramNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, locals: T::Array[Symbol], - statements: Prism::StatementsNode, - location: Prism::Location + statements: Prism::StatementsNode ).void end - def initialize(source, locals, statements, location); end + def initialize(source, node_id, location, flags, locals, statements); end def ===(other); end @@ -10836,12 +13279,14 @@ class Prism::ProgramNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, locals: T::Array[Symbol], - statements: Prism::StatementsNode, - location: Prism::Location + statements: Prism::StatementsNode ).returns(Prism::ProgramNode) end - def copy(locals: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), statements: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -10878,14 +13323,15 @@ class Prism::RangeNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, left: T.nilable(Prism::Node), right: T.nilable(Prism::Node), - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).void end - def initialize(source, flags, left, right, operator_loc, location); end + def initialize(source, node_id, location, flags, left, right, operator_loc); end def ===(other); end @@ -10903,14 +13349,15 @@ class Prism::RangeNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, left: T.nilable(Prism::Node), right: T.nilable(Prism::Node), - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).returns(Prism::RangeNode) end - def copy(flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -10942,11 +13389,6 @@ class Prism::RangeNode < ::Prism::Node sig { override.returns(Symbol) } def type; end - protected - - sig { returns(Integer) } - def flags; end - class << self def type; end end @@ -10956,13 +13398,14 @@ class Prism::RationalNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, numerator: Integer, - denominator: Integer, - location: Prism::Location + denominator: Integer ).void end - def initialize(source, flags, numerator, denominator, location); end + def initialize(source, node_id, location, flags, numerator, denominator); end def ===(other); end @@ -10983,13 +13426,14 @@ class Prism::RationalNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, numerator: Integer, - denominator: Integer, - location: Prism::Location + denominator: Integer ).returns(Prism::RationalNode) end - def copy(flags: T.unsafe(nil), numerator: T.unsafe(nil), denominator: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), numerator: T.unsafe(nil), denominator: T.unsafe(nil)); end sig { returns(T::Boolean) } def decimal?; end @@ -11026,19 +13470,14 @@ class Prism::RationalNode < ::Prism::Node sig { returns(Rational) } def value; end - protected - - sig { returns(Integer) } - def flags; end - class << self def type; end end end class Prism::RedoNode < ::Prism::Node - sig { params(source: Prism::Source, location: Prism::Location).void } - def initialize(source, location); end + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end def ===(other); end @@ -11054,8 +13493,8 @@ class Prism::RedoNode < ::Prism::Node sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - sig { params(location: Prism::Location).returns(Prism::RedoNode) } - def copy(location: T.unsafe(nil)); end + 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 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -11134,15 +13573,16 @@ class Prism::RegularExpressionNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, opening_loc: Prism::Location, content_loc: Prism::Location, closing_loc: Prism::Location, - unescaped: String, - location: Prism::Location + unescaped: String ).void end - def initialize(source, flags, opening_loc, content_loc, closing_loc, unescaped, location); end + def initialize(source, node_id, location, flags, opening_loc, content_loc, closing_loc, unescaped); end def ===(other); end @@ -11175,15 +13615,16 @@ class Prism::RegularExpressionNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, opening_loc: Prism::Location, content_loc: Prism::Location, closing_loc: Prism::Location, - unescaped: String, - location: Prism::Location + unescaped: String ).returns(Prism::RegularExpressionNode) end - def copy(flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -11242,11 +13683,6 @@ class Prism::RegularExpressionNode < ::Prism::Node sig { returns(T::Boolean) } def windows_31j?; end - protected - - sig { returns(Integer) } - def flags; end - class << self def type; end end @@ -11260,13 +13696,14 @@ class Prism::RequiredKeywordParameterNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, name: Symbol, - name_loc: Prism::Location, - location: Prism::Location + name_loc: Prism::Location ).void end - def initialize(source, flags, name, name_loc, location); end + def initialize(source, node_id, location, flags, name, name_loc); end def ===(other); end @@ -11284,13 +13721,14 @@ class Prism::RequiredKeywordParameterNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, name: Symbol, - name_loc: Prism::Location, - location: Prism::Location + name_loc: Prism::Location ).returns(Prism::RequiredKeywordParameterNode) end - def copy(flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -11316,19 +13754,14 @@ class Prism::RequiredKeywordParameterNode < ::Prism::Node sig { override.returns(Symbol) } def type; end - protected - - sig { returns(Integer) } - def flags; end - class << self def type; end end end class Prism::RequiredParameterNode < ::Prism::Node - sig { params(source: Prism::Source, flags: Integer, name: Symbol, location: Prism::Location).void } - def initialize(source, flags, name, location); end + 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 def ===(other); end @@ -11344,8 +13777,15 @@ class Prism::RequiredParameterNode < ::Prism::Node sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - sig { params(flags: Integer, name: Symbol, location: Prism::Location).returns(Prism::RequiredParameterNode) } - def copy(flags: T.unsafe(nil), name: T.unsafe(nil), location: T.unsafe(nil)); end + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::RequiredParameterNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -11368,11 +13808,6 @@ class Prism::RequiredParameterNode < ::Prism::Node sig { override.returns(Symbol) } def type; end - protected - - sig { returns(Integer) } - def flags; end - class << self def type; end end @@ -11382,13 +13817,15 @@ class Prism::RescueModifierNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, expression: Prism::Node, keyword_loc: Prism::Location, - rescue_expression: Prism::Node, - location: Prism::Location + rescue_expression: Prism::Node ).void end - def initialize(source, expression, keyword_loc, rescue_expression, location); end + def initialize(source, node_id, location, flags, expression, keyword_loc, rescue_expression); end def ===(other); end @@ -11406,13 +13843,15 @@ class Prism::RescueModifierNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, expression: Prism::Node, keyword_loc: Prism::Location, - rescue_expression: Prism::Node, - location: Prism::Location + rescue_expression: Prism::Node ).returns(Prism::RescueModifierNode) end - def copy(expression: T.unsafe(nil), keyword_loc: T.unsafe(nil), rescue_expression: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), expression: T.unsafe(nil), keyword_loc: T.unsafe(nil), rescue_expression: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -11435,7 +13874,7 @@ class Prism::RescueModifierNode < ::Prism::Node sig { returns(Prism::Location) } def keyword_loc; end - def newline!(lines); end + def newline_flag!(lines); end sig { returns(Prism::Node) } def rescue_expression; end @@ -11452,16 +13891,18 @@ class Prism::RescueNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, keyword_loc: Prism::Location, exceptions: T::Array[Prism::Node], operator_loc: T.nilable(Prism::Location), - reference: T.nilable(Prism::Node), + reference: T.nilable(T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode)), statements: T.nilable(Prism::StatementsNode), - consequent: T.nilable(Prism::RescueNode), - location: Prism::Location + subsequent: T.nilable(Prism::RescueNode) ).void end - def initialize(source, keyword_loc, exceptions, operator_loc, reference, statements, consequent, location); end + def initialize(source, node_id, location, flags, keyword_loc, exceptions, operator_loc, reference, statements, subsequent); end def ===(other); end @@ -11477,21 +13918,22 @@ class Prism::RescueNode < ::Prism::Node sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - sig { returns(T.nilable(Prism::RescueNode)) } def consequent; end sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, keyword_loc: Prism::Location, exceptions: T::Array[Prism::Node], operator_loc: T.nilable(Prism::Location), - reference: T.nilable(Prism::Node), + reference: T.nilable(T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode)), statements: T.nilable(Prism::StatementsNode), - consequent: T.nilable(Prism::RescueNode), - location: Prism::Location + subsequent: T.nilable(Prism::RescueNode) ).returns(Prism::RescueNode) end - def copy(keyword_loc: T.unsafe(nil), exceptions: T.unsafe(nil), operator_loc: T.unsafe(nil), reference: T.unsafe(nil), statements: T.unsafe(nil), consequent: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), exceptions: T.unsafe(nil), operator_loc: T.unsafe(nil), reference: T.unsafe(nil), statements: T.unsafe(nil), subsequent: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -11520,12 +13962,17 @@ class Prism::RescueNode < ::Prism::Node sig { returns(T.nilable(Prism::Location)) } def operator_loc; end - sig { returns(T.nilable(Prism::Node)) } + sig do + returns(T.nilable(T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode))) + end def reference; end sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end + sig { returns(T.nilable(Prism::RescueNode)) } + def subsequent; end + sig { override.returns(Symbol) } def type; end @@ -11538,14 +13985,15 @@ class Prism::RestParameterNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, name: T.nilable(Symbol), name_loc: T.nilable(Prism::Location), - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).void end - def initialize(source, flags, name, name_loc, operator_loc, location); end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc); end def ===(other); end @@ -11563,14 +14011,15 @@ class Prism::RestParameterNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, name: T.nilable(Symbol), name_loc: T.nilable(Prism::Location), - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).returns(Prism::RestParameterNode) end - def copy(flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -11602,11 +14051,6 @@ class Prism::RestParameterNode < ::Prism::Node sig { override.returns(Symbol) } def type; end - protected - - sig { returns(Integer) } - def flags; end - class << self def type; end end @@ -11625,6 +14069,13 @@ class Prism::Result end def initialize(comments, magic_comments, data_loc, errors, warnings, source); end + sig do + params( + encoding: Encoding + ).returns(T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer))) + end + def code_units_cache(encoding); end + sig { returns(T::Array[Prism::Comment]) } def comments; end @@ -11657,8 +14108,8 @@ class Prism::Result end class Prism::RetryNode < ::Prism::Node - sig { params(source: Prism::Source, location: Prism::Location).void } - def initialize(source, location); end + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end def ===(other); end @@ -11674,8 +14125,8 @@ class Prism::RetryNode < ::Prism::Node sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - sig { params(location: Prism::Location).returns(Prism::RetryNode) } - def copy(location: T.unsafe(nil)); end + 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 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -11701,13 +14152,14 @@ class Prism::ReturnNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, keyword_loc: Prism::Location, - arguments: T.nilable(Prism::ArgumentsNode), - location: Prism::Location + arguments: T.nilable(Prism::ArgumentsNode) ).void end - def initialize(source, flags, keyword_loc, arguments, location); end + def initialize(source, node_id, location, flags, keyword_loc, arguments); end def ===(other); end @@ -11728,13 +14180,14 @@ class Prism::ReturnNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, keyword_loc: Prism::Location, - arguments: T.nilable(Prism::ArgumentsNode), - location: Prism::Location + arguments: T.nilable(Prism::ArgumentsNode) ).returns(Prism::ReturnNode) end - def copy(flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), arguments: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), arguments: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -11754,30 +14207,17 @@ class Prism::ReturnNode < ::Prism::Node sig { returns(Prism::Location) } def keyword_loc; end - sig { returns(T::Boolean) } - def redundant?; end - sig { override.returns(Symbol) } def type; end - protected - - sig { returns(Integer) } - def flags; end - class << self def type; end end end -# Flags for return nodes. -module Prism::ReturnNodeFlags; end - -Prism::ReturnNodeFlags::REDUNDANT = T.let(T.unsafe(nil), Integer) - class Prism::SelfNode < ::Prism::Node - sig { params(source: Prism::Source, location: Prism::Location).void } - def initialize(source, location); end + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end def ===(other); end @@ -11793,8 +14233,8 @@ class Prism::SelfNode < ::Prism::Node sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - sig { params(location: Prism::Location).returns(Prism::SelfNode) } - def copy(location: T.unsafe(nil)); end + 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 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -11878,12 +14318,13 @@ class Prism::ShareableConstantNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, - write: T.any(Prism::ConstantWriteNode, Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode, Prism::ConstantOperatorWriteNode, Prism::ConstantPathWriteNode, Prism::ConstantPathAndWriteNode, Prism::ConstantPathOrWriteNode, Prism::ConstantPathOperatorWriteNode), - location: Prism::Location + write: T.any(Prism::ConstantWriteNode, Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode, Prism::ConstantOperatorWriteNode, Prism::ConstantPathWriteNode, Prism::ConstantPathAndWriteNode, Prism::ConstantPathOrWriteNode, Prism::ConstantPathOperatorWriteNode) ).void end - def initialize(source, flags, write, location); end + def initialize(source, node_id, location, flags, write); end def ===(other); end @@ -11901,12 +14342,13 @@ class Prism::ShareableConstantNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, - write: T.any(Prism::ConstantWriteNode, Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode, Prism::ConstantOperatorWriteNode, Prism::ConstantPathWriteNode, Prism::ConstantPathAndWriteNode, Prism::ConstantPathOrWriteNode, Prism::ConstantPathOperatorWriteNode), - location: Prism::Location + write: T.any(Prism::ConstantWriteNode, Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode, Prism::ConstantOperatorWriteNode, Prism::ConstantPathWriteNode, Prism::ConstantPathAndWriteNode, Prism::ConstantPathOrWriteNode, Prism::ConstantPathOperatorWriteNode) ).returns(Prism::ShareableConstantNode) end - def copy(flags: T.unsafe(nil), write: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), write: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -11937,11 +14379,6 @@ class Prism::ShareableConstantNode < ::Prism::Node end def write; end - protected - - sig { returns(Integer) } - def flags; end - class << self def type; end end @@ -11958,23 +14395,25 @@ class Prism::SingletonClassNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, locals: T::Array[Symbol], class_keyword_loc: Prism::Location, operator_loc: Prism::Location, expression: Prism::Node, - body: T.nilable(Prism::Node), - end_keyword_loc: Prism::Location, - location: Prism::Location + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location ).void end - def initialize(source, locals, class_keyword_loc, operator_loc, expression, body, end_keyword_loc, location); end + def initialize(source, node_id, location, flags, locals, class_keyword_loc, operator_loc, expression, body, end_keyword_loc); end def ===(other); end sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - sig { returns(T.nilable(Prism::Node)) } + sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } def body; end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } @@ -11994,16 +14433,18 @@ class Prism::SingletonClassNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, locals: T::Array[Symbol], class_keyword_loc: Prism::Location, operator_loc: Prism::Location, expression: Prism::Node, - body: T.nilable(Prism::Node), - end_keyword_loc: Prism::Location, - location: Prism::Location + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location ).returns(Prism::SingletonClassNode) end - def copy(locals: T.unsafe(nil), class_keyword_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), expression: T.unsafe(nil), body: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), class_keyword_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), expression: T.unsafe(nil), body: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -12053,6 +14494,13 @@ class Prism::Source sig { params(byte_offset: Integer).returns(Integer) } def character_offset(byte_offset); end + sig do + params( + encoding: Encoding + ).returns(T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer))) + end + def code_units_cache(encoding); end + sig { params(byte_offset: Integer, encoding: Encoding).returns(Integer) } def code_units_column(byte_offset, encoding); end @@ -12098,8 +14546,8 @@ class Prism::Source end class Prism::SourceEncodingNode < ::Prism::Node - sig { params(source: Prism::Source, location: Prism::Location).void } - def initialize(source, location); end + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end def ===(other); end @@ -12115,8 +14563,8 @@ class Prism::SourceEncodingNode < ::Prism::Node sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - sig { params(location: Prism::Location).returns(Prism::SourceEncodingNode) } - def copy(location: T.unsafe(nil)); end + 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 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -12139,8 +14587,16 @@ class Prism::SourceEncodingNode < ::Prism::Node end class Prism::SourceFileNode < ::Prism::Node - sig { params(source: Prism::Source, flags: Integer, filepath: String, location: Prism::Location).void } - def initialize(source, flags, filepath, location); end + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + filepath: String + ).void + end + def initialize(source, node_id, location, flags, filepath); end def ===(other); end @@ -12156,8 +14612,15 @@ class Prism::SourceFileNode < ::Prism::Node sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - sig { params(flags: Integer, filepath: String, location: Prism::Location).returns(Prism::SourceFileNode) } - def copy(flags: T.unsafe(nil), filepath: T.unsafe(nil), location: T.unsafe(nil)); end + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + filepath: String + ).returns(Prism::SourceFileNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), filepath: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -12189,19 +14652,14 @@ class Prism::SourceFileNode < ::Prism::Node sig { override.returns(Symbol) } def type; end - protected - - sig { returns(Integer) } - def flags; end - class << self def type; end end end class Prism::SourceLineNode < ::Prism::Node - sig { params(source: Prism::Source, location: Prism::Location).void } - def initialize(source, location); end + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end def ===(other); end @@ -12217,8 +14675,8 @@ class Prism::SourceLineNode < ::Prism::Node sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - sig { params(location: Prism::Location).returns(Prism::SourceLineNode) } - def copy(location: T.unsafe(nil)); end + 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 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -12244,12 +14702,14 @@ class Prism::SplatNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, operator_loc: Prism::Location, - expression: T.nilable(Prism::Node), - location: Prism::Location + expression: T.nilable(Prism::Node) ).void end - def initialize(source, operator_loc, expression, location); end + def initialize(source, node_id, location, flags, operator_loc, expression); end def ===(other); end @@ -12267,12 +14727,14 @@ class Prism::SplatNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, operator_loc: Prism::Location, - expression: T.nilable(Prism::Node), - location: Prism::Location + expression: T.nilable(Prism::Node) ).returns(Prism::SplatNode) end - def copy(operator_loc: T.unsafe(nil), expression: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), operator_loc: T.unsafe(nil), expression: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -12304,8 +14766,16 @@ class Prism::SplatNode < ::Prism::Node end class Prism::StatementsNode < ::Prism::Node - sig { params(source: Prism::Source, body: T::Array[Prism::Node], location: Prism::Location).void } - def initialize(source, body, location); end + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + body: T::Array[Prism::Node] + ).void + end + def initialize(source, node_id, location, flags, body); end def ===(other); end @@ -12324,8 +14794,15 @@ class Prism::StatementsNode < ::Prism::Node sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - sig { params(body: T::Array[Prism::Node], location: Prism::Location).returns(Prism::StatementsNode) } - def copy(body: T.unsafe(nil), location: T.unsafe(nil)); end + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + body: T::Array[Prism::Node] + ).returns(Prism::StatementsNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), body: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -12361,15 +14838,16 @@ class Prism::StringNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, opening_loc: T.nilable(Prism::Location), content_loc: Prism::Location, closing_loc: T.nilable(Prism::Location), - unescaped: String, - location: Prism::Location + unescaped: String ).void end - def initialize(source, flags, opening_loc, content_loc, closing_loc, unescaped, location); end + def initialize(source, node_id, location, flags, opening_loc, content_loc, closing_loc, unescaped); end def ===(other); end @@ -12399,15 +14877,16 @@ class Prism::StringNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, opening_loc: T.nilable(Prism::Location), content_loc: Prism::Location, closing_loc: T.nilable(Prism::Location), - unescaped: String, - location: Prism::Location + unescaped: String ).returns(Prism::StringNode) end - def copy(flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -12451,11 +14930,6 @@ class Prism::StringNode < ::Prism::Node sig { returns(String) } def unescaped; end - protected - - sig { returns(Integer) } - def flags; end - class << self def type; end end @@ -12465,15 +14939,17 @@ class Prism::SuperNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, keyword_loc: Prism::Location, lparen_loc: T.nilable(Prism::Location), arguments: T.nilable(Prism::ArgumentsNode), rparen_loc: T.nilable(Prism::Location), - block: T.nilable(Prism::Node), - location: Prism::Location + block: T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode)) ).void end - def initialize(source, keyword_loc, lparen_loc, arguments, rparen_loc, block, location); end + def initialize(source, node_id, location, flags, keyword_loc, lparen_loc, arguments, rparen_loc, block); end def ===(other); end @@ -12483,7 +14959,7 @@ class Prism::SuperNode < ::Prism::Node sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end - sig { returns(T.nilable(Prism::Node)) } + sig { returns(T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode))) } def block; end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } @@ -12497,15 +14973,17 @@ class Prism::SuperNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, keyword_loc: Prism::Location, lparen_loc: T.nilable(Prism::Location), arguments: T.nilable(Prism::ArgumentsNode), rparen_loc: T.nilable(Prism::Location), - block: T.nilable(Prism::Node), - location: Prism::Location + block: T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode)) ).returns(Prism::SuperNode) end - def copy(keyword_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), arguments: T.unsafe(nil), rparen_loc: T.unsafe(nil), block: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), arguments: T.unsafe(nil), rparen_loc: T.unsafe(nil), block: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -12556,15 +15034,16 @@ class Prism::SymbolNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, opening_loc: T.nilable(Prism::Location), value_loc: T.nilable(Prism::Location), closing_loc: T.nilable(Prism::Location), - unescaped: String, - location: Prism::Location + unescaped: String ).void end - def initialize(source, flags, opening_loc, value_loc, closing_loc, unescaped, location); end + def initialize(source, node_id, location, flags, opening_loc, value_loc, closing_loc, unescaped); end def ===(other); end @@ -12588,15 +15067,16 @@ class Prism::SymbolNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, opening_loc: T.nilable(Prism::Location), value_loc: T.nilable(Prism::Location), closing_loc: T.nilable(Prism::Location), - unescaped: String, - location: Prism::Location + unescaped: String ).returns(Prism::SymbolNode) end - def copy(flags: T.unsafe(nil), opening_loc: T.unsafe(nil), value_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), value_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -12637,11 +15117,6 @@ class Prism::SymbolNode < ::Prism::Node sig { returns(T.nilable(Prism::Location)) } def value_loc; end - protected - - sig { returns(Integer) } - def flags; end - class << self def type; end end @@ -12657,6 +15132,8 @@ class Prism::Token sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + def inspect; end + sig { returns(Prism::Location) } def location; end @@ -12916,6 +15393,8 @@ end Prism::Translation::Parser::Lexer::EXPR_BEG = T.let(T.unsafe(nil), Integer) Prism::Translation::Parser::Lexer::EXPR_LABEL = T.let(T.unsafe(nil), Integer) +Prism::Translation::Parser::Lexer::LAMBDA_TOKEN_TYPES = T.let(T.unsafe(nil), Array) +Prism::Translation::Parser::Lexer::LPAREN_CONVERSION_TOKEN_TYPES = T.let(T.unsafe(nil), Array) Prism::Translation::Parser::Lexer::Range = Parser::Source::Range Prism::Translation::Parser::Lexer::TYPES = T.let(T.unsafe(nil), Hash) @@ -13759,8 +16238,8 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler end class Prism::TrueNode < ::Prism::Node - sig { params(source: Prism::Source, location: Prism::Location).void } - def initialize(source, location); end + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end def ===(other); end @@ -13776,8 +16255,8 @@ class Prism::TrueNode < ::Prism::Node sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - sig { params(location: Prism::Location).returns(Prism::TrueNode) } - def copy(location: T.unsafe(nil)); end + 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 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -13803,12 +16282,14 @@ class Prism::UndefNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, names: T::Array[T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)], - keyword_loc: Prism::Location, - location: Prism::Location + keyword_loc: Prism::Location ).void end - def initialize(source, names, keyword_loc, location); end + def initialize(source, node_id, location, flags, names, keyword_loc); end def ===(other); end @@ -13826,12 +16307,14 @@ class Prism::UndefNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, names: T::Array[T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)], - keyword_loc: Prism::Location, - location: Prism::Location + keyword_loc: Prism::Location ).returns(Prism::UndefNode) end - def copy(names: T.unsafe(nil), keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), names: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -13866,16 +16349,18 @@ class Prism::UnlessNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, keyword_loc: Prism::Location, predicate: Prism::Node, then_keyword_loc: T.nilable(Prism::Location), statements: T.nilable(Prism::StatementsNode), - consequent: T.nilable(Prism::ElseNode), - end_keyword_loc: T.nilable(Prism::Location), - location: Prism::Location + else_clause: T.nilable(Prism::ElseNode), + end_keyword_loc: T.nilable(Prism::Location) ).void end - def initialize(source, keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, location); end + def initialize(source, node_id, location, flags, keyword_loc, predicate, then_keyword_loc, statements, else_clause, end_keyword_loc); end def ===(other); end @@ -13891,21 +16376,22 @@ class Prism::UnlessNode < ::Prism::Node sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - sig { returns(T.nilable(Prism::ElseNode)) } def consequent; end sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, keyword_loc: Prism::Location, predicate: Prism::Node, then_keyword_loc: T.nilable(Prism::Location), statements: T.nilable(Prism::StatementsNode), - consequent: T.nilable(Prism::ElseNode), - end_keyword_loc: T.nilable(Prism::Location), - location: Prism::Location + else_clause: T.nilable(Prism::ElseNode), + end_keyword_loc: T.nilable(Prism::Location) ).returns(Prism::UnlessNode) end - def copy(keyword_loc: T.unsafe(nil), predicate: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), consequent: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), predicate: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), else_clause: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -13913,6 +16399,9 @@ class Prism::UnlessNode < ::Prism::Node sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + sig { returns(T.nilable(Prism::ElseNode)) } + def else_clause; end + sig { returns(T.nilable(String)) } def end_keyword; end @@ -13931,7 +16420,7 @@ class Prism::UnlessNode < ::Prism::Node sig { returns(Prism::Location) } def keyword_loc; end - def newline!(lines); end + def newline_flag!(lines); end sig { returns(Prism::Node) } def predicate; end @@ -13957,15 +16446,16 @@ class Prism::UntilNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, keyword_loc: Prism::Location, closing_loc: T.nilable(Prism::Location), predicate: Prism::Node, - statements: T.nilable(Prism::StatementsNode), - location: Prism::Location + statements: T.nilable(Prism::StatementsNode) ).void end - def initialize(source, flags, keyword_loc, closing_loc, predicate, statements, location); end + def initialize(source, node_id, location, flags, keyword_loc, closing_loc, predicate, statements); end def ===(other); end @@ -13992,15 +16482,16 @@ class Prism::UntilNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, keyword_loc: Prism::Location, closing_loc: T.nilable(Prism::Location), predicate: Prism::Node, - statements: T.nilable(Prism::StatementsNode), - location: Prism::Location + statements: T.nilable(Prism::StatementsNode) ).returns(Prism::UntilNode) end - def copy(flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), predicate: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), predicate: T.unsafe(nil), statements: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -14020,7 +16511,7 @@ class Prism::UntilNode < ::Prism::Node sig { returns(Prism::Location) } def keyword_loc; end - def newline!(lines); end + def newline_flag!(lines); end sig { returns(Prism::Node) } def predicate; end @@ -14031,11 +16522,6 @@ class Prism::UntilNode < ::Prism::Node sig { override.returns(Symbol) } def type; end - protected - - sig { returns(Integer) } - def flags; end - class << self def type; end end @@ -14502,14 +16988,16 @@ class Prism::WhenNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, keyword_loc: Prism::Location, conditions: T::Array[Prism::Node], then_keyword_loc: T.nilable(Prism::Location), - statements: T.nilable(Prism::StatementsNode), - location: Prism::Location + statements: T.nilable(Prism::StatementsNode) ).void end - def initialize(source, keyword_loc, conditions, then_keyword_loc, statements, location); end + def initialize(source, node_id, location, flags, keyword_loc, conditions, then_keyword_loc, statements); end def ===(other); end @@ -14530,14 +17018,16 @@ class Prism::WhenNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, keyword_loc: Prism::Location, conditions: T::Array[Prism::Node], then_keyword_loc: T.nilable(Prism::Location), - statements: T.nilable(Prism::StatementsNode), - location: Prism::Location + statements: T.nilable(Prism::StatementsNode) ).returns(Prism::WhenNode) end - def copy(keyword_loc: T.unsafe(nil), conditions: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), conditions: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -14578,15 +17068,16 @@ class Prism::WhileNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, keyword_loc: Prism::Location, closing_loc: T.nilable(Prism::Location), predicate: Prism::Node, - statements: T.nilable(Prism::StatementsNode), - location: Prism::Location + statements: T.nilable(Prism::StatementsNode) ).void end - def initialize(source, flags, keyword_loc, closing_loc, predicate, statements, location); end + def initialize(source, node_id, location, flags, keyword_loc, closing_loc, predicate, statements); end def ===(other); end @@ -14613,15 +17104,16 @@ class Prism::WhileNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, keyword_loc: Prism::Location, closing_loc: T.nilable(Prism::Location), predicate: Prism::Node, - statements: T.nilable(Prism::StatementsNode), - location: Prism::Location + statements: T.nilable(Prism::StatementsNode) ).returns(Prism::WhileNode) end - def copy(flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), predicate: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), predicate: T.unsafe(nil), statements: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -14641,7 +17133,7 @@ class Prism::WhileNode < ::Prism::Node sig { returns(Prism::Location) } def keyword_loc; end - def newline!(lines); end + def newline_flag!(lines); end sig { returns(Prism::Node) } def predicate; end @@ -14652,11 +17144,6 @@ class Prism::WhileNode < ::Prism::Node sig { override.returns(Symbol) } def type; end - protected - - sig { returns(Integer) } - def flags; end - class << self def type; end end @@ -14668,15 +17155,16 @@ class Prism::XStringNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, opening_loc: Prism::Location, content_loc: Prism::Location, closing_loc: Prism::Location, - unescaped: String, - location: Prism::Location + unescaped: String ).void end - def initialize(source, flags, opening_loc, content_loc, closing_loc, unescaped, location); end + def initialize(source, node_id, location, flags, opening_loc, content_loc, closing_loc, unescaped); end def ===(other); end @@ -14706,15 +17194,16 @@ class Prism::XStringNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, opening_loc: Prism::Location, content_loc: Prism::Location, closing_loc: Prism::Location, - unescaped: String, - location: Prism::Location + unescaped: String ).returns(Prism::XStringNode) end - def copy(flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -14752,11 +17241,6 @@ class Prism::XStringNode < ::Prism::Node sig { returns(String) } def unescaped; end - protected - - sig { returns(Integer) } - def flags; end - class << self def type; end end @@ -14766,14 +17250,16 @@ class Prism::YieldNode < ::Prism::Node sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, keyword_loc: Prism::Location, lparen_loc: T.nilable(Prism::Location), arguments: T.nilable(Prism::ArgumentsNode), - rparen_loc: T.nilable(Prism::Location), - location: Prism::Location + rparen_loc: T.nilable(Prism::Location) ).void end - def initialize(source, keyword_loc, lparen_loc, arguments, rparen_loc, location); end + def initialize(source, node_id, location, flags, keyword_loc, lparen_loc, arguments, rparen_loc); end def ===(other); end @@ -14794,14 +17280,16 @@ class Prism::YieldNode < ::Prism::Node sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, keyword_loc: Prism::Location, lparen_loc: T.nilable(Prism::Location), arguments: T.nilable(Prism::ArgumentsNode), - rparen_loc: T.nilable(Prism::Location), - location: Prism::Location + rparen_loc: T.nilable(Prism::Location) ).returns(Prism::YieldNode) end - def copy(keyword_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), arguments: T.unsafe(nil), rparen_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), arguments: T.unsafe(nil), rparen_loc: T.unsafe(nil)); end sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end diff --git a/sorbet/rbi/gems/rbi@0.1.14.rbi b/sorbet/rbi/gems/rbi@0.2.1.rbi similarity index 72% rename from sorbet/rbi/gems/rbi@0.1.14.rbi rename to sorbet/rbi/gems/rbi@0.2.1.rbi index a488f5ef2..38f792fc6 100644 --- a/sorbet/rbi/gems/rbi@0.1.14.rbi +++ b/sorbet/rbi/gems/rbi@0.2.1.rbi @@ -81,7 +81,7 @@ class RBI::Attr < ::RBI::NodeWithComments params( name: ::String, sig: T.nilable(::RBI::Sig), - attribute_type: T.nilable(::String), + attribute_type: T.nilable(T.any(::RBI::Type, ::String)), visibility: ::RBI::Visibility, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment] @@ -89,7 +89,7 @@ class RBI::Attr < ::RBI::NodeWithComments end def create_setter_method(name, sig, attribute_type, visibility, loc, comments); end - sig(:final) { returns([T.nilable(::RBI::Sig), T.nilable(::String)]) } + sig(:final) { returns([T.nilable(::RBI::Sig), T.nilable(T.any(::RBI::Type, ::String))]) } def parse_sig; end end @@ -343,6 +343,12 @@ class RBI::File end def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end + sig { params(out: T.any(::IO, ::StringIO), indent: ::Integer, print_locs: T::Boolean).void } + def rbs_print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end + + sig { params(indent: ::Integer, print_locs: T::Boolean).returns(::String) } + def rbs_string(indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end + sig { returns(::RBI::Tree) } def root; end @@ -364,11 +370,11 @@ class RBI::Formatter group_nodes: T::Boolean, max_line_length: T.nilable(::Integer), nest_singleton_methods: T::Boolean, - nest_non_public_methods: T::Boolean, + nest_non_public_members: T::Boolean, sort_nodes: T::Boolean ).void end - def initialize(add_sig_templates: T.unsafe(nil), group_nodes: T.unsafe(nil), max_line_length: T.unsafe(nil), nest_singleton_methods: T.unsafe(nil), nest_non_public_methods: T.unsafe(nil), sort_nodes: T.unsafe(nil)); end + def initialize(add_sig_templates: T.unsafe(nil), group_nodes: T.unsafe(nil), max_line_length: T.unsafe(nil), nest_singleton_methods: T.unsafe(nil), nest_non_public_members: T.unsafe(nil), sort_nodes: T.unsafe(nil)); end sig { params(file: ::RBI::File).void } def format_file(file); end @@ -398,19 +404,19 @@ end class RBI::Group::Kind < ::T::Enum enums do - Mixins = new - RequiredAncestors = new - Helpers = new - TypeMembers = new - MixesInClassMethods = new - Sends = new Attrs = new - TStructFields = new - TEnums = new + Consts = new + Helpers = new Inits = new Methods = new + MixesInClassMethods = new + Mixins = new + RequiredAncestors = new + Sends = new SingletonClasses = new - Consts = new + TEnums = new + TStructFields = new + TypeMembers = new end end @@ -666,7 +672,7 @@ class RBI::Method < ::RBI::NodeWithComments sig do params( params: T::Array[::RBI::SigParam], - return_type: T.nilable(::String), + return_type: T.any(::RBI::Type, ::String), is_abstract: T::Boolean, is_override: T::Boolean, is_overridable: T::Boolean, @@ -825,6 +831,12 @@ class RBI::Node end def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end + sig { params(out: T.any(::IO, ::StringIO), indent: ::Integer, print_locs: T::Boolean).void } + def rbs_print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end + + sig { params(indent: ::Integer, print_locs: T::Boolean).returns(::String) } + def rbs_string(indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end + sig { params(node: ::RBI::Node).void } def replace(node); end @@ -988,8 +1000,8 @@ class RBI::Parser::TreeBuilder < ::RBI::Parser::Visitor sig { returns(T::Array[::RBI::Sig]) } def current_sigs; end - sig { returns(T::Array[::RBI::Comment]) } - def current_sigs_comments; end + sig { params(sigs: T::Array[::RBI::Sig]).returns(T::Array[::RBI::Comment]) } + def detach_comments_from_sigs(sigs); end sig { params(node: ::Prism::Node).returns(T::Array[::RBI::Comment]) } def node_comments(node); end @@ -1306,6 +1318,226 @@ class RBI::Public < ::RBI::Visibility def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end end +class RBI::RBSPrinter < ::RBI::Visitor + sig { params(out: T.any(::IO, ::StringIO), indent: ::Integer, print_locs: T::Boolean).void } + def initialize(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end + + sig { returns(::Integer) } + def current_indent; end + + sig { void } + def dedent; end + + def in_visibility_group; end + def in_visibility_group=(_arg0); end + + sig { void } + def indent; end + + sig { returns(T.nilable(::RBI::Node)) } + def previous_node; end + + sig { params(string: ::String).void } + def print(string); end + + sig { params(node: ::RBI::Attr, sig: ::RBI::Sig).void } + def print_attr_sig(node, sig); end + + sig { returns(T::Boolean) } + def print_locs; end + + def print_locs=(_arg0); end + + sig { params(node: ::RBI::Method, sig: ::RBI::Sig).void } + def print_method_sig(node, sig); end + + sig { params(string: ::String).void } + def printl(string); end + + sig { params(string: T.nilable(::String)).void } + def printn(string = T.unsafe(nil)); end + + sig { params(string: T.nilable(::String)).void } + def printt(string = T.unsafe(nil)); end + + sig { override.params(nodes: T::Array[::RBI::Node]).void } + def visit_all(nodes); end + + sig { override.params(node: ::RBI::Arg).void } + def visit_arg(node); end + + sig { params(node: ::RBI::Attr).void } + def visit_attr(node); end + + sig { override.params(node: ::RBI::AttrAccessor).void } + def visit_attr_accessor(node); end + + sig { override.params(node: ::RBI::AttrReader).void } + def visit_attr_reader(node); end + + sig { override.params(node: ::RBI::AttrWriter).void } + def visit_attr_writer(node); end + + sig { override.params(node: ::RBI::BlankLine).void } + def visit_blank_line(node); end + + sig { override.params(node: ::RBI::BlockParam).void } + def visit_block_param(node); end + + sig { override.params(node: ::RBI::Class).void } + def visit_class(node); end + + sig { override.params(node: ::RBI::Comment).void } + def visit_comment(node); end + + sig { override.params(node: ::RBI::ConflictTree).void } + def visit_conflict_tree(node); end + + sig { override.params(node: ::RBI::Const).void } + def visit_const(node); end + + sig { override.params(node: ::RBI::Extend).void } + def visit_extend(node); end + + sig { override.params(file: ::RBI::File).void } + def visit_file(file); end + + sig { override.params(node: ::RBI::Group).void } + def visit_group(node); end + + sig { override.params(node: ::RBI::Helper).void } + def visit_helper(node); end + + sig { override.params(node: ::RBI::Include).void } + def visit_include(node); end + + sig { override.params(node: ::RBI::KwArg).void } + def visit_kw_arg(node); end + + sig { override.params(node: ::RBI::KwOptParam).void } + def visit_kw_opt_param(node); end + + sig { override.params(node: ::RBI::KwParam).void } + def visit_kw_param(node); end + + sig { override.params(node: ::RBI::KwRestParam).void } + def visit_kw_rest_param(node); end + + sig { override.params(node: ::RBI::Method).void } + def visit_method(node); end + + sig { override.params(node: ::RBI::MixesInClassMethods).void } + def visit_mixes_in_class_methods(node); end + + sig { params(node: ::RBI::Mixin).void } + def visit_mixin(node); end + + sig { override.params(node: ::RBI::Module).void } + def visit_module(node); end + + sig { override.params(node: ::RBI::OptParam).void } + def visit_opt_param(node); end + + sig { override.params(node: ::RBI::Private).void } + def visit_private(node); end + + sig { override.params(node: ::RBI::Protected).void } + def visit_protected(node); end + + sig { override.params(node: ::RBI::Public).void } + def visit_public(node); end + + sig { override.params(node: ::RBI::ReqParam).void } + def visit_req_param(node); end + + sig { override.params(node: ::RBI::RequiresAncestor).void } + def visit_requires_ancestor(node); end + + sig { override.params(node: ::RBI::RestParam).void } + def visit_rest_param(node); end + + sig { params(node: ::RBI::Scope).void } + def visit_scope(node); end + + sig { params(node: ::RBI::Scope).void } + def visit_scope_body(node); end + + sig { override.params(node: ::RBI::ScopeConflict).void } + def visit_scope_conflict(node); end + + sig { params(node: ::RBI::Scope).void } + def visit_scope_header(node); end + + sig { override.params(node: ::RBI::Send).void } + def visit_send(node); end + + sig { override.params(node: ::RBI::SingletonClass).void } + def visit_singleton_class(node); end + + sig { override.params(node: ::RBI::Struct).void } + def visit_struct(node); end + + sig { override.params(node: ::RBI::TEnum).void } + def visit_tenum(node); end + + sig { override.params(node: ::RBI::TEnumBlock).void } + def visit_tenum_block(node); end + + sig { override.params(node: ::RBI::Tree).void } + def visit_tree(node); end + + sig { override.params(node: ::RBI::TStruct).void } + def visit_tstruct(node); end + + sig { override.params(node: ::RBI::TStructConst).void } + def visit_tstruct_const(node); end + + sig { override.params(node: ::RBI::TStructProp).void } + def visit_tstruct_prop(node); end + + sig { override.params(node: ::RBI::TypeMember).void } + def visit_type_member(node); end + + sig { params(node: ::RBI::Visibility).void } + def visit_visibility(node); end + + sig { override.params(node: ::RBI::VisibilityGroup).void } + def visit_visibility_group(node); end + + private + + sig { params(node: ::RBI::Type).returns(T::Boolean) } + def bare_nilable_proc?(node); end + + sig { params(node: ::RBI::Type).returns(T::Boolean) } + def bare_proc?(node); end + + sig { params(node: ::RBI::Node).returns(T::Boolean) } + def oneline?(node); end + + sig { params(code: T.nilable(::String)).returns(T.nilable(::String)) } + def parse_t_let(code); end + + sig { params(type: T.any(::RBI::Type, ::String)).returns(::RBI::Type) } + def parse_type(type); end + + sig { params(node: ::RBI::Node).void } + def print_blank_line_before(node); end + + sig { params(node: ::RBI::Node).void } + def print_loc(node); end + + sig { params(node: ::RBI::Param, last: T::Boolean).void } + def print_param_comment_leading_space(node, last:); end + + sig { params(node: ::RBI::Method, param: ::RBI::SigParam).void } + def print_sig_param(node, param); end + + sig { params(node: ::RBI::SigParam, last: T::Boolean).void } + def print_sig_param_comment_leading_space(node, last:); end +end + +class RBI::RBSPrinter::Error < ::RBI::Error; end class RBI::ReplaceNodeError < ::RBI::Error; end class RBI::ReqParam < ::RBI::Param @@ -1432,6 +1664,19 @@ end RBI::Rewriters::FilterVersions::VERSION_PREFIX = T.let(T.unsafe(nil), String) +class RBI::Rewriters::FlattenSingletonMethods < ::RBI::Visitor + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end +end + +class RBI::Rewriters::FlattenVisibilities < ::RBI::Visitor + sig { void } + def initialize; end + + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end +end + class RBI::Rewriters::GroupNodes < ::RBI::Visitor sig { override.params(node: T.nilable(::RBI::Node)).void } def visit(node); end @@ -1495,8 +1740,8 @@ end class RBI::Rewriters::Merge::Keep < ::T::Enum enums do - NONE = new LEFT = new + NONE = new RIGHT = new end end @@ -1536,7 +1781,7 @@ class RBI::Rewriters::Merge::TreeMerger < ::RBI::Visitor def replace_scope_header(left, right); end end -class RBI::Rewriters::NestNonPublicMethods < ::RBI::Visitor +class RBI::Rewriters::NestNonPublicMembers < ::RBI::Visitor sig { override.params(node: T.nilable(::RBI::Node)).void } def visit(node); end end @@ -1546,6 +1791,14 @@ class RBI::Rewriters::NestSingletonMethods < ::RBI::Visitor def visit(node); end end +class RBI::Rewriters::NestTopLevelMembers < ::RBI::Visitor + sig { void } + def initialize; end + + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end +end + class RBI::Rewriters::RemoveKnownDefinitions < ::RBI::Visitor sig { params(index: ::RBI::Index).void } def initialize(index); end @@ -1680,11 +1933,11 @@ class RBI::Send < ::RBI::NodeWithComments def to_s; end end -class RBI::Sig < ::RBI::Node +class RBI::Sig < ::RBI::NodeWithComments sig do params( params: T::Array[::RBI::SigParam], - return_type: T.nilable(::String), + return_type: T.any(::RBI::Type, ::String), is_abstract: T::Boolean, is_override: T::Boolean, is_overridable: T::Boolean, @@ -1692,10 +1945,11 @@ class RBI::Sig < ::RBI::Node type_params: T::Array[::String], checked: T.nilable(::Symbol), loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], block: T.nilable(T.proc.params(node: ::RBI::Sig).void) ).void end - def initialize(params: T.unsafe(nil), return_type: T.unsafe(nil), is_abstract: T.unsafe(nil), is_override: T.unsafe(nil), is_overridable: T.unsafe(nil), is_final: T.unsafe(nil), type_params: T.unsafe(nil), checked: T.unsafe(nil), loc: T.unsafe(nil), &block); end + def initialize(params: T.unsafe(nil), return_type: T.unsafe(nil), is_abstract: T.unsafe(nil), is_override: T.unsafe(nil), is_overridable: T.unsafe(nil), is_final: T.unsafe(nil), type_params: T.unsafe(nil), checked: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end sig { params(param: ::RBI::SigParam).void } def <<(param); end @@ -1703,7 +1957,7 @@ class RBI::Sig < ::RBI::Node sig { params(other: ::Object).returns(T::Boolean) } def ==(other); end - sig { params(name: ::String, type: ::String).void } + sig { params(name: ::String, type: T.any(::RBI::Type, ::String)).void } def add_param(name, type); end sig { returns(T.nilable(::Symbol)) } @@ -1725,7 +1979,7 @@ class RBI::Sig < ::RBI::Node sig { returns(T::Array[::RBI::SigParam]) } def params; end - sig { returns(T.nilable(::String)) } + sig { returns(T.any(::RBI::Type, ::String)) } def return_type; end def return_type=(_arg0); end @@ -1738,7 +1992,7 @@ class RBI::SigParam < ::RBI::NodeWithComments sig do params( name: ::String, - type: ::String, + type: T.any(::RBI::Type, ::String), loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment], block: T.nilable(T.proc.params(node: ::RBI::SigParam).void) @@ -1752,6 +2006,7 @@ class RBI::SigParam < ::RBI::NodeWithComments sig { returns(::String) } def name; end + sig { returns(T.any(::RBI::Type, ::String)) } def type; end end @@ -1816,34 +2071,22 @@ class RBI::TEnum < ::RBI::Class def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end end -class RBI::TEnumBlock < ::RBI::NodeWithComments - include ::RBI::Indexable - +class RBI::TEnumBlock < ::RBI::Scope sig do params( - names: T::Array[::String], loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment], block: T.nilable(T.proc.params(node: ::RBI::TEnumBlock).void) ).void end - def initialize(names = T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - sig { params(name: ::String).void } - def <<(name); end + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - sig { returns(T::Boolean) } - def empty?; end + sig { override.returns(::String) } + def fully_qualified_name; end sig { override.returns(T::Array[::String]) } def index_ids; end - sig { override.params(other: ::RBI::Node).void } - def merge_with(other); end - - sig { returns(T::Array[::String]) } - def names; end - sig { override.returns(::String) } def to_s; end end @@ -1866,7 +2109,7 @@ class RBI::TStructConst < ::RBI::TStructField sig do params( name: ::String, - type: ::String, + type: T.any(::RBI::Type, ::String), default: T.nilable(::String), loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment], @@ -1894,7 +2137,7 @@ class RBI::TStructField < ::RBI::NodeWithComments sig do params( name: ::String, - type: ::String, + type: T.any(::RBI::Type, ::String), default: T.nilable(::String), loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment] @@ -1917,7 +2160,10 @@ class RBI::TStructField < ::RBI::NodeWithComments def name; end def name=(_arg0); end + + sig { returns(T.any(::RBI::Type, ::String)) } def type; end + def type=(_arg0); end end @@ -1927,7 +2173,7 @@ class RBI::TStructProp < ::RBI::TStructField sig do params( name: ::String, - type: ::String, + type: T.any(::RBI::Type, ::String), default: T.nilable(::String), loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment], @@ -2029,6 +2275,12 @@ class RBI::Tree < ::RBI::NodeWithComments sig { params(version: ::Gem::Version).void } def filter_versions!(version); end + sig { void } + def flatten_singleton_methods!; end + + sig { void } + def flatten_visibilities!; end + sig { void } def group_nodes!; end @@ -2046,11 +2298,14 @@ class RBI::Tree < ::RBI::NodeWithComments def merge(other, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end sig { void } - def nest_non_public_methods!; end + def nest_non_public_members!; end sig { void } def nest_singleton_methods!; end + sig { void } + def nest_top_level_members!; end + sig { returns(T::Array[::RBI::Node]) } def nodes; end @@ -2069,6 +2324,443 @@ class RBI::Tree < ::RBI::NodeWithComments def nodes_cache; end end +class RBI::Type + abstract! + + sig { void } + def initialize; end + + sig { abstract.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + sig { params(other: ::BasicObject).returns(T::Boolean) } + def eql?(other); end + + sig { override.returns(::Integer) } + def hash; end + + sig { returns(::RBI::Type) } + def nilable; end + + sig { returns(T::Boolean) } + def nilable?; end + + sig { returns(::RBI::Type) } + def non_nilable; end + + sig { returns(::String) } + def rbs_string; end + + sig { abstract.returns(::String) } + def to_rbi; end + + sig { override.returns(::String) } + def to_s; end + + class << self + sig { params(type1: ::RBI::Type, type2: ::RBI::Type, types: ::RBI::Type).returns(::RBI::Type) } + def all(type1, type2, *types); end + + sig { params(type1: ::RBI::Type, type2: ::RBI::Type, types: ::RBI::Type).returns(::RBI::Type) } + def any(type1, type2, *types); end + + sig { returns(::RBI::Type::Anything) } + def anything; end + + sig { returns(::RBI::Type::AttachedClass) } + def attached_class; end + + sig { returns(::RBI::Type::Boolean) } + def boolean; end + + sig { params(type: ::RBI::Type::Simple, type_parameter: T.nilable(::RBI::Type)).returns(::RBI::Type::ClassOf) } + def class_of(type, type_parameter = T.unsafe(nil)); end + + sig { params(name: ::String, params: T.any(::RBI::Type, T::Array[::RBI::Type])).returns(::RBI::Type::Generic) } + def generic(name, *params); end + + sig { params(type: ::RBI::Type).returns(::RBI::Type) } + def nilable(type); end + + sig { returns(::RBI::Type::NoReturn) } + def noreturn; end + + sig { params(node: ::Prism::Node).returns(::RBI::Type) } + def parse_node(node); end + + sig { params(string: ::String).returns(::RBI::Type) } + def parse_string(string); end + + sig { returns(::RBI::Type::Proc) } + def proc; end + + sig { returns(::RBI::Type::SelfType) } + def self_type; end + + sig { params(types: T::Hash[T.any(::String, ::Symbol), ::RBI::Type]).returns(::RBI::Type::Shape) } + def shape(types = T.unsafe(nil)); end + + sig { params(name: ::String).returns(::RBI::Type::Simple) } + def simple(name); end + + sig { params(type: ::RBI::Type).returns(::RBI::Type::Class) } + def t_class(type); end + + sig { params(types: T.any(::RBI::Type, T::Array[::RBI::Type])).returns(::RBI::Type::Tuple) } + def tuple(*types); end + + sig { params(name: ::Symbol).returns(::RBI::Type::TypeParameter) } + def type_parameter(name); end + + sig { returns(::RBI::Type::Untyped) } + def untyped; end + + sig { returns(::RBI::Type::Void) } + def void; end + + private + + sig { params(node: ::Prism::CallNode).returns(T::Array[::Prism::Node]) } + def call_chain(node); end + + sig { params(node: ::Prism::CallNode, count: ::Integer).returns(T::Array[::Prism::Node]) } + def check_arguments_at_least!(node, count); end + + sig { params(node: ::Prism::CallNode, count: ::Integer).returns(T::Array[::Prism::Node]) } + def check_arguments_exactly!(node, count); end + + sig { params(node: ::Prism::CallNode).returns(::RBI::Type) } + def parse_call(node); end + + sig { params(node: T.any(::Prism::ConstantPathNode, ::Prism::ConstantReadNode)).returns(::RBI::Type) } + def parse_constant(node); end + + sig { params(node: ::Prism::CallNode).returns(::RBI::Type) } + def parse_proc(node); end + + sig { params(node: T.any(::Prism::HashNode, ::Prism::KeywordHashNode)).returns(::RBI::Type) } + def parse_shape(node); end + + sig { params(node: ::Prism::ArrayNode).returns(::RBI::Type) } + def parse_tuple(node); end + + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def t?(node); end + + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def t_boolean?(node); end + + sig { params(node: ::Prism::ConstantPathNode).returns(T::Boolean) } + def t_class?(node); end + + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def t_class_of?(node); end + + sig { params(node: ::Prism::CallNode).returns(T::Boolean) } + def t_proc?(node); end + + sig { params(name: ::String).returns(T::Boolean) } + def valid_identifier?(name); end + end +end + +class RBI::Type::All < ::RBI::Type::Composite + sig { override.returns(::String) } + def to_rbi; end +end + +class RBI::Type::Any < ::RBI::Type::Composite + sig { returns(T::Boolean) } + def nilable?; end + + sig { override.returns(::String) } + def to_rbi; end +end + +class RBI::Type::Anything < ::RBI::Type + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + sig { override.returns(::String) } + def to_rbi; end +end + +class RBI::Type::AttachedClass < ::RBI::Type + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + sig { override.returns(::String) } + def to_rbi; end +end + +class RBI::Type::Boolean < ::RBI::Type + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + sig { override.returns(::String) } + def to_rbi; end +end + +class RBI::Type::Class < ::RBI::Type + sig { params(type: ::RBI::Type).void } + def initialize(type); end + + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + sig { override.returns(::String) } + def to_rbi; end + + sig { returns(::RBI::Type) } + def type; end +end + +class RBI::Type::ClassOf < ::RBI::Type + sig { params(type: ::RBI::Type::Simple, type_parameter: T.nilable(::RBI::Type)).void } + def initialize(type, type_parameter = T.unsafe(nil)); end + + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + sig { override.returns(::String) } + def to_rbi; end + + sig { returns(::RBI::Type::Simple) } + def type; end + + sig { returns(T.nilable(::RBI::Type)) } + def type_parameter; end +end + +class RBI::Type::Composite < ::RBI::Type + abstract! + + sig { params(types: T::Array[::RBI::Type]).void } + def initialize(types); end + + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + sig { returns(T::Array[::RBI::Type]) } + def types; end +end + +class RBI::Type::Error < ::RBI::Error; end + +class RBI::Type::Generic < ::RBI::Type + sig { params(name: ::String, params: ::RBI::Type).void } + def initialize(name, *params); end + + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + sig { returns(::String) } + def name; end + + sig { returns(T::Array[::RBI::Type]) } + def params; end + + sig { override.returns(::String) } + def to_rbi; end +end + +class RBI::Type::Nilable < ::RBI::Type + sig { params(type: ::RBI::Type).void } + def initialize(type); end + + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + sig { override.returns(::String) } + def to_rbi; end + + sig { returns(::RBI::Type) } + def type; end +end + +class RBI::Type::NoReturn < ::RBI::Type + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + sig { override.returns(::String) } + def to_rbi; end +end + +class RBI::Type::Proc < ::RBI::Type + sig { void } + def initialize; end + + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + sig { params(type: T.untyped).returns(T.self_type) } + def bind(type); end + + sig { params(params: ::RBI::Type).returns(T.self_type) } + def params(**params); end + + sig { returns(T.nilable(::RBI::Type)) } + def proc_bind; end + + sig { returns(T::Hash[::Symbol, ::RBI::Type]) } + def proc_params; end + + sig { returns(::RBI::Type) } + def proc_returns; end + + sig { params(type: T.untyped).returns(T.self_type) } + def returns(type); end + + sig { override.returns(::String) } + def to_rbi; end + + sig { returns(T.self_type) } + def void; end +end + +class RBI::Type::SelfType < ::RBI::Type + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + sig { override.returns(::String) } + def to_rbi; end +end + +class RBI::Type::Shape < ::RBI::Type + sig { params(types: T::Hash[T.any(::String, ::Symbol), ::RBI::Type]).void } + def initialize(types); end + + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + sig { override.returns(::String) } + def to_rbi; end + + sig { returns(T::Hash[T.any(::String, ::Symbol), ::RBI::Type]) } + def types; end +end + +class RBI::Type::Simple < ::RBI::Type + sig { params(name: ::String).void } + def initialize(name); end + + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + sig { returns(::String) } + def name; end + + sig { override.returns(::String) } + def to_rbi; end +end + +class RBI::Type::Tuple < ::RBI::Type + sig { params(types: T::Array[::RBI::Type]).void } + def initialize(types); end + + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + sig { override.returns(::String) } + def to_rbi; end + + sig { returns(T::Array[::RBI::Type]) } + def types; end +end + +class RBI::Type::TypeParameter < ::RBI::Type + sig { params(name: ::Symbol).void } + def initialize(name); end + + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + sig { returns(::Symbol) } + def name; end + + sig { override.returns(::String) } + def to_rbi; end +end + +class RBI::Type::Untyped < ::RBI::Type + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + sig { override.returns(::String) } + def to_rbi; end +end + +class RBI::Type::Visitor + sig { params(node: ::RBI::Type).void } + def visit(node); end + + private + + sig { params(type: ::RBI::Type::All).void } + def visit_all(type); end + + sig { params(type: ::RBI::Type::Any).void } + def visit_any(type); end + + sig { params(type: ::RBI::Type::Anything).void } + def visit_anything(type); end + + sig { params(type: ::RBI::Type::AttachedClass).void } + def visit_attached_class(type); end + + sig { params(type: ::RBI::Type::Boolean).void } + def visit_boolean(type); end + + sig { params(type: ::RBI::Type::Class).void } + def visit_class(type); end + + sig { params(type: ::RBI::Type::ClassOf).void } + def visit_class_of(type); end + + sig { params(type: ::RBI::Type::Generic).void } + def visit_generic(type); end + + sig { params(type: ::RBI::Type::Nilable).void } + def visit_nilable(type); end + + sig { params(type: ::RBI::Type::NoReturn).void } + def visit_no_return(type); end + + sig { params(type: ::RBI::Type::Proc).void } + def visit_proc(type); end + + sig { params(type: ::RBI::Type::SelfType).void } + def visit_self_type(type); end + + sig { params(type: ::RBI::Type::Shape).void } + def visit_shape(type); end + + sig { params(type: ::RBI::Type::Simple).void } + def visit_simple(type); end + + sig { params(type: ::RBI::Type::Tuple).void } + def visit_tuple(type); end + + sig { params(type: ::RBI::Type::TypeParameter).void } + def visit_type_parameter(type); end + + sig { params(type: ::RBI::Type::Untyped).void } + def visit_untyped(type); end + + sig { params(type: ::RBI::Type::Void).void } + def visit_void(type); end +end + +class RBI::Type::Visitor::Error < ::RBI::Error; end + +class RBI::Type::Void < ::RBI::Type + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + sig { override.returns(::String) } + def to_rbi; end +end + class RBI::TypeMember < ::RBI::NodeWithComments include ::RBI::Indexable @@ -2098,6 +2790,76 @@ class RBI::TypeMember < ::RBI::NodeWithComments def value; end end +class RBI::TypePrinter + sig { void } + def initialize; end + + sig { returns(::String) } + def string; end + + sig { params(node: ::RBI::Type).void } + def visit(node); end + + sig { params(type: ::RBI::Type::All).void } + def visit_all(type); end + + sig { params(type: ::RBI::Type::Any).void } + def visit_any(type); end + + sig { params(type: ::RBI::Type::Anything).void } + def visit_anything(type); end + + sig { params(type: ::RBI::Type::AttachedClass).void } + def visit_attached_class(type); end + + sig { params(type: ::RBI::Type::Boolean).void } + def visit_boolean(type); end + + sig { params(type: ::RBI::Type::Class).void } + def visit_class(type); end + + sig { params(type: ::RBI::Type::ClassOf).void } + def visit_class_of(type); end + + sig { params(type: ::RBI::Type::Generic).void } + def visit_generic(type); end + + sig { params(type: ::RBI::Type::Nilable).void } + def visit_nilable(type); end + + sig { params(type: ::RBI::Type::NoReturn).void } + def visit_no_return(type); end + + sig { params(type: ::RBI::Type::Proc).void } + def visit_proc(type); end + + sig { params(type: ::RBI::Type::SelfType).void } + def visit_self_type(type); end + + sig { params(type: ::RBI::Type::Shape).void } + def visit_shape(type); end + + sig { params(type: ::RBI::Type::Simple).void } + def visit_simple(type); end + + sig { params(type: ::RBI::Type::Tuple).void } + def visit_tuple(type); end + + sig { params(type: ::RBI::Type::TypeParameter).void } + def visit_type_parameter(type); end + + sig { params(type: ::RBI::Type::Untyped).void } + def visit_untyped(type); end + + sig { params(type: ::RBI::Type::Void).void } + def visit_void(type); end + + private + + sig { params(type_name: ::String).returns(::String) } + def translate_t_type(type_name); end +end + class RBI::UnexpectedMultipleSigsError < ::RBI::Error sig { params(node: ::RBI::Node).void } def initialize(node); end @@ -2125,7 +2887,7 @@ class RBI::Visibility < ::RBI::NodeWithComments sig { params(visibility: ::Symbol, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } def initialize(visibility, loc: T.unsafe(nil), comments: T.unsafe(nil)); end - sig { params(other: ::RBI::Visibility).returns(T::Boolean) } + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end sig { returns(T::Boolean) } diff --git a/sorbet/rbi/gems/spoom@1.4.2.rbi b/sorbet/rbi/gems/spoom@1.5.0.rbi similarity index 99% rename from sorbet/rbi/gems/spoom@1.4.2.rbi rename to sorbet/rbi/gems/spoom@1.5.0.rbi index b08183cce..54f94cc21 100644 --- a/sorbet/rbi/gems/spoom@1.4.2.rbi +++ b/sorbet/rbi/gems/spoom@1.5.0.rbi @@ -173,24 +173,24 @@ Spoom::Cli::Srb::Tc::SORT_LOC = T.let(T.unsafe(nil), String) class Spoom::Color < ::T::Enum enums do - CLEAR = new - BOLD = new BLACK = new - RED = new - GREEN = new - YELLOW = new BLUE = new - MAGENTA = new + BOLD = new + CLEAR = new CYAN = new - WHITE = new + GREEN = new LIGHT_BLACK = new - LIGHT_RED = new - LIGHT_GREEN = new - LIGHT_YELLOW = new LIGHT_BLUE = new - LIGHT_MAGENTA = new LIGHT_CYAN = new + LIGHT_GREEN = new + LIGHT_MAGENTA = new + LIGHT_RED = new LIGHT_WHITE = new + LIGHT_YELLOW = new + MAGENTA = new + RED = new + WHITE = new + YELLOW = new end sig { returns(::String) } @@ -233,7 +233,7 @@ module Spoom::Context::Bundle sig { params(version: T.nilable(::String), capture_err: T::Boolean).returns(::Spoom::ExecResult) } def bundle_install!(version: T.unsafe(nil), capture_err: T.unsafe(nil)); end - sig { params(gem: ::String).returns(T.nilable(::String)) } + sig { params(gem: ::String).returns(T.nilable(::Gem::Version)) } def gem_version_from_gemfile_lock(gem); end sig { returns(T::Hash[::String, ::Bundler::LazySpecification]) } @@ -2388,9 +2388,9 @@ end class Spoom::Model::Visibility < ::T::Enum enums do - Public = new - Protected = new Private = new + Protected = new + Public = new end end diff --git a/sorbet/rbi/gems/tapioca@0.16.1-f2010b52a1980b51f649ac4277f37a98f0accce5.rbi b/sorbet/rbi/gems/tapioca@0.16.3-1c80c40b3c4b1498c1276bc2e74ada37469c8354.rbi similarity index 99% rename from sorbet/rbi/gems/tapioca@0.16.1-f2010b52a1980b51f649ac4277f37a98f0accce5.rbi rename to sorbet/rbi/gems/tapioca@0.16.3-1c80c40b3c4b1498c1276bc2e74ada37469c8354.rbi index f3480c0c2..7d816b288 100644 --- a/sorbet/rbi/gems/tapioca@0.16.1-f2010b52a1980b51f649ac4277f37a98f0accce5.rbi +++ b/sorbet/rbi/gems/tapioca@0.16.3-1c80c40b3c4b1498c1276bc2e74ada37469c8354.rbi @@ -115,6 +115,12 @@ class RBI::Tree < ::RBI::NodeWithComments sig { params(version: ::Gem::Version).void } def filter_versions!(version); end + sig { void } + def flatten_singleton_methods!; end + + sig { void } + def flatten_visibilities!; end + sig { void } def group_nodes!; end @@ -132,11 +138,14 @@ class RBI::Tree < ::RBI::NodeWithComments def merge(other, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end sig { void } - def nest_non_public_methods!; end + def nest_non_public_members!; end sig { void } def nest_singleton_methods!; end + sig { void } + def nest_top_level_members!; end + sig { returns(T::Array[::RBI::Node]) } def nodes; end @@ -946,6 +955,9 @@ class Tapioca::Dsl::Compiler sig { returns(T::Set[::Module]) } def processable_constants; end + sig { params(constants: T::Array[::Module]).void } + def requested_constants=(constants); end + private sig { returns(T::Enumerable[T::Class[T.anything]]) } @@ -953,6 +965,14 @@ class Tapioca::Dsl::Compiler sig { returns(T::Enumerable[::Module]) } def all_modules; end + + sig do + type_parameters(:U) + .params( + klass: T.all(T.type_parameter(:U), T::Class[T.anything]) + ).returns(T::Array[T.type_parameter(:U)]) + end + def descendants_of(klass); end end end @@ -2379,9 +2399,9 @@ end class Tapioca::Runtime::Trackers::Mixin::Type < ::T::Enum enums do - Prepend = new - Include = new Extend = new + Include = new + Prepend = new end end @@ -2551,9 +2571,9 @@ Tapioca::TypeVariableModule::DEFAULT_BOUNDS_PROC = T.let(T.unsafe(nil), Proc) class Tapioca::TypeVariableModule::Type < ::T::Enum enums do + HasAttachedClass = new Member = new Template = new - HasAttachedClass = new end end @@ -2590,3 +2610,4 @@ class URI::Source < ::URI::File end URI::Source::COMPONENT = T.let(T.unsafe(nil), Array) +URI::Source::PARSER = T.let(T.unsafe(nil), URI::RFC2396_Parser) diff --git a/sorbet/rbi/gems/thor@1.3.1.rbi b/sorbet/rbi/gems/thor@1.3.2.rbi similarity index 99% rename from sorbet/rbi/gems/thor@1.3.1.rbi rename to sorbet/rbi/gems/thor@1.3.2.rbi index 40e048121..2c100c807 100644 --- a/sorbet/rbi/gems/thor@1.3.1.rbi +++ b/sorbet/rbi/gems/thor@1.3.2.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `thor` gem. # Please instead update this file by running `bin/tapioca gem thor`. + module LCSDiff protected @@ -28,6 +29,7 @@ class Thor def at_least_one(*args, &block); end def check_unknown_options!(options = T.unsafe(nil)); end def check_unknown_options?(config); end + def command_exists?(command_name); end def command_help(shell, command_name); end def default_command(meth = T.unsafe(nil)); end def default_task(meth = T.unsafe(nil)); end @@ -469,6 +471,7 @@ class Thor::Group class << self def class_options_help(shell, groups = T.unsafe(nil)); end + def command_exists?(command_name); end def desc(description = T.unsafe(nil)); end def get_options_from_invocations(group_options, base_options); end def handle_argument_error(command, error, _args, arity); end