# typed: true # DO NOT EDIT MANUALLY # This is an autogenerated file for types exported from the `prism` gem. # Please instead update this file by running `bin/tapioca gem prism`. # =begin # This file is generated by the templates/template.rb script and should not be # modified manually. See templates/rbi/prism.rbi.erb # if you are looking to modify the template # =end # The Prism Ruby parser. # # "Parsing Ruby is suddenly manageable!" # - You, hopefully # # source://prism//lib/prism.rb#8 module Prism class << self # Mirror the Prism.dump API by using the serialization API. def dump(*_arg0); end # Mirror the Prism.dump_file API by using the serialization API. def dump_file(*_arg0); end # Mirror the Prism.lex API by using the serialization API. def lex(*_arg0); end # :call-seq: # Prism::lex_compat(source, **options) -> ParseResult # # Returns a parse result whose value is an array of tokens that closely # resembles the return value of Ripper::lex. The main difference is that the # `:on_sp` token is not emitted. # # For supported options, see Prism::parse. # # source://prism//lib/prism.rb#46 def lex_compat(source, **options); end # Mirror the Prism.lex_file API by using the serialization API. def lex_file(*_arg0); end # :call-seq: # Prism::lex_ripper(source) -> Array # # This lexes with the Ripper lex. It drops any space events but otherwise # returns the same tokens. Raises SyntaxError if the syntax in source is # invalid. # # source://prism//lib/prism.rb#56 def lex_ripper(source); end # :call-seq: # Prism::load(source, serialized) -> ParseResult # # Load the serialized AST using the source as a reference into a tree. # # source://prism//lib/prism.rb#64 def load(source, serialized); end # Mirror the Prism.parse API by using the serialization API. def parse(*_arg0); end # Mirror the Prism.parse_comments API by using the serialization API. def parse_comments(*_arg0); end # :call-seq: # Prism::parse_failure?(source, **options) -> bool # # Returns true if the source parses with errors. # # @return [Boolean] # # source://prism//lib/prism.rb#72 def parse_failure?(source, **options); end # Mirror the Prism.parse_file API by using the serialization API. This uses # native strings instead of Ruby strings because it allows us to use mmap when # it is available. def parse_file(*_arg0); end # Mirror the Prism.parse_file_comments API by using the serialization # API. This uses native strings instead of Ruby strings because it allows us # to use mmap when it is available. def parse_file_comments(*_arg0); end # :call-seq: # Prism::parse_file_failure?(filepath, **options) -> bool # # Returns true if the file at filepath parses with errors. # # @return [Boolean] # # source://prism//lib/prism.rb#80 def parse_file_failure?(filepath, **options); end # Mirror the Prism.parse_file_success? API by using the serialization API. # # @return [Boolean] def parse_file_success?(*_arg0); end # Mirror the Prism.parse_lex API by using the serialization API. def parse_lex(*_arg0); end # Mirror the Prism.parse_lex_file API by using the serialization API. def parse_lex_file(*_arg0); end # Mirror the Prism.parse_success? API by using the serialization API. # # @return [Boolean] def parse_success?(*_arg0); end end end # Represents the use of the `alias` keyword to alias a global variable. # # alias $foo $bar # ^^^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#98 class Prism::AliasGlobalVariableNode < ::Prism::Node # def initialize: (Node new_name, Node old_name, Location keyword_loc, Location location) -> void # # @return [AliasGlobalVariableNode] a new instance of AliasGlobalVariableNode # # source://prism//lib/prism/node.rb#99 def initialize(source, new_name, old_name, keyword_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#109 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#114 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#124 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#119 def compact_child_nodes; end # def copy: (**params) -> AliasGlobalVariableNode # # source://prism//lib/prism/node.rb#129 sig { params(params: T.untyped).returns(Prism::AliasGlobalVariableNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#114 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { new_name: Node, old_name: Node, keyword_loc: Location, location: Location } # # source://prism//lib/prism/node.rb#143 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#166 def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # # source://prism//lib/prism/node.rb#161 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # # source://prism//lib/prism/node.rb#154 sig { returns(Prism::Location) } def keyword_loc; end # attr_reader new_name: Node # # source://prism//lib/prism/node.rb#148 sig { returns(Prism::Node) } def new_name; end # attr_reader old_name: Node # # source://prism//lib/prism/node.rb#151 sig { returns(Prism::Node) } def old_name; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#190 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#200 def type; end end end # Represents the use of the `alias` keyword to alias a method. # # alias foo bar # ^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#210 class Prism::AliasMethodNode < ::Prism::Node # def initialize: (Node new_name, Node old_name, Location keyword_loc, Location location) -> void # # @return [AliasMethodNode] a new instance of AliasMethodNode # # source://prism//lib/prism/node.rb#211 def initialize(source, new_name, old_name, keyword_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#221 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#226 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#236 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#231 def compact_child_nodes; end # def copy: (**params) -> AliasMethodNode # # source://prism//lib/prism/node.rb#241 sig { params(params: T.untyped).returns(Prism::AliasMethodNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#226 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { new_name: Node, old_name: Node, keyword_loc: Location, location: Location } # # source://prism//lib/prism/node.rb#255 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#278 def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # # source://prism//lib/prism/node.rb#273 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # # source://prism//lib/prism/node.rb#266 sig { returns(Prism::Location) } def keyword_loc; end # attr_reader new_name: Node # # source://prism//lib/prism/node.rb#260 sig { returns(Prism::Node) } def new_name; end # attr_reader old_name: Node # # source://prism//lib/prism/node.rb#263 sig { returns(Prism::Node) } def old_name; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#302 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#312 def type; end end end # Represents an alternation pattern in pattern matching. # # foo => bar | baz # ^^^^^^^^^ # # source://prism//lib/prism/node.rb#322 class Prism::AlternationPatternNode < ::Prism::Node # def initialize: (Node left, Node right, Location operator_loc, Location location) -> void # # @return [AlternationPatternNode] a new instance of AlternationPatternNode # # source://prism//lib/prism/node.rb#323 def initialize(source, left, right, operator_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#333 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#338 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#348 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#343 def compact_child_nodes; end # def copy: (**params) -> AlternationPatternNode # # source://prism//lib/prism/node.rb#353 sig { params(params: T.untyped).returns(Prism::AlternationPatternNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#338 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { left: Node, right: Node, operator_loc: Location, location: Location } # # source://prism//lib/prism/node.rb#367 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#390 def inspect(inspector = T.unsafe(nil)); end # attr_reader left: Node # # source://prism//lib/prism/node.rb#372 sig { returns(Prism::Node) } def left; end # def operator: () -> String # # source://prism//lib/prism/node.rb#385 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism//lib/prism/node.rb#378 sig { returns(Prism::Location) } def operator_loc; end # attr_reader right: Node # # source://prism//lib/prism/node.rb#375 sig { returns(Prism::Node) } def right; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#414 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#424 def type; end end end # Represents the use of the `&&` operator or the `and` keyword. # # left and right # ^^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#434 class Prism::AndNode < ::Prism::Node # def initialize: (Node left, Node right, Location operator_loc, Location location) -> void # # @return [AndNode] a new instance of AndNode # # source://prism//lib/prism/node.rb#435 def initialize(source, left, right, operator_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#445 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#450 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#460 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#455 def compact_child_nodes; end # def copy: (**params) -> AndNode # # source://prism//lib/prism/node.rb#465 sig { params(params: T.untyped).returns(Prism::AndNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#450 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { left: Node, right: Node, operator_loc: Location, location: Location } # # source://prism//lib/prism/node.rb#479 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#517 def inspect(inspector = T.unsafe(nil)); end # Represents the left side of the expression. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). # # left and right # ^^^^ # # 1 && 2 # ^ # # source://prism//lib/prism/node.rb#490 sig { returns(Prism::Node) } def left; end # def operator: () -> String # # source://prism//lib/prism/node.rb#512 sig { returns(String) } def operator; end # The location of the `and` keyword or the `&&` operator. # # left and right # ^^^ # # source://prism//lib/prism/node.rb#505 sig { returns(Prism::Location) } def operator_loc; end # Represents the right side of the expression. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). # # left && right # ^^^^^ # # 1 and 2 # ^ # # source://prism//lib/prism/node.rb#499 sig { returns(Prism::Node) } def right; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#541 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#551 def type; end end end # Represents a set of arguments to a method or a keyword. # # return foo, bar, baz # ^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#561 class Prism::ArgumentsNode < ::Prism::Node # def initialize: (Integer flags, Array[Node] arguments, Location location) -> void # # @return [ArgumentsNode] a new instance of ArgumentsNode # # source://prism//lib/prism/node.rb#562 def initialize(source, flags, arguments, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#571 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # attr_reader arguments: Array[Node] # # source://prism//lib/prism/node.rb#613 sig { returns(T::Array[Prism::Node]) } def arguments; end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#576 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#586 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#581 def compact_child_nodes; end # def contains_keyword_splat?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#617 sig { returns(T::Boolean) } def contains_keyword_splat?; end # def copy: (**params) -> ArgumentsNode # # source://prism//lib/prism/node.rb#591 sig { params(params: T.untyped).returns(Prism::ArgumentsNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#576 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, arguments: Array[Node], location: Location } # # source://prism//lib/prism/node.rb#604 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#622 def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#644 def type; end private # private attr_reader flags: Integer # # source://prism//lib/prism/node.rb#609 sig { returns(Integer) } def flags; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#654 def type; end end end # Flags for arguments nodes. # # source://prism//lib/prism/node.rb#19241 module Prism::ArgumentsNodeFlags; end # if arguments contain keyword splat # # source://prism//lib/prism/node.rb#19243 Prism::ArgumentsNodeFlags::CONTAINS_KEYWORD_SPLAT = T.let(T.unsafe(nil), Integer) # Represents an array literal. This can be a regular array using brackets or a special array using % like %w or %i. # # [1, 2, 3] # ^^^^^^^^^ # # source://prism//lib/prism/node.rb#664 class Prism::ArrayNode < ::Prism::Node # def initialize: (Integer flags, Array[Node] elements, Location? opening_loc, Location? closing_loc, Location location) -> void # # @return [ArrayNode] a new instance of ArrayNode # # source://prism//lib/prism/node.rb#665 def initialize(source, flags, elements, opening_loc, closing_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#676 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#681 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # # source://prism//lib/prism/node.rb#758 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # # source://prism//lib/prism/node.rb#735 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#691 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#686 def compact_child_nodes; end # def contains_splat?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#748 sig { returns(T::Boolean) } def contains_splat?; end # def copy: (**params) -> ArrayNode # # source://prism//lib/prism/node.rb#696 sig { params(params: T.untyped).returns(Prism::ArrayNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#681 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, elements: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location } # # source://prism//lib/prism/node.rb#711 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # attr_reader elements: Array[Node] # # source://prism//lib/prism/node.rb#720 sig { returns(T::Array[Prism::Node]) } def elements; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#763 def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String? # # source://prism//lib/prism/node.rb#753 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # # source://prism//lib/prism/node.rb#723 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#787 def type; end private # private attr_reader flags: Integer # # source://prism//lib/prism/node.rb#716 sig { returns(Integer) } def flags; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#797 def type; end end end # Flags for array nodes. # # source://prism//lib/prism/node.rb#19247 module Prism::ArrayNodeFlags; end # if array contains splat nodes # # source://prism//lib/prism/node.rb#19249 Prism::ArrayNodeFlags::CONTAINS_SPLAT = T.let(T.unsafe(nil), Integer) # Represents an array pattern in pattern matching. # # foo in 1, 2 # ^^^^^^^^^^^ # # foo in [1, 2] # ^^^^^^^^^^^^^ # # foo in *1 # ^^^^^^^^^ # # foo in Bar[] # ^^^^^^^^^^^^ # # foo in Bar[1, 2, 3] # ^^^^^^^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#819 class Prism::ArrayPatternNode < ::Prism::Node # def initialize: (Node? constant, Array[Node] requireds, Node? rest, Array[Node] posts, Location? opening_loc, Location? closing_loc, Location location) -> void # # @return [ArrayPatternNode] a new instance of ArrayPatternNode # # source://prism//lib/prism/node.rb#820 def initialize(source, constant, requireds, rest, posts, opening_loc, closing_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#833 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#838 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # # source://prism//lib/prism/node.rb#922 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # # source://prism//lib/prism/node.rb#904 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#853 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#843 def compact_child_nodes; end # attr_reader constant: Node? # # source://prism//lib/prism/node.rb#880 sig { returns(T.nilable(Prism::Node)) } def constant; end # def copy: (**params) -> ArrayPatternNode # # source://prism//lib/prism/node.rb#858 sig { params(params: T.untyped).returns(Prism::ArrayPatternNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#838 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { constant: Node?, requireds: Array[Node], rest: Node?, posts: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location } # # source://prism//lib/prism/node.rb#875 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#927 def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String? # # source://prism//lib/prism/node.rb#917 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # # source://prism//lib/prism/node.rb#892 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader posts: Array[Node] # # source://prism//lib/prism/node.rb#889 sig { returns(T::Array[Prism::Node]) } def posts; end # attr_reader requireds: Array[Node] # # source://prism//lib/prism/node.rb#883 sig { returns(T::Array[Prism::Node]) } def requireds; end # attr_reader rest: Node? # # source://prism//lib/prism/node.rb#886 sig { returns(T.nilable(Prism::Node)) } def rest; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#962 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#972 def type; end end end # Represents a hash key/value pair. # # { a => b } # ^^^^^^ # # source://prism//lib/prism/node.rb#982 class Prism::AssocNode < ::Prism::Node # def initialize: (Node key, Node value, Location? operator_loc, Location location) -> void # # @return [AssocNode] a new instance of AssocNode # # source://prism//lib/prism/node.rb#983 def initialize(source, key, value, operator_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#993 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#998 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#1008 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#1003 def compact_child_nodes; end # def copy: (**params) -> AssocNode # # source://prism//lib/prism/node.rb#1013 sig { params(params: T.untyped).returns(Prism::AssocNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#998 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { key: Node, value: Node, operator_loc: Location?, location: Location } # # source://prism//lib/prism/node.rb#1027 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#1074 def inspect(inspector = T.unsafe(nil)); end # The key of the association. This can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). # # { a: b } # ^ # # { foo => bar } # ^^^ # # { def a; end => 1 } # ^^^^^^^^^^ # # source://prism//lib/prism/node.rb#1041 sig { returns(Prism::Node) } def key; end # def operator: () -> String? # # source://prism//lib/prism/node.rb#1069 sig { returns(T.nilable(String)) } def operator; end # The location of the `=>` operator, if present. # # { foo => bar } # ^^ # # source://prism//lib/prism/node.rb#1056 sig { returns(T.nilable(Prism::Location)) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#1098 def type; end # The value of the association, if present. This can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). # # { foo => bar } # ^^^ # # { x: 1 } # ^ # # source://prism//lib/prism/node.rb#1050 sig { returns(Prism::Node) } def value; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#1108 def type; end end end # Represents a splat in a hash literal. # # { **foo } # ^^^^^ # # source://prism//lib/prism/node.rb#1118 class Prism::AssocSplatNode < ::Prism::Node # def initialize: (Node? value, Location operator_loc, Location location) -> void # # @return [AssocSplatNode] a new instance of AssocSplatNode # # source://prism//lib/prism/node.rb#1119 def initialize(source, value, operator_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#1128 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#1133 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#1145 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#1138 def compact_child_nodes; end # def copy: (**params) -> AssocSplatNode # # source://prism//lib/prism/node.rb#1150 sig { params(params: T.untyped).returns(Prism::AssocSplatNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#1133 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { value: Node?, operator_loc: Location, location: Location } # # source://prism//lib/prism/node.rb#1163 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#1189 def inspect(inspector = T.unsafe(nil)); end # def operator: () -> String # # source://prism//lib/prism/node.rb#1184 sig { returns(String) } def operator; end # The location of the `**` operator. # # { **x } # ^^ # # source://prism//lib/prism/node.rb#1177 sig { returns(Prism::Location) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#1215 def type; end # The value to be splatted, if present. Will be missing when keyword rest argument forwarding is used. # # { **foo } # ^^^ # # source://prism//lib/prism/node.rb#1171 sig { returns(T.nilable(Prism::Node)) } def value; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#1225 def type; end end end Prism::BACKEND = T.let(T.unsafe(nil), Symbol) # Represents reading a reference to a field in the previous match. # # $' # ^^ # # source://prism//lib/prism/node.rb#1235 class Prism::BackReferenceReadNode < ::Prism::Node # def initialize: (Symbol name, Location location) -> void # # @return [BackReferenceReadNode] a new instance of BackReferenceReadNode # # source://prism//lib/prism/node.rb#1236 def initialize(source, name, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#1244 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#1249 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#1259 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#1254 def compact_child_nodes; end # def copy: (**params) -> BackReferenceReadNode # # source://prism//lib/prism/node.rb#1264 sig { params(params: T.untyped).returns(Prism::BackReferenceReadNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#1249 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } # # source://prism//lib/prism/node.rb#1276 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#1289 def inspect(inspector = T.unsafe(nil)); end # The name of the back-reference variable, including the leading `$`. # # $& # name `:$&` # # $+ # name `:$+` # # source://prism//lib/prism/node.rb#1285 sig { returns(Symbol) } def name; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#1309 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#1319 def type; end end end # A class that knows how to walk down the tree. None of the individual visit # methods are implemented on this visitor, so it forces the consumer to # implement each one that they need. For a default implementation that # continues walking the tree, see the Visitor class. # # source://prism//lib/prism/visitor.rb#13 class Prism::BasicVisitor # Calls `accept` on the given node if it is not `nil`, which in turn should # call back into this visitor by calling the appropriate `visit_*` method. # # source://prism//lib/prism/visitor.rb#16 sig { params(node: T.nilable(Prism::Node)).void } def visit(node); end # Visits each node in `nodes` by calling `accept` on each one. # # source://prism//lib/prism/visitor.rb#21 sig { params(nodes: T::Array[T.nilable(Prism::Node)]).void } def visit_all(nodes); end # Visits the child nodes of `node` by calling `accept` on each one. # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::Node).void } def visit_child_nodes(node); end end # Represents a begin statement. # # begin # foo # end # ^^^^^ # # source://prism//lib/prism/node.rb#1331 class Prism::BeginNode < ::Prism::Node # def initialize: (Location? begin_keyword_loc, StatementsNode? statements, RescueNode? rescue_clause, ElseNode? else_clause, EnsureNode? ensure_clause, Location? end_keyword_loc, Location location) -> void # # @return [BeginNode] a new instance of BeginNode # # source://prism//lib/prism/node.rb#1332 def initialize(source, begin_keyword_loc, statements, rescue_clause, else_clause, ensure_clause, end_keyword_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#1345 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def begin_keyword: () -> String? # # source://prism//lib/prism/node.rb#1433 sig { returns(T.nilable(String)) } def begin_keyword; end # attr_reader begin_keyword_loc: Location? # # source://prism//lib/prism/node.rb#1396 sig { returns(T.nilable(Prism::Location)) } def begin_keyword_loc; end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#1354 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#1369 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#1359 def compact_child_nodes; end # def copy: (**params) -> BeginNode # # source://prism//lib/prism/node.rb#1374 sig { params(params: T.untyped).returns(Prism::BeginNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#1354 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { begin_keyword_loc: Location?, statements: StatementsNode?, rescue_clause: RescueNode?, else_clause: ElseNode?, ensure_clause: EnsureNode?, end_keyword_loc: Location?, location: Location } # # source://prism//lib/prism/node.rb#1391 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # attr_reader else_clause: ElseNode? # # source://prism//lib/prism/node.rb#1414 sig { returns(T.nilable(Prism::ElseNode)) } def else_clause; end # def end_keyword: () -> String? # # source://prism//lib/prism/node.rb#1438 sig { returns(T.nilable(String)) } def end_keyword; end # attr_reader end_keyword_loc: Location? # # source://prism//lib/prism/node.rb#1420 sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end # attr_reader ensure_clause: EnsureNode? # # source://prism//lib/prism/node.rb#1417 sig { returns(T.nilable(Prism::EnsureNode)) } def ensure_clause; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#1443 def inspect(inspector = T.unsafe(nil)); end # attr_reader rescue_clause: RescueNode? # # source://prism//lib/prism/node.rb#1411 sig { returns(T.nilable(Prism::RescueNode)) } def rescue_clause; end # source://prism//lib/prism/node.rb#1349 def set_newline_flag(newline_marked); end # attr_reader statements: StatementsNode? # # source://prism//lib/prism/node.rb#1408 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#1488 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#1498 def type; end end end # Represents block method arguments. # # bar(&args) # ^^^^^^^^^^ # # source://prism//lib/prism/node.rb#1508 class Prism::BlockArgumentNode < ::Prism::Node # def initialize: (Node? expression, Location operator_loc, Location location) -> void # # @return [BlockArgumentNode] a new instance of BlockArgumentNode # # source://prism//lib/prism/node.rb#1509 def initialize(source, expression, operator_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#1518 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#1523 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#1535 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#1528 def compact_child_nodes; end # def copy: (**params) -> BlockArgumentNode # # source://prism//lib/prism/node.rb#1540 sig { params(params: T.untyped).returns(Prism::BlockArgumentNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#1523 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { expression: Node?, operator_loc: Location, location: Location } # # source://prism//lib/prism/node.rb#1553 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # attr_reader expression: Node? # # source://prism//lib/prism/node.rb#1558 sig { returns(T.nilable(Prism::Node)) } def expression; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#1573 def inspect(inspector = T.unsafe(nil)); end # def operator: () -> String # # source://prism//lib/prism/node.rb#1568 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism//lib/prism/node.rb#1561 sig { returns(Prism::Location) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#1599 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#1609 def type; end end end # Represents a block local variable. # # a { |; b| } # ^ # # source://prism//lib/prism/node.rb#1619 class Prism::BlockLocalVariableNode < ::Prism::Node # def initialize: (Integer flags, Symbol name, Location location) -> void # # @return [BlockLocalVariableNode] a new instance of BlockLocalVariableNode # # source://prism//lib/prism/node.rb#1620 def initialize(source, flags, name, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#1629 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#1634 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#1644 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#1639 def compact_child_nodes; end # def copy: (**params) -> BlockLocalVariableNode # # source://prism//lib/prism/node.rb#1649 sig { params(params: T.untyped).returns(Prism::BlockLocalVariableNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#1634 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, location: Location } # # source://prism//lib/prism/node.rb#1662 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#1680 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # # source://prism//lib/prism/node.rb#1671 sig { returns(Symbol) } def name; end # def repeated_parameter?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#1675 sig { returns(T::Boolean) } def repeated_parameter?; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#1702 def type; end private # private attr_reader flags: Integer # # source://prism//lib/prism/node.rb#1667 sig { returns(Integer) } def flags; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#1712 def type; end end end # Represents a block of ruby code. # # [1, 2, 3].each { |i| puts x } # ^^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#1722 class Prism::BlockNode < ::Prism::Node # def initialize: (Array[Symbol] locals, Node? parameters, Node? body, Location opening_loc, Location closing_loc, Location location) -> void # # @return [BlockNode] a new instance of BlockNode # # source://prism//lib/prism/node.rb#1723 def initialize(source, locals, parameters, body, opening_loc, closing_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#1735 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # attr_reader body: Node? # # source://prism//lib/prism/node.rb#1785 sig { returns(T.nilable(Prism::Node)) } def body; end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#1740 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # # source://prism//lib/prism/node.rb#1806 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # # source://prism//lib/prism/node.rb#1794 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#1753 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#1745 def compact_child_nodes; end # def copy: (**params) -> BlockNode # # source://prism//lib/prism/node.rb#1758 sig { params(params: T.untyped).returns(Prism::BlockNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#1740 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], parameters: Node?, body: Node?, opening_loc: Location, closing_loc: Location, location: Location } # # source://prism//lib/prism/node.rb#1774 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#1811 def inspect(inspector = T.unsafe(nil)); end # attr_reader locals: Array[Symbol] # # source://prism//lib/prism/node.rb#1779 sig { returns(T::Array[Symbol]) } def locals; end # def opening: () -> String # # source://prism//lib/prism/node.rb#1801 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # # source://prism//lib/prism/node.rb#1788 sig { returns(Prism::Location) } def opening_loc; end # attr_reader parameters: Node? # # source://prism//lib/prism/node.rb#1782 sig { returns(T.nilable(Prism::Node)) } def parameters; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#1845 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#1855 def type; end end end # Represents a block parameter to a method, block, or lambda definition. # # def a(&b) # ^^ # end # # source://prism//lib/prism/node.rb#1866 class Prism::BlockParameterNode < ::Prism::Node # def initialize: (Integer flags, Symbol? name, Location? name_loc, Location operator_loc, Location location) -> void # # @return [BlockParameterNode] a new instance of BlockParameterNode # # source://prism//lib/prism/node.rb#1867 def initialize(source, flags, name, name_loc, operator_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#1878 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#1883 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#1893 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#1888 def compact_child_nodes; end # def copy: (**params) -> BlockParameterNode # # source://prism//lib/prism/node.rb#1898 sig { params(params: T.untyped).returns(Prism::BlockParameterNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#1883 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location } # # source://prism//lib/prism/node.rb#1913 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#1954 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol? # # source://prism//lib/prism/node.rb#1922 sig { returns(T.nilable(Symbol)) } def name; end # attr_reader name_loc: Location? # # source://prism//lib/prism/node.rb#1925 sig { returns(T.nilable(Prism::Location)) } def name_loc; end # def operator: () -> String # # source://prism//lib/prism/node.rb#1949 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism//lib/prism/node.rb#1937 sig { returns(Prism::Location) } def operator_loc; end # def repeated_parameter?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#1944 sig { returns(T::Boolean) } def repeated_parameter?; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#1982 def type; end private # private attr_reader flags: Integer # # source://prism//lib/prism/node.rb#1918 sig { returns(Integer) } def flags; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#1992 def type; end end end # Represents a block's parameters declaration. # # -> (a, b = 1; local) { } # ^^^^^^^^^^^^^^^^^ # # foo do |a, b = 1; local| # ^^^^^^^^^^^^^^^^^ # end # # source://prism//lib/prism/node.rb#2006 class Prism::BlockParametersNode < ::Prism::Node # def initialize: (ParametersNode? parameters, Array[Node] locals, Location? opening_loc, Location? closing_loc, Location location) -> void # # @return [BlockParametersNode] a new instance of BlockParametersNode # # source://prism//lib/prism/node.rb#2007 def initialize(source, parameters, locals, opening_loc, closing_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#2018 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#2023 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # # source://prism//lib/prism/node.rb#2097 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # # source://prism//lib/prism/node.rb#2079 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#2036 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#2028 def compact_child_nodes; end # def copy: (**params) -> BlockParametersNode # # source://prism//lib/prism/node.rb#2041 sig { params(params: T.untyped).returns(Prism::BlockParametersNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#2023 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { parameters: ParametersNode?, locals: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location } # # source://prism//lib/prism/node.rb#2056 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#2102 def inspect(inspector = T.unsafe(nil)); end # attr_reader locals: Array[Node] # # source://prism//lib/prism/node.rb#2064 sig { returns(T::Array[Prism::Node]) } def locals; end # def opening: () -> String? # # source://prism//lib/prism/node.rb#2092 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # # source://prism//lib/prism/node.rb#2067 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader parameters: ParametersNode? # # source://prism//lib/prism/node.rb#2061 sig { returns(T.nilable(Prism::ParametersNode)) } def parameters; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#2130 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#2140 def type; end end end # Represents the use of the `break` keyword. # # break foo # ^^^^^^^^^ # # source://prism//lib/prism/node.rb#2150 class Prism::BreakNode < ::Prism::Node # def initialize: (ArgumentsNode? arguments, Location keyword_loc, Location location) -> void # # @return [BreakNode] a new instance of BreakNode # # source://prism//lib/prism/node.rb#2151 def initialize(source, arguments, keyword_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#2160 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # # source://prism//lib/prism/node.rb#2200 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#2165 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#2177 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#2170 def compact_child_nodes; end # def copy: (**params) -> BreakNode # # source://prism//lib/prism/node.rb#2182 sig { params(params: T.untyped).returns(Prism::BreakNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#2165 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { arguments: ArgumentsNode?, keyword_loc: Location, location: Location } # # source://prism//lib/prism/node.rb#2195 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#2215 def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # # source://prism//lib/prism/node.rb#2210 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # # source://prism//lib/prism/node.rb#2203 sig { returns(Prism::Location) } def keyword_loc; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#2241 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#2251 def type; end end end # Represents the use of the `&&=` operator on a call. # # foo.bar &&= value # ^^^^^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#2261 class Prism::CallAndWriteNode < ::Prism::Node # def initialize: (Integer flags, Node? receiver, Location? call_operator_loc, Location? message_loc, Symbol read_name, Symbol write_name, Location operator_loc, Node value, Location location) -> void # # @return [CallAndWriteNode] a new instance of CallAndWriteNode # # source://prism//lib/prism/node.rb#2262 def initialize(source, flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#2277 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def attribute_write?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#2381 sig { returns(T::Boolean) } def attribute_write?; end # def call_operator: () -> String? # # source://prism//lib/prism/node.rb#2391 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # # source://prism//lib/prism/node.rb#2331 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#2282 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#2295 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#2287 def compact_child_nodes; end # def copy: (**params) -> CallAndWriteNode # # source://prism//lib/prism/node.rb#2300 sig { params(params: T.untyped).returns(Prism::CallAndWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#2282 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Node, location: Location } # # source://prism//lib/prism/node.rb#2319 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def ignore_visibility?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#2386 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#2406 def inspect(inspector = T.unsafe(nil)); end # def message: () -> String? # # source://prism//lib/prism/node.rb#2396 sig { returns(T.nilable(String)) } def message; end # attr_reader message_loc: Location? # # source://prism//lib/prism/node.rb#2343 sig { returns(T.nilable(Prism::Location)) } def message_loc; end # def operator: () -> String # # source://prism//lib/prism/node.rb#2401 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism//lib/prism/node.rb#2361 sig { returns(Prism::Location) } def operator_loc; end # attr_reader read_name: Symbol # # source://prism//lib/prism/node.rb#2355 sig { returns(Symbol) } def read_name; end # attr_reader receiver: Node? # # source://prism//lib/prism/node.rb#2328 sig { returns(T.nilable(Prism::Node)) } def receiver; end # def safe_navigation?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#2371 sig { returns(T::Boolean) } def safe_navigation?; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#2440 def type; end # attr_reader value: Node # # source://prism//lib/prism/node.rb#2367 sig { returns(Prism::Node) } def value; end # def variable_call?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#2376 sig { returns(T::Boolean) } def variable_call?; end # attr_reader write_name: Symbol # # source://prism//lib/prism/node.rb#2358 sig { returns(Symbol) } def write_name; end private # private attr_reader flags: Integer # # source://prism//lib/prism/node.rb#2324 sig { returns(Integer) } def flags; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#2450 def type; end end end # Represents a method call, in all of the various forms that can take. # # foo # ^^^ # # foo() # ^^^^^ # # +foo # ^^^^ # # foo + bar # ^^^^^^^^^ # # foo.bar # ^^^^^^^ # # foo&.bar # ^^^^^^^^ # # source://prism//lib/prism/node.rb#2475 class Prism::CallNode < ::Prism::Node # def initialize: (Integer flags, Node? receiver, Location? call_operator_loc, Symbol name, Location? message_loc, Location? opening_loc, ArgumentsNode? arguments, Location? closing_loc, Node? block, Location location) -> void # # @return [CallNode] a new instance of CallNode # # source://prism//lib/prism/node.rb#2476 def initialize(source, flags, receiver, call_operator_loc, name, message_loc, opening_loc, arguments, closing_loc, block, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#2492 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # # source://prism//lib/prism/node.rb#2596 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def attribute_write?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#2625 sig { returns(T::Boolean) } def attribute_write?; end # attr_reader block: Node? # # source://prism//lib/prism/node.rb#2611 sig { returns(T.nilable(Prism::Node)) } def block; end # def call_operator: () -> String? # # source://prism//lib/prism/node.rb#2635 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # # source://prism//lib/prism/node.rb#2557 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#2497 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # # source://prism//lib/prism/node.rb#2650 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # # source://prism//lib/prism/node.rb#2599 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#2511 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#2502 def compact_child_nodes; end # def copy: (**params) -> CallNode # # source://prism//lib/prism/node.rb#2516 sig { params(params: T.untyped).returns(Prism::CallNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#2497 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Node?, call_operator_loc: Location?, name: Symbol, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, block: Node?, location: Location } # # source://prism//lib/prism/node.rb#2536 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def ignore_visibility?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#2630 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#2655 def inspect(inspector = T.unsafe(nil)); end # def message: () -> String? # # source://prism//lib/prism/node.rb#2640 sig { returns(T.nilable(String)) } def message; end # attr_reader message_loc: Location? # # source://prism//lib/prism/node.rb#2572 sig { returns(T.nilable(Prism::Location)) } def message_loc; end # attr_reader name: Symbol # # source://prism//lib/prism/node.rb#2569 sig { returns(Symbol) } def name; end # def opening: () -> String? # # source://prism//lib/prism/node.rb#2645 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # # source://prism//lib/prism/node.rb#2584 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # The object that the method is being called on. This can be either `nil` or any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). # # foo.bar # ^^^ # # +foo # ^^^ # # foo + bar # ^^^ # # source://prism//lib/prism/node.rb#2554 sig { returns(T.nilable(Prism::Node)) } def receiver; end # def safe_navigation?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#2615 sig { returns(T::Boolean) } def safe_navigation?; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#2699 def type; end # def variable_call?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#2620 sig { returns(T::Boolean) } def variable_call?; end private # private attr_reader flags: Integer # # source://prism//lib/prism/node.rb#2541 sig { returns(Integer) } def flags; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#2709 def type; end end end # Flags for call nodes. # # source://prism//lib/prism/node.rb#19253 module Prism::CallNodeFlags; end # a call that is an attribute write, so the value being written should be returned # # source://prism//lib/prism/node.rb#19261 Prism::CallNodeFlags::ATTRIBUTE_WRITE = T.let(T.unsafe(nil), Integer) # a call that ignores method visibility # # source://prism//lib/prism/node.rb#19264 Prism::CallNodeFlags::IGNORE_VISIBILITY = T.let(T.unsafe(nil), Integer) # &. operator # # source://prism//lib/prism/node.rb#19255 Prism::CallNodeFlags::SAFE_NAVIGATION = T.let(T.unsafe(nil), Integer) # a call that could have been a local variable # # source://prism//lib/prism/node.rb#19258 Prism::CallNodeFlags::VARIABLE_CALL = T.let(T.unsafe(nil), Integer) # Represents the use of an assignment operator on a call. # # foo.bar += baz # ^^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#2719 class Prism::CallOperatorWriteNode < ::Prism::Node # def initialize: (Integer flags, Node? receiver, Location? call_operator_loc, Location? message_loc, Symbol read_name, Symbol write_name, Symbol operator, Location operator_loc, Node value, Location location) -> void # # @return [CallOperatorWriteNode] a new instance of CallOperatorWriteNode # # source://prism//lib/prism/node.rb#2720 def initialize(source, flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator, operator_loc, value, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#2736 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def attribute_write?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#2844 sig { returns(T::Boolean) } def attribute_write?; end # def call_operator: () -> String? # # source://prism//lib/prism/node.rb#2854 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # # source://prism//lib/prism/node.rb#2791 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#2741 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#2754 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#2746 def compact_child_nodes; end # def copy: (**params) -> CallOperatorWriteNode # # source://prism//lib/prism/node.rb#2759 sig { params(params: T.untyped).returns(Prism::CallOperatorWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#2741 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator: Symbol, operator_loc: Location, value: Node, location: Location } # # source://prism//lib/prism/node.rb#2779 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def ignore_visibility?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#2849 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#2864 def inspect(inspector = T.unsafe(nil)); end # def message: () -> String? # # source://prism//lib/prism/node.rb#2859 sig { returns(T.nilable(String)) } def message; end # attr_reader message_loc: Location? # # source://prism//lib/prism/node.rb#2803 sig { returns(T.nilable(Prism::Location)) } def message_loc; end # attr_reader operator: Symbol # # source://prism//lib/prism/node.rb#2821 sig { returns(Symbol) } def operator; end # attr_reader operator_loc: Location # # source://prism//lib/prism/node.rb#2824 sig { returns(Prism::Location) } def operator_loc; end # attr_reader read_name: Symbol # # source://prism//lib/prism/node.rb#2815 sig { returns(Symbol) } def read_name; end # attr_reader receiver: Node? # # source://prism//lib/prism/node.rb#2788 sig { returns(T.nilable(Prism::Node)) } def receiver; end # def safe_navigation?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#2834 sig { returns(T::Boolean) } def safe_navigation?; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#2899 def type; end # attr_reader value: Node # # source://prism//lib/prism/node.rb#2830 sig { returns(Prism::Node) } def value; end # def variable_call?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#2839 sig { returns(T::Boolean) } def variable_call?; end # attr_reader write_name: Symbol # # source://prism//lib/prism/node.rb#2818 sig { returns(Symbol) } def write_name; end private # private attr_reader flags: Integer # # source://prism//lib/prism/node.rb#2784 sig { returns(Integer) } def flags; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#2909 def type; end end end # Represents the use of the `||=` operator on a call. # # foo.bar ||= value # ^^^^^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#2919 class Prism::CallOrWriteNode < ::Prism::Node # def initialize: (Integer flags, Node? receiver, Location? call_operator_loc, Location? message_loc, Symbol read_name, Symbol write_name, Location operator_loc, Node value, Location location) -> void # # @return [CallOrWriteNode] a new instance of CallOrWriteNode # # source://prism//lib/prism/node.rb#2920 def initialize(source, flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#2935 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def attribute_write?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#3039 sig { returns(T::Boolean) } def attribute_write?; end # def call_operator: () -> String? # # source://prism//lib/prism/node.rb#3049 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # # source://prism//lib/prism/node.rb#2989 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#2940 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#2953 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#2945 def compact_child_nodes; end # def copy: (**params) -> CallOrWriteNode # # source://prism//lib/prism/node.rb#2958 sig { params(params: T.untyped).returns(Prism::CallOrWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#2940 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Node, location: Location } # # source://prism//lib/prism/node.rb#2977 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def ignore_visibility?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#3044 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#3064 def inspect(inspector = T.unsafe(nil)); end # def message: () -> String? # # source://prism//lib/prism/node.rb#3054 sig { returns(T.nilable(String)) } def message; end # attr_reader message_loc: Location? # # source://prism//lib/prism/node.rb#3001 sig { returns(T.nilable(Prism::Location)) } def message_loc; end # def operator: () -> String # # source://prism//lib/prism/node.rb#3059 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism//lib/prism/node.rb#3019 sig { returns(Prism::Location) } def operator_loc; end # attr_reader read_name: Symbol # # source://prism//lib/prism/node.rb#3013 sig { returns(Symbol) } def read_name; end # attr_reader receiver: Node? # # source://prism//lib/prism/node.rb#2986 sig { returns(T.nilable(Prism::Node)) } def receiver; end # def safe_navigation?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#3029 sig { returns(T::Boolean) } def safe_navigation?; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#3098 def type; end # attr_reader value: Node # # source://prism//lib/prism/node.rb#3025 sig { returns(Prism::Node) } def value; end # def variable_call?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#3034 sig { returns(T::Boolean) } def variable_call?; end # attr_reader write_name: Symbol # # source://prism//lib/prism/node.rb#3016 sig { returns(Symbol) } def write_name; end private # private attr_reader flags: Integer # # source://prism//lib/prism/node.rb#2982 sig { returns(Integer) } def flags; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#3108 def type; end end end # Represents assigning to a method call. # # foo.bar, = 1 # ^^^^^^^ # # begin # rescue => foo.bar # ^^^^^^^ # end # # for foo.bar in baz do end # ^^^^^^^ # # source://prism//lib/prism/node.rb#3126 class Prism::CallTargetNode < ::Prism::Node # def initialize: (Integer flags, Node receiver, Location call_operator_loc, Symbol name, Location message_loc, Location location) -> void # # @return [CallTargetNode] a new instance of CallTargetNode # # source://prism//lib/prism/node.rb#3127 def initialize(source, flags, receiver, call_operator_loc, name, message_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#3139 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def attribute_write?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#3213 sig { returns(T::Boolean) } def attribute_write?; end # def call_operator: () -> String # # source://prism//lib/prism/node.rb#3223 sig { returns(String) } def call_operator; end # attr_reader call_operator_loc: Location # # source://prism//lib/prism/node.rb#3187 sig { returns(Prism::Location) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#3144 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#3154 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#3149 def compact_child_nodes; end # def copy: (**params) -> CallTargetNode # # source://prism//lib/prism/node.rb#3159 sig { params(params: T.untyped).returns(Prism::CallTargetNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#3144 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Node, call_operator_loc: Location, name: Symbol, message_loc: Location, location: Location } # # source://prism//lib/prism/node.rb#3175 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def ignore_visibility?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#3218 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#3233 def inspect(inspector = T.unsafe(nil)); end # def message: () -> String # # source://prism//lib/prism/node.rb#3228 sig { returns(String) } def message; end # attr_reader message_loc: Location # # source://prism//lib/prism/node.rb#3196 sig { returns(Prism::Location) } def message_loc; end # attr_reader name: Symbol # # source://prism//lib/prism/node.rb#3193 sig { returns(Symbol) } def name; end # attr_reader receiver: Node # # source://prism//lib/prism/node.rb#3184 sig { returns(Prism::Node) } def receiver; end # def safe_navigation?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#3203 sig { returns(T::Boolean) } def safe_navigation?; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#3259 def type; end # def variable_call?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#3208 sig { returns(T::Boolean) } def variable_call?; end private # private attr_reader flags: Integer # # source://prism//lib/prism/node.rb#3180 sig { returns(Integer) } def flags; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#3269 def type; end end end # Represents assigning to a local variable in pattern matching. # # foo => [bar => baz] # ^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#3279 class Prism::CapturePatternNode < ::Prism::Node # def initialize: (Node value, Node target, Location operator_loc, Location location) -> void # # @return [CapturePatternNode] a new instance of CapturePatternNode # # source://prism//lib/prism/node.rb#3280 def initialize(source, value, target, operator_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#3290 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#3295 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#3305 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#3300 def compact_child_nodes; end # def copy: (**params) -> CapturePatternNode # # source://prism//lib/prism/node.rb#3310 sig { params(params: T.untyped).returns(Prism::CapturePatternNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#3295 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { value: Node, target: Node, operator_loc: Location, location: Location } # # source://prism//lib/prism/node.rb#3324 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#3347 def inspect(inspector = T.unsafe(nil)); end # def operator: () -> String # # source://prism//lib/prism/node.rb#3342 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism//lib/prism/node.rb#3335 sig { returns(Prism::Location) } def operator_loc; end # attr_reader target: Node # # source://prism//lib/prism/node.rb#3332 sig { returns(Prism::Node) } def target; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#3371 def type; end # attr_reader value: Node # # source://prism//lib/prism/node.rb#3329 sig { returns(Prism::Node) } def value; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#3381 def type; end end end # Represents the use of a case statement for pattern matching. # # case true # in false # end # ^^^^^^^^^ # # source://prism//lib/prism/node.rb#3393 class Prism::CaseMatchNode < ::Prism::Node # def initialize: (Node? predicate, Array[Node] conditions, ElseNode? consequent, Location case_keyword_loc, Location end_keyword_loc, Location location) -> void # # @return [CaseMatchNode] a new instance of CaseMatchNode # # source://prism//lib/prism/node.rb#3394 def initialize(source, predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#3406 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def case_keyword: () -> String # # source://prism//lib/prism/node.rb#3473 sig { returns(String) } def case_keyword; end # attr_reader case_keyword_loc: Location # # source://prism//lib/prism/node.rb#3460 sig { returns(Prism::Location) } def case_keyword_loc; end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#3411 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#3425 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#3416 def compact_child_nodes; end # attr_reader conditions: Array[Node] # # source://prism//lib/prism/node.rb#3454 sig { returns(T::Array[Prism::Node]) } def conditions; end # attr_reader consequent: ElseNode? # # source://prism//lib/prism/node.rb#3457 sig { returns(T.nilable(Prism::ElseNode)) } def consequent; end # def copy: (**params) -> CaseMatchNode # # source://prism//lib/prism/node.rb#3430 sig { params(params: T.untyped).returns(Prism::CaseMatchNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#3411 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { predicate: Node?, conditions: Array[Node], consequent: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location, location: Location } # # source://prism//lib/prism/node.rb#3446 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def end_keyword: () -> String # # source://prism//lib/prism/node.rb#3478 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # # source://prism//lib/prism/node.rb#3466 sig { returns(Prism::Location) } def end_keyword_loc; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#3483 def inspect(inspector = T.unsafe(nil)); end # attr_reader predicate: Node? # # source://prism//lib/prism/node.rb#3451 sig { returns(T.nilable(Prism::Node)) } def predicate; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#3517 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#3527 def type; end end end # Represents the use of a case statement. # # case true # when false # end # ^^^^^^^^^^ # # source://prism//lib/prism/node.rb#3539 class Prism::CaseNode < ::Prism::Node # def initialize: (Node? predicate, Array[Node] conditions, ElseNode? consequent, Location case_keyword_loc, Location end_keyword_loc, Location location) -> void # # @return [CaseNode] a new instance of CaseNode # # source://prism//lib/prism/node.rb#3540 def initialize(source, predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#3552 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def case_keyword: () -> String # # source://prism//lib/prism/node.rb#3619 sig { returns(String) } def case_keyword; end # attr_reader case_keyword_loc: Location # # source://prism//lib/prism/node.rb#3606 sig { returns(Prism::Location) } def case_keyword_loc; end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#3557 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#3571 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#3562 def compact_child_nodes; end # attr_reader conditions: Array[Node] # # source://prism//lib/prism/node.rb#3600 sig { returns(T::Array[Prism::Node]) } def conditions; end # attr_reader consequent: ElseNode? # # source://prism//lib/prism/node.rb#3603 sig { returns(T.nilable(Prism::ElseNode)) } def consequent; end # def copy: (**params) -> CaseNode # # source://prism//lib/prism/node.rb#3576 sig { params(params: T.untyped).returns(Prism::CaseNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#3557 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { predicate: Node?, conditions: Array[Node], consequent: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location, location: Location } # # source://prism//lib/prism/node.rb#3592 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def end_keyword: () -> String # # source://prism//lib/prism/node.rb#3624 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # # source://prism//lib/prism/node.rb#3612 sig { returns(Prism::Location) } def end_keyword_loc; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#3629 def inspect(inspector = T.unsafe(nil)); end # attr_reader predicate: Node? # # source://prism//lib/prism/node.rb#3597 sig { returns(T.nilable(Prism::Node)) } def predicate; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#3663 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#3673 def type; end end end # Represents a class declaration involving the `class` keyword. # # class Foo end # ^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#3683 class Prism::ClassNode < ::Prism::Node # def initialize: (Array[Symbol] locals, Location class_keyword_loc, Node constant_path, Location? inheritance_operator_loc, Node? superclass, Node? body, Location end_keyword_loc, Symbol name, Location location) -> void # # @return [ClassNode] a new instance of ClassNode # # source://prism//lib/prism/node.rb#3684 def initialize(source, locals, class_keyword_loc, constant_path, inheritance_operator_loc, superclass, body, end_keyword_loc, name, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#3699 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # attr_reader body: Node? # # source://prism//lib/prism/node.rb#3774 sig { returns(T.nilable(Prism::Node)) } def body; end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#3704 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def class_keyword: () -> String # # source://prism//lib/prism/node.rb#3787 sig { returns(String) } def class_keyword; end # attr_reader class_keyword_loc: Location # # source://prism//lib/prism/node.rb#3750 sig { returns(Prism::Location) } def class_keyword_loc; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#3718 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#3709 def compact_child_nodes; end # attr_reader constant_path: Node # # source://prism//lib/prism/node.rb#3756 sig { returns(Prism::Node) } def constant_path; end # def copy: (**params) -> ClassNode # # source://prism//lib/prism/node.rb#3723 sig { params(params: T.untyped).returns(Prism::ClassNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#3704 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], class_keyword_loc: Location, constant_path: Node, inheritance_operator_loc: Location?, superclass: Node?, body: Node?, end_keyword_loc: Location, name: Symbol, location: Location } # # source://prism//lib/prism/node.rb#3742 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def end_keyword: () -> String # # source://prism//lib/prism/node.rb#3797 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # # source://prism//lib/prism/node.rb#3777 sig { returns(Prism::Location) } def end_keyword_loc; end # def inheritance_operator: () -> String? # # source://prism//lib/prism/node.rb#3792 sig { returns(T.nilable(String)) } def inheritance_operator; end # attr_reader inheritance_operator_loc: Location? # # source://prism//lib/prism/node.rb#3759 sig { returns(T.nilable(Prism::Location)) } def inheritance_operator_loc; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#3802 def inspect(inspector = T.unsafe(nil)); end # attr_reader locals: Array[Symbol] # # source://prism//lib/prism/node.rb#3747 sig { returns(T::Array[Symbol]) } def locals; end # attr_reader name: Symbol # # source://prism//lib/prism/node.rb#3783 sig { returns(Symbol) } def name; end # attr_reader superclass: Node? # # source://prism//lib/prism/node.rb#3771 sig { returns(T.nilable(Prism::Node)) } def superclass; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#3840 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#3850 def type; end end end # Represents the use of the `&&=` operator for assignment to a class variable. # # @@target &&= value # ^^^^^^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#3860 class Prism::ClassVariableAndWriteNode < ::Prism::Node # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Location location) -> void # # @return [ClassVariableAndWriteNode] a new instance of ClassVariableAndWriteNode # # source://prism//lib/prism/node.rb#3861 def initialize(source, name, name_loc, operator_loc, value, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#3872 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#3877 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#3887 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#3882 def compact_child_nodes; end # def copy: (**params) -> ClassVariableAndWriteNode # # source://prism//lib/prism/node.rb#3892 sig { params(params: T.untyped).returns(Prism::ClassVariableAndWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#3877 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location } # # source://prism//lib/prism/node.rb#3907 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # source://prism//lib/prism/desugar_compiler.rb#125 def desugar; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#3936 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # # source://prism//lib/prism/node.rb#3912 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # # source://prism//lib/prism/node.rb#3915 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # # source://prism//lib/prism/node.rb#3931 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism//lib/prism/node.rb#3921 sig { returns(Prism::Location) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#3960 def type; end # attr_reader value: Node # # source://prism//lib/prism/node.rb#3927 sig { returns(Prism::Node) } def value; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#3970 def type; end end end # Represents assigning to a class variable using an operator that isn't `=`. # # @@target += value # ^^^^^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#3980 class Prism::ClassVariableOperatorWriteNode < ::Prism::Node # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Symbol operator, Location location) -> void # # @return [ClassVariableOperatorWriteNode] a new instance of ClassVariableOperatorWriteNode # # source://prism//lib/prism/node.rb#3981 def initialize(source, name, name_loc, operator_loc, value, operator, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#3993 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#3998 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#4008 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#4003 def compact_child_nodes; end # def copy: (**params) -> ClassVariableOperatorWriteNode # # source://prism//lib/prism/node.rb#4013 sig { params(params: T.untyped).returns(Prism::ClassVariableOperatorWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#3998 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location } # # source://prism//lib/prism/node.rb#4029 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # source://prism//lib/prism/desugar_compiler.rb#137 def desugar; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#4056 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # # source://prism//lib/prism/node.rb#4034 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # # source://prism//lib/prism/node.rb#4037 sig { returns(Prism::Location) } def name_loc; end # attr_reader operator: Symbol # # source://prism//lib/prism/node.rb#4052 sig { returns(Symbol) } def operator; end # attr_reader operator_loc: Location # # source://prism//lib/prism/node.rb#4043 sig { returns(Prism::Location) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#4081 def type; end # attr_reader value: Node # # source://prism//lib/prism/node.rb#4049 sig { returns(Prism::Node) } def value; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#4091 def type; end end end # Represents the use of the `||=` operator for assignment to a class variable. # # @@target ||= value # ^^^^^^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#4101 class Prism::ClassVariableOrWriteNode < ::Prism::Node # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Location location) -> void # # @return [ClassVariableOrWriteNode] a new instance of ClassVariableOrWriteNode # # source://prism//lib/prism/node.rb#4102 def initialize(source, name, name_loc, operator_loc, value, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#4113 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#4118 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#4128 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#4123 def compact_child_nodes; end # def copy: (**params) -> ClassVariableOrWriteNode # # source://prism//lib/prism/node.rb#4133 sig { params(params: T.untyped).returns(Prism::ClassVariableOrWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#4118 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location } # # source://prism//lib/prism/node.rb#4148 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # source://prism//lib/prism/desugar_compiler.rb#131 def desugar; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#4177 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # # source://prism//lib/prism/node.rb#4153 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # # source://prism//lib/prism/node.rb#4156 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # # source://prism//lib/prism/node.rb#4172 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism//lib/prism/node.rb#4162 sig { returns(Prism::Location) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#4201 def type; end # attr_reader value: Node # # source://prism//lib/prism/node.rb#4168 sig { returns(Prism::Node) } def value; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#4211 def type; end end end # Represents referencing a class variable. # # @@foo # ^^^^^ # # source://prism//lib/prism/node.rb#4221 class Prism::ClassVariableReadNode < ::Prism::Node # def initialize: (Symbol name, Location location) -> void # # @return [ClassVariableReadNode] a new instance of ClassVariableReadNode # # source://prism//lib/prism/node.rb#4222 def initialize(source, name, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#4230 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#4235 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#4245 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#4240 def compact_child_nodes; end # def copy: (**params) -> ClassVariableReadNode # # source://prism//lib/prism/node.rb#4250 sig { params(params: T.untyped).returns(Prism::ClassVariableReadNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#4235 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } # # source://prism//lib/prism/node.rb#4262 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#4275 def inspect(inspector = T.unsafe(nil)); end # The name of the class variable, which is a `@@` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers). # # @@abc # name `:@@abc` # # @@_test # name `:@@_test` # # source://prism//lib/prism/node.rb#4271 sig { returns(Symbol) } def name; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#4295 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#4305 def type; end end end # Represents writing to a class variable in a context that doesn't have an explicit value. # # @@foo, @@bar = baz # ^^^^^ ^^^^^ # # source://prism//lib/prism/node.rb#4315 class Prism::ClassVariableTargetNode < ::Prism::Node # def initialize: (Symbol name, Location location) -> void # # @return [ClassVariableTargetNode] a new instance of ClassVariableTargetNode # # source://prism//lib/prism/node.rb#4316 def initialize(source, name, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#4324 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#4329 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#4339 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#4334 def compact_child_nodes; end # def copy: (**params) -> ClassVariableTargetNode # # source://prism//lib/prism/node.rb#4344 sig { params(params: T.untyped).returns(Prism::ClassVariableTargetNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#4329 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } # # source://prism//lib/prism/node.rb#4356 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#4365 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # # source://prism//lib/prism/node.rb#4361 sig { returns(Symbol) } def name; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#4385 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#4395 def type; end end end # Represents writing to a class variable. # # @@foo = 1 # ^^^^^^^^^ # # source://prism//lib/prism/node.rb#4405 class Prism::ClassVariableWriteNode < ::Prism::Node # def initialize: (Symbol name, Location name_loc, Node value, Location? operator_loc, Location location) -> void # # @return [ClassVariableWriteNode] a new instance of ClassVariableWriteNode # # source://prism//lib/prism/node.rb#4406 def initialize(source, name, name_loc, value, operator_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#4417 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#4422 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#4432 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#4427 def compact_child_nodes; end # def copy: (**params) -> ClassVariableWriteNode # # source://prism//lib/prism/node.rb#4437 sig { params(params: T.untyped).returns(Prism::ClassVariableWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#4422 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, value: Node, operator_loc: Location?, location: Location } # # source://prism//lib/prism/node.rb#4452 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#4487 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # # source://prism//lib/prism/node.rb#4457 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # # source://prism//lib/prism/node.rb#4460 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String? # # source://prism//lib/prism/node.rb#4482 sig { returns(T.nilable(String)) } def operator; end # attr_reader operator_loc: Location? # # source://prism//lib/prism/node.rb#4469 sig { returns(T.nilable(Prism::Location)) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#4511 def type; end # attr_reader value: Node # # source://prism//lib/prism/node.rb#4466 sig { returns(Prism::Node) } def value; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#4521 def type; end end end # This represents a comment that was encountered during parsing. It is the # base class for all comment types. # # source://prism//lib/prism/parse_result.rb#258 class Prism::Comment # Create a new comment object with the given location. # # @return [Comment] a new instance of Comment # # source://prism//lib/prism/parse_result.rb#263 def initialize(location); end # Implement the hash pattern matching interface for Comment. # # source://prism//lib/prism/parse_result.rb#268 def deconstruct_keys(keys); end # The location of this comment in the source. # # source://prism//lib/prism/parse_result.rb#260 sig { returns(Prism::Location) } def location; end sig { returns(T::Boolean) } def trailing?; end end # A compiler is a visitor that returns the value of each node as it visits. # This is as opposed to a visitor which will only walk the tree. This can be # useful when you are trying to compile a tree into a different format. # # For example, to build a representation of the tree as s-expressions, you # could write: # # class SExpressions < Prism::Compiler # def visit_arguments_node(node) = [:arguments, super] # def visit_call_node(node) = [:call, super] # def visit_integer_node(node) = [:integer] # def visit_program_node(node) = [:program, super] # end # # Prism.parse("1 + 2").value.accept(SExpressions.new) # # => [:program, [[[:call, [[:integer], [:arguments, [[:integer]]]]]]]] # # source://prism//lib/prism/compiler.rb#26 class Prism::Compiler # Visit an individual node. # # source://prism//lib/prism/compiler.rb#28 def visit(node); end # Visit the child nodes of the given node. # Compile a AliasGlobalVariableNode node # # source://prism//lib/prism/compiler.rb#38 def visit_alias_global_variable_node(node); end # Visit the child nodes of the given node. # Compile a AliasMethodNode node # # source://prism//lib/prism/compiler.rb#38 def visit_alias_method_node(node); end # Visit a list of nodes. # # source://prism//lib/prism/compiler.rb#33 def visit_all(nodes); end # Visit the child nodes of the given node. # Compile a AlternationPatternNode node # # source://prism//lib/prism/compiler.rb#38 def visit_alternation_pattern_node(node); end # Visit the child nodes of the given node. # Compile a AndNode node # # source://prism//lib/prism/compiler.rb#38 def visit_and_node(node); end # Visit the child nodes of the given node. # Compile a ArgumentsNode node # # source://prism//lib/prism/compiler.rb#38 def visit_arguments_node(node); end # Visit the child nodes of the given node. # Compile a ArrayNode node # # source://prism//lib/prism/compiler.rb#38 def visit_array_node(node); end # Visit the child nodes of the given node. # Compile a ArrayPatternNode node # # source://prism//lib/prism/compiler.rb#38 def visit_array_pattern_node(node); end # Visit the child nodes of the given node. # Compile a AssocNode node # # source://prism//lib/prism/compiler.rb#38 def visit_assoc_node(node); end # Visit the child nodes of the given node. # Compile a AssocSplatNode node # # source://prism//lib/prism/compiler.rb#38 def visit_assoc_splat_node(node); end # Visit the child nodes of the given node. # Compile a BackReferenceReadNode node # # source://prism//lib/prism/compiler.rb#38 def visit_back_reference_read_node(node); end # Visit the child nodes of the given node. # Compile a BeginNode node # # source://prism//lib/prism/compiler.rb#38 def visit_begin_node(node); end # Visit the child nodes of the given node. # Compile a BlockArgumentNode node # # source://prism//lib/prism/compiler.rb#38 def visit_block_argument_node(node); end # Visit the child nodes of the given node. # Compile a BlockLocalVariableNode node # # source://prism//lib/prism/compiler.rb#38 def visit_block_local_variable_node(node); end # Visit the child nodes of the given node. # Compile a BlockNode node # # source://prism//lib/prism/compiler.rb#38 def visit_block_node(node); end # Visit the child nodes of the given node. # Compile a BlockParameterNode node # # source://prism//lib/prism/compiler.rb#38 def visit_block_parameter_node(node); end # Visit the child nodes of the given node. # Compile a BlockParametersNode node # # source://prism//lib/prism/compiler.rb#38 def visit_block_parameters_node(node); end # Visit the child nodes of the given node. # Compile a BreakNode node # # source://prism//lib/prism/compiler.rb#38 def visit_break_node(node); end # Visit the child nodes of the given node. # Compile a CallAndWriteNode node # # source://prism//lib/prism/compiler.rb#38 def visit_call_and_write_node(node); end # Visit the child nodes of the given node. # Compile a CallNode node # # source://prism//lib/prism/compiler.rb#38 def visit_call_node(node); end # Visit the child nodes of the given node. # Compile a CallOperatorWriteNode node # # source://prism//lib/prism/compiler.rb#38 def visit_call_operator_write_node(node); end # Visit the child nodes of the given node. # Compile a CallOrWriteNode node # # source://prism//lib/prism/compiler.rb#38 def visit_call_or_write_node(node); end # Visit the child nodes of the given node. # Compile a CallTargetNode node # # source://prism//lib/prism/compiler.rb#38 def visit_call_target_node(node); end # Visit the child nodes of the given node. # Compile a CapturePatternNode node # # source://prism//lib/prism/compiler.rb#38 def visit_capture_pattern_node(node); end # Visit the child nodes of the given node. # Compile a CaseMatchNode node # # source://prism//lib/prism/compiler.rb#38 def visit_case_match_node(node); end # Visit the child nodes of the given node. # Compile a CaseNode node # # source://prism//lib/prism/compiler.rb#38 def visit_case_node(node); end # Visit the child nodes of the given node. # # source://prism//lib/prism/compiler.rb#38 def visit_child_nodes(node); end # Visit the child nodes of the given node. # Compile a ClassNode node # # source://prism//lib/prism/compiler.rb#38 def visit_class_node(node); end # Visit the child nodes of the given node. # Compile a ClassVariableAndWriteNode node # # source://prism//lib/prism/compiler.rb#38 def visit_class_variable_and_write_node(node); end # Visit the child nodes of the given node. # Compile a ClassVariableOperatorWriteNode node # # source://prism//lib/prism/compiler.rb#38 def visit_class_variable_operator_write_node(node); end # Visit the child nodes of the given node. # Compile a ClassVariableOrWriteNode node # # source://prism//lib/prism/compiler.rb#38 def visit_class_variable_or_write_node(node); end # Visit the child nodes of the given node. # Compile a ClassVariableReadNode node # # source://prism//lib/prism/compiler.rb#38 def visit_class_variable_read_node(node); end # Visit the child nodes of the given node. # Compile a ClassVariableTargetNode node # # source://prism//lib/prism/compiler.rb#38 def visit_class_variable_target_node(node); end # Visit the child nodes of the given node. # Compile a ClassVariableWriteNode node # # source://prism//lib/prism/compiler.rb#38 def visit_class_variable_write_node(node); end # Visit the child nodes of the given node. # Compile a ConstantAndWriteNode node # # source://prism//lib/prism/compiler.rb#38 def visit_constant_and_write_node(node); end # Visit the child nodes of the given node. # Compile a ConstantOperatorWriteNode node # # source://prism//lib/prism/compiler.rb#38 def visit_constant_operator_write_node(node); end # Visit the child nodes of the given node. # Compile a ConstantOrWriteNode node # # source://prism//lib/prism/compiler.rb#38 def visit_constant_or_write_node(node); end # Visit the child nodes of the given node. # Compile a ConstantPathAndWriteNode node # # source://prism//lib/prism/compiler.rb#38 def visit_constant_path_and_write_node(node); end # Visit the child nodes of the given node. # Compile a ConstantPathNode node # # source://prism//lib/prism/compiler.rb#38 def visit_constant_path_node(node); end # Visit the child nodes of the given node. # Compile a ConstantPathOperatorWriteNode node # # source://prism//lib/prism/compiler.rb#38 def visit_constant_path_operator_write_node(node); end # Visit the child nodes of the given node. # Compile a ConstantPathOrWriteNode node # # source://prism//lib/prism/compiler.rb#38 def visit_constant_path_or_write_node(node); end # Visit the child nodes of the given node. # Compile a ConstantPathTargetNode node # # source://prism//lib/prism/compiler.rb#38 def visit_constant_path_target_node(node); end # Visit the child nodes of the given node. # Compile a ConstantPathWriteNode node # # source://prism//lib/prism/compiler.rb#38 def visit_constant_path_write_node(node); end # Visit the child nodes of the given node. # Compile a ConstantReadNode node # # source://prism//lib/prism/compiler.rb#38 def visit_constant_read_node(node); end # Visit the child nodes of the given node. # Compile a ConstantTargetNode node # # source://prism//lib/prism/compiler.rb#38 def visit_constant_target_node(node); end # Visit the child nodes of the given node. # Compile a ConstantWriteNode node # # source://prism//lib/prism/compiler.rb#38 def visit_constant_write_node(node); end # Visit the child nodes of the given node. # Compile a DefNode node # # source://prism//lib/prism/compiler.rb#38 def visit_def_node(node); end # Visit the child nodes of the given node. # Compile a DefinedNode node # # source://prism//lib/prism/compiler.rb#38 def visit_defined_node(node); end # Visit the child nodes of the given node. # Compile a ElseNode node # # source://prism//lib/prism/compiler.rb#38 def visit_else_node(node); end # Visit the child nodes of the given node. # Compile a EmbeddedStatementsNode node # # source://prism//lib/prism/compiler.rb#38 def visit_embedded_statements_node(node); end # Visit the child nodes of the given node. # Compile a EmbeddedVariableNode node # # source://prism//lib/prism/compiler.rb#38 def visit_embedded_variable_node(node); end # Visit the child nodes of the given node. # Compile a EnsureNode node # # source://prism//lib/prism/compiler.rb#38 def visit_ensure_node(node); end # Visit the child nodes of the given node. # Compile a FalseNode node # # source://prism//lib/prism/compiler.rb#38 def visit_false_node(node); end # Visit the child nodes of the given node. # Compile a FindPatternNode node # # source://prism//lib/prism/compiler.rb#38 def visit_find_pattern_node(node); end # Visit the child nodes of the given node. # Compile a FlipFlopNode node # # source://prism//lib/prism/compiler.rb#38 def visit_flip_flop_node(node); end # Visit the child nodes of the given node. # Compile a FloatNode node # # source://prism//lib/prism/compiler.rb#38 def visit_float_node(node); end # Visit the child nodes of the given node. # Compile a ForNode node # # source://prism//lib/prism/compiler.rb#38 def visit_for_node(node); end # Visit the child nodes of the given node. # Compile a ForwardingArgumentsNode node # # source://prism//lib/prism/compiler.rb#38 def visit_forwarding_arguments_node(node); end # Visit the child nodes of the given node. # Compile a ForwardingParameterNode node # # source://prism//lib/prism/compiler.rb#38 def visit_forwarding_parameter_node(node); end # Visit the child nodes of the given node. # Compile a ForwardingSuperNode node # # source://prism//lib/prism/compiler.rb#38 def visit_forwarding_super_node(node); end # Visit the child nodes of the given node. # Compile a GlobalVariableAndWriteNode node # # source://prism//lib/prism/compiler.rb#38 def visit_global_variable_and_write_node(node); end # Visit the child nodes of the given node. # Compile a GlobalVariableOperatorWriteNode node # # source://prism//lib/prism/compiler.rb#38 def visit_global_variable_operator_write_node(node); end # Visit the child nodes of the given node. # Compile a GlobalVariableOrWriteNode node # # source://prism//lib/prism/compiler.rb#38 def visit_global_variable_or_write_node(node); end # Visit the child nodes of the given node. # Compile a GlobalVariableReadNode node # # source://prism//lib/prism/compiler.rb#38 def visit_global_variable_read_node(node); end # Visit the child nodes of the given node. # Compile a GlobalVariableTargetNode node # # source://prism//lib/prism/compiler.rb#38 def visit_global_variable_target_node(node); end # Visit the child nodes of the given node. # Compile a GlobalVariableWriteNode node # # source://prism//lib/prism/compiler.rb#38 def visit_global_variable_write_node(node); end # Visit the child nodes of the given node. # Compile a HashNode node # # source://prism//lib/prism/compiler.rb#38 def visit_hash_node(node); end # Visit the child nodes of the given node. # Compile a HashPatternNode node # # source://prism//lib/prism/compiler.rb#38 def visit_hash_pattern_node(node); end # Visit the child nodes of the given node. # Compile a IfNode node # # source://prism//lib/prism/compiler.rb#38 def visit_if_node(node); end # Visit the child nodes of the given node. # Compile a ImaginaryNode node # # source://prism//lib/prism/compiler.rb#38 def visit_imaginary_node(node); end # Visit the child nodes of the given node. # Compile a ImplicitNode node # # source://prism//lib/prism/compiler.rb#38 def visit_implicit_node(node); end # Visit the child nodes of the given node. # Compile a ImplicitRestNode node # # source://prism//lib/prism/compiler.rb#38 def visit_implicit_rest_node(node); end # Visit the child nodes of the given node. # Compile a InNode node # # source://prism//lib/prism/compiler.rb#38 def visit_in_node(node); end # Visit the child nodes of the given node. # Compile a IndexAndWriteNode node # # source://prism//lib/prism/compiler.rb#38 def visit_index_and_write_node(node); end # Visit the child nodes of the given node. # Compile a IndexOperatorWriteNode node # # source://prism//lib/prism/compiler.rb#38 def visit_index_operator_write_node(node); end # Visit the child nodes of the given node. # Compile a IndexOrWriteNode node # # source://prism//lib/prism/compiler.rb#38 def visit_index_or_write_node(node); end # Visit the child nodes of the given node. # Compile a IndexTargetNode node # # source://prism//lib/prism/compiler.rb#38 def visit_index_target_node(node); end # Visit the child nodes of the given node. # Compile a InstanceVariableAndWriteNode node # # source://prism//lib/prism/compiler.rb#38 def visit_instance_variable_and_write_node(node); end # Visit the child nodes of the given node. # Compile a InstanceVariableOperatorWriteNode node # # source://prism//lib/prism/compiler.rb#38 def visit_instance_variable_operator_write_node(node); end # Visit the child nodes of the given node. # Compile a InstanceVariableOrWriteNode node # # source://prism//lib/prism/compiler.rb#38 def visit_instance_variable_or_write_node(node); end # Visit the child nodes of the given node. # Compile a InstanceVariableReadNode node # # source://prism//lib/prism/compiler.rb#38 def visit_instance_variable_read_node(node); end # Visit the child nodes of the given node. # Compile a InstanceVariableTargetNode node # # source://prism//lib/prism/compiler.rb#38 def visit_instance_variable_target_node(node); end # Visit the child nodes of the given node. # Compile a InstanceVariableWriteNode node # # source://prism//lib/prism/compiler.rb#38 def visit_instance_variable_write_node(node); end # Visit the child nodes of the given node. # Compile a IntegerNode node # # source://prism//lib/prism/compiler.rb#38 def visit_integer_node(node); end # Visit the child nodes of the given node. # Compile a InterpolatedMatchLastLineNode node # # source://prism//lib/prism/compiler.rb#38 def visit_interpolated_match_last_line_node(node); end # Visit the child nodes of the given node. # Compile a InterpolatedRegularExpressionNode node # # source://prism//lib/prism/compiler.rb#38 def visit_interpolated_regular_expression_node(node); end # Visit the child nodes of the given node. # Compile a InterpolatedStringNode node # # source://prism//lib/prism/compiler.rb#38 def visit_interpolated_string_node(node); end # Visit the child nodes of the given node. # Compile a InterpolatedSymbolNode node # # source://prism//lib/prism/compiler.rb#38 def visit_interpolated_symbol_node(node); end # Visit the child nodes of the given node. # Compile a InterpolatedXStringNode node # # source://prism//lib/prism/compiler.rb#38 def visit_interpolated_x_string_node(node); end # Visit the child nodes of the given node. # Compile a KeywordHashNode node # # source://prism//lib/prism/compiler.rb#38 def visit_keyword_hash_node(node); end # Visit the child nodes of the given node. # Compile a KeywordRestParameterNode node # # source://prism//lib/prism/compiler.rb#38 def visit_keyword_rest_parameter_node(node); end # Visit the child nodes of the given node. # Compile a LambdaNode node # # source://prism//lib/prism/compiler.rb#38 def visit_lambda_node(node); end # Visit the child nodes of the given node. # Compile a LocalVariableAndWriteNode node # # source://prism//lib/prism/compiler.rb#38 def visit_local_variable_and_write_node(node); end # Visit the child nodes of the given node. # Compile a LocalVariableOperatorWriteNode node # # source://prism//lib/prism/compiler.rb#38 def visit_local_variable_operator_write_node(node); end # Visit the child nodes of the given node. # Compile a LocalVariableOrWriteNode node # # source://prism//lib/prism/compiler.rb#38 def visit_local_variable_or_write_node(node); end # Visit the child nodes of the given node. # Compile a LocalVariableReadNode node # # source://prism//lib/prism/compiler.rb#38 def visit_local_variable_read_node(node); end # Visit the child nodes of the given node. # Compile a LocalVariableTargetNode node # # source://prism//lib/prism/compiler.rb#38 def visit_local_variable_target_node(node); end # Visit the child nodes of the given node. # Compile a LocalVariableWriteNode node # # source://prism//lib/prism/compiler.rb#38 def visit_local_variable_write_node(node); end # Visit the child nodes of the given node. # Compile a MatchLastLineNode node # # source://prism//lib/prism/compiler.rb#38 def visit_match_last_line_node(node); end # Visit the child nodes of the given node. # Compile a MatchPredicateNode node # # source://prism//lib/prism/compiler.rb#38 def visit_match_predicate_node(node); end # Visit the child nodes of the given node. # Compile a MatchRequiredNode node # # source://prism//lib/prism/compiler.rb#38 def visit_match_required_node(node); end # Visit the child nodes of the given node. # Compile a MatchWriteNode node # # source://prism//lib/prism/compiler.rb#38 def visit_match_write_node(node); end # Visit the child nodes of the given node. # Compile a MissingNode node # # source://prism//lib/prism/compiler.rb#38 def visit_missing_node(node); end # Visit the child nodes of the given node. # Compile a ModuleNode node # # source://prism//lib/prism/compiler.rb#38 def visit_module_node(node); end # Visit the child nodes of the given node. # Compile a MultiTargetNode node # # source://prism//lib/prism/compiler.rb#38 def visit_multi_target_node(node); end # Visit the child nodes of the given node. # Compile a MultiWriteNode node # # source://prism//lib/prism/compiler.rb#38 def visit_multi_write_node(node); end # Visit the child nodes of the given node. # Compile a NextNode node # # source://prism//lib/prism/compiler.rb#38 def visit_next_node(node); end # Visit the child nodes of the given node. # Compile a NilNode node # # source://prism//lib/prism/compiler.rb#38 def visit_nil_node(node); end # Visit the child nodes of the given node. # Compile a NoKeywordsParameterNode node # # source://prism//lib/prism/compiler.rb#38 def visit_no_keywords_parameter_node(node); end # Visit the child nodes of the given node. # Compile a NumberedParametersNode node # # source://prism//lib/prism/compiler.rb#38 def visit_numbered_parameters_node(node); end # Visit the child nodes of the given node. # Compile a NumberedReferenceReadNode node # # source://prism//lib/prism/compiler.rb#38 def visit_numbered_reference_read_node(node); end # Visit the child nodes of the given node. # Compile a OptionalKeywordParameterNode node # # source://prism//lib/prism/compiler.rb#38 def visit_optional_keyword_parameter_node(node); end # Visit the child nodes of the given node. # Compile a OptionalParameterNode node # # source://prism//lib/prism/compiler.rb#38 def visit_optional_parameter_node(node); end # Visit the child nodes of the given node. # Compile a OrNode node # # source://prism//lib/prism/compiler.rb#38 def visit_or_node(node); end # Visit the child nodes of the given node. # Compile a ParametersNode node # # source://prism//lib/prism/compiler.rb#38 def visit_parameters_node(node); end # Visit the child nodes of the given node. # Compile a ParenthesesNode node # # source://prism//lib/prism/compiler.rb#38 def visit_parentheses_node(node); end # Visit the child nodes of the given node. # Compile a PinnedExpressionNode node # # source://prism//lib/prism/compiler.rb#38 def visit_pinned_expression_node(node); end # Visit the child nodes of the given node. # Compile a PinnedVariableNode node # # source://prism//lib/prism/compiler.rb#38 def visit_pinned_variable_node(node); end # Visit the child nodes of the given node. # Compile a PostExecutionNode node # # source://prism//lib/prism/compiler.rb#38 def visit_post_execution_node(node); end # Visit the child nodes of the given node. # Compile a PreExecutionNode node # # source://prism//lib/prism/compiler.rb#38 def visit_pre_execution_node(node); end # Visit the child nodes of the given node. # Compile a ProgramNode node # # source://prism//lib/prism/compiler.rb#38 def visit_program_node(node); end # Visit the child nodes of the given node. # Compile a RangeNode node # # source://prism//lib/prism/compiler.rb#38 def visit_range_node(node); end # Visit the child nodes of the given node. # Compile a RationalNode node # # source://prism//lib/prism/compiler.rb#38 def visit_rational_node(node); end # Visit the child nodes of the given node. # Compile a RedoNode node # # source://prism//lib/prism/compiler.rb#38 def visit_redo_node(node); end # Visit the child nodes of the given node. # Compile a RegularExpressionNode node # # source://prism//lib/prism/compiler.rb#38 def visit_regular_expression_node(node); end # Visit the child nodes of the given node. # Compile a RequiredKeywordParameterNode node # # source://prism//lib/prism/compiler.rb#38 def visit_required_keyword_parameter_node(node); end # Visit the child nodes of the given node. # Compile a RequiredParameterNode node # # source://prism//lib/prism/compiler.rb#38 def visit_required_parameter_node(node); end # Visit the child nodes of the given node. # Compile a RescueModifierNode node # # source://prism//lib/prism/compiler.rb#38 def visit_rescue_modifier_node(node); end # Visit the child nodes of the given node. # Compile a RescueNode node # # source://prism//lib/prism/compiler.rb#38 def visit_rescue_node(node); end # Visit the child nodes of the given node. # Compile a RestParameterNode node # # source://prism//lib/prism/compiler.rb#38 def visit_rest_parameter_node(node); end # Visit the child nodes of the given node. # Compile a RetryNode node # # source://prism//lib/prism/compiler.rb#38 def visit_retry_node(node); end # Visit the child nodes of the given node. # Compile a ReturnNode node # # source://prism//lib/prism/compiler.rb#38 def visit_return_node(node); end # Visit the child nodes of the given node. # Compile a SelfNode node # # source://prism//lib/prism/compiler.rb#38 def visit_self_node(node); end # Visit the child nodes of the given node. # Compile a SingletonClassNode node # # source://prism//lib/prism/compiler.rb#38 def visit_singleton_class_node(node); end # Visit the child nodes of the given node. # Compile a SourceEncodingNode node # # source://prism//lib/prism/compiler.rb#38 def visit_source_encoding_node(node); end # Visit the child nodes of the given node. # Compile a SourceFileNode node # # source://prism//lib/prism/compiler.rb#38 def visit_source_file_node(node); end # Visit the child nodes of the given node. # Compile a SourceLineNode node # # source://prism//lib/prism/compiler.rb#38 def visit_source_line_node(node); end # Visit the child nodes of the given node. # Compile a SplatNode node # # source://prism//lib/prism/compiler.rb#38 def visit_splat_node(node); end # Visit the child nodes of the given node. # Compile a StatementsNode node # # source://prism//lib/prism/compiler.rb#38 def visit_statements_node(node); end # Visit the child nodes of the given node. # Compile a StringNode node # # source://prism//lib/prism/compiler.rb#38 def visit_string_node(node); end # Visit the child nodes of the given node. # Compile a SuperNode node # # source://prism//lib/prism/compiler.rb#38 def visit_super_node(node); end # Visit the child nodes of the given node. # Compile a SymbolNode node # # source://prism//lib/prism/compiler.rb#38 def visit_symbol_node(node); end # Visit the child nodes of the given node. # Compile a TrueNode node # # source://prism//lib/prism/compiler.rb#38 def visit_true_node(node); end # Visit the child nodes of the given node. # Compile a UndefNode node # # source://prism//lib/prism/compiler.rb#38 def visit_undef_node(node); end # Visit the child nodes of the given node. # Compile a UnlessNode node # # source://prism//lib/prism/compiler.rb#38 def visit_unless_node(node); end # Visit the child nodes of the given node. # Compile a UntilNode node # # source://prism//lib/prism/compiler.rb#38 def visit_until_node(node); end # Visit the child nodes of the given node. # Compile a WhenNode node # # source://prism//lib/prism/compiler.rb#38 def visit_when_node(node); end # Visit the child nodes of the given node. # Compile a WhileNode node # # source://prism//lib/prism/compiler.rb#38 def visit_while_node(node); end # Visit the child nodes of the given node. # Compile a XStringNode node # # source://prism//lib/prism/compiler.rb#38 def visit_x_string_node(node); end # Visit the child nodes of the given node. # Compile a YieldNode node # # source://prism//lib/prism/compiler.rb#38 def visit_yield_node(node); end end # Represents the use of the `&&=` operator for assignment to a constant. # # Target &&= value # ^^^^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#4531 class Prism::ConstantAndWriteNode < ::Prism::Node # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Location location) -> void # # @return [ConstantAndWriteNode] a new instance of ConstantAndWriteNode # # source://prism//lib/prism/node.rb#4532 def initialize(source, name, name_loc, operator_loc, value, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#4543 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#4548 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#4558 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#4553 def compact_child_nodes; end # def copy: (**params) -> ConstantAndWriteNode # # source://prism//lib/prism/node.rb#4563 sig { params(params: T.untyped).returns(Prism::ConstantAndWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#4548 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location } # # source://prism//lib/prism/node.rb#4578 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # source://prism//lib/prism/desugar_compiler.rb#143 def desugar; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#4607 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # # source://prism//lib/prism/node.rb#4583 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # # source://prism//lib/prism/node.rb#4586 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # # source://prism//lib/prism/node.rb#4602 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism//lib/prism/node.rb#4592 sig { returns(Prism::Location) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#4631 def type; end # attr_reader value: Node # # source://prism//lib/prism/node.rb#4598 sig { returns(Prism::Node) } def value; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#4641 def type; end end end # Represents assigning to a constant using an operator that isn't `=`. # # Target += value # ^^^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#4651 class Prism::ConstantOperatorWriteNode < ::Prism::Node # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Symbol operator, Location location) -> void # # @return [ConstantOperatorWriteNode] a new instance of ConstantOperatorWriteNode # # source://prism//lib/prism/node.rb#4652 def initialize(source, name, name_loc, operator_loc, value, operator, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#4664 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#4669 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#4679 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#4674 def compact_child_nodes; end # def copy: (**params) -> ConstantOperatorWriteNode # # source://prism//lib/prism/node.rb#4684 sig { params(params: T.untyped).returns(Prism::ConstantOperatorWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#4669 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location } # # source://prism//lib/prism/node.rb#4700 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # source://prism//lib/prism/desugar_compiler.rb#155 def desugar; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#4727 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # # source://prism//lib/prism/node.rb#4705 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # # source://prism//lib/prism/node.rb#4708 sig { returns(Prism::Location) } def name_loc; end # attr_reader operator: Symbol # # source://prism//lib/prism/node.rb#4723 sig { returns(Symbol) } def operator; end # attr_reader operator_loc: Location # # source://prism//lib/prism/node.rb#4714 sig { returns(Prism::Location) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#4752 def type; end # attr_reader value: Node # # source://prism//lib/prism/node.rb#4720 sig { returns(Prism::Node) } def value; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#4762 def type; end end end # Represents the use of the `||=` operator for assignment to a constant. # # Target ||= value # ^^^^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#4772 class Prism::ConstantOrWriteNode < ::Prism::Node # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Location location) -> void # # @return [ConstantOrWriteNode] a new instance of ConstantOrWriteNode # # source://prism//lib/prism/node.rb#4773 def initialize(source, name, name_loc, operator_loc, value, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#4784 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#4789 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#4799 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#4794 def compact_child_nodes; end # def copy: (**params) -> ConstantOrWriteNode # # source://prism//lib/prism/node.rb#4804 sig { params(params: T.untyped).returns(Prism::ConstantOrWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#4789 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location } # # source://prism//lib/prism/node.rb#4819 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # source://prism//lib/prism/desugar_compiler.rb#149 def desugar; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#4848 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # # source://prism//lib/prism/node.rb#4824 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # # source://prism//lib/prism/node.rb#4827 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # # source://prism//lib/prism/node.rb#4843 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism//lib/prism/node.rb#4833 sig { returns(Prism::Location) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#4872 def type; end # attr_reader value: Node # # source://prism//lib/prism/node.rb#4839 sig { returns(Prism::Node) } def value; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#4882 def type; end end end # Represents the use of the `&&=` operator for assignment to a constant path. # # Parent::Child &&= value # ^^^^^^^^^^^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#4892 class Prism::ConstantPathAndWriteNode < ::Prism::Node # def initialize: (ConstantPathNode target, Location operator_loc, Node value, Location location) -> void # # @return [ConstantPathAndWriteNode] a new instance of ConstantPathAndWriteNode # # source://prism//lib/prism/node.rb#4893 def initialize(source, target, operator_loc, value, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#4903 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#4908 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#4918 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#4913 def compact_child_nodes; end # def copy: (**params) -> ConstantPathAndWriteNode # # source://prism//lib/prism/node.rb#4923 sig { params(params: T.untyped).returns(Prism::ConstantPathAndWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#4908 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, operator_loc: Location, value: Node, location: Location } # # source://prism//lib/prism/node.rb#4937 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#4960 def inspect(inspector = T.unsafe(nil)); end # def operator: () -> String # # source://prism//lib/prism/node.rb#4955 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism//lib/prism/node.rb#4945 sig { returns(Prism::Location) } def operator_loc; end # attr_reader target: ConstantPathNode # # source://prism//lib/prism/node.rb#4942 sig { returns(Prism::ConstantPathNode) } def target; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#4984 def type; end # attr_reader value: Node # # source://prism//lib/prism/node.rb#4951 sig { returns(Prism::Node) } def value; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#4994 def type; end end end # Represents accessing a constant through a path of `::` operators. # # Foo::Bar # ^^^^^^^^ # # source://prism//lib/prism/node.rb#5004 class Prism::ConstantPathNode < ::Prism::Node # def initialize: (Node? parent, Node child, Location delimiter_loc, Location location) -> void # # @return [ConstantPathNode] a new instance of ConstantPathNode # # source://prism//lib/prism/node.rb#5005 def initialize(source, parent, child, delimiter_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#5015 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # attr_reader child: Node # # source://prism//lib/prism/node.rb#5060 sig { returns(Prism::Node) } def child; end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#5020 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#5033 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#5025 def compact_child_nodes; end # def copy: (**params) -> ConstantPathNode # # source://prism//lib/prism/node.rb#5038 sig { params(params: T.untyped).returns(Prism::ConstantPathNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#5020 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { parent: Node?, child: Node, delimiter_loc: Location, location: Location } # # source://prism//lib/prism/node.rb#5052 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def delimiter: () -> String # # source://prism//lib/prism/node.rb#5070 sig { returns(String) } def delimiter; end # attr_reader delimiter_loc: Location # # source://prism//lib/prism/node.rb#5063 sig { returns(Prism::Location) } def delimiter_loc; end # Returns the full name of this constant path. For example: "Foo::Bar" # # source://prism//lib/prism/node_ext.rb#129 def full_name; end # Returns the list of parts for the full name of this constant path. # For example: [:Foo, :Bar] # # source://prism//lib/prism/node_ext.rb#112 def full_name_parts; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#5075 def inspect(inspector = T.unsafe(nil)); end # attr_reader parent: Node? # # source://prism//lib/prism/node.rb#5057 sig { returns(T.nilable(Prism::Node)) } def parent; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#5103 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#5113 def type; end end end # An error class raised when dynamic parts are found while computing a # constant path's full name. For example: # Foo::Bar::Baz -> does not raise because all parts of the constant path are # simple constants # var::Bar::Baz -> raises because the first part of the constant path is a # local variable # # source://prism//lib/prism/node_ext.rb#108 class Prism::ConstantPathNode::DynamicPartsInConstantPathError < ::StandardError; end # Represents assigning to a constant path using an operator that isn't `=`. # # Parent::Child += value # ^^^^^^^^^^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#5123 class Prism::ConstantPathOperatorWriteNode < ::Prism::Node # def initialize: (ConstantPathNode target, Location operator_loc, Node value, Symbol operator, Location location) -> void # # @return [ConstantPathOperatorWriteNode] a new instance of ConstantPathOperatorWriteNode # # source://prism//lib/prism/node.rb#5124 def initialize(source, target, operator_loc, value, operator, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#5135 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#5140 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#5150 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#5145 def compact_child_nodes; end # def copy: (**params) -> ConstantPathOperatorWriteNode # # source://prism//lib/prism/node.rb#5155 sig { params(params: T.untyped).returns(Prism::ConstantPathOperatorWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#5140 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, operator_loc: Location, value: Node, operator: Symbol, location: Location } # # source://prism//lib/prism/node.rb#5170 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#5191 def inspect(inspector = T.unsafe(nil)); end # attr_reader operator: Symbol # # source://prism//lib/prism/node.rb#5187 sig { returns(Symbol) } def operator; end # attr_reader operator_loc: Location # # source://prism//lib/prism/node.rb#5178 sig { returns(Prism::Location) } def operator_loc; end # attr_reader target: ConstantPathNode # # source://prism//lib/prism/node.rb#5175 sig { returns(Prism::ConstantPathNode) } def target; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#5216 def type; end # attr_reader value: Node # # source://prism//lib/prism/node.rb#5184 sig { returns(Prism::Node) } def value; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#5226 def type; end end end # Represents the use of the `||=` operator for assignment to a constant path. # # Parent::Child ||= value # ^^^^^^^^^^^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#5236 class Prism::ConstantPathOrWriteNode < ::Prism::Node # def initialize: (ConstantPathNode target, Location operator_loc, Node value, Location location) -> void # # @return [ConstantPathOrWriteNode] a new instance of ConstantPathOrWriteNode # # source://prism//lib/prism/node.rb#5237 def initialize(source, target, operator_loc, value, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#5247 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#5252 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#5262 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#5257 def compact_child_nodes; end # def copy: (**params) -> ConstantPathOrWriteNode # # source://prism//lib/prism/node.rb#5267 sig { params(params: T.untyped).returns(Prism::ConstantPathOrWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#5252 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, operator_loc: Location, value: Node, location: Location } # # source://prism//lib/prism/node.rb#5281 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#5304 def inspect(inspector = T.unsafe(nil)); end # def operator: () -> String # # source://prism//lib/prism/node.rb#5299 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism//lib/prism/node.rb#5289 sig { returns(Prism::Location) } def operator_loc; end # attr_reader target: ConstantPathNode # # source://prism//lib/prism/node.rb#5286 sig { returns(Prism::ConstantPathNode) } def target; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#5328 def type; end # attr_reader value: Node # # source://prism//lib/prism/node.rb#5295 sig { returns(Prism::Node) } def value; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#5338 def type; end end end # Represents writing to a constant path in a context that doesn't have an explicit value. # # Foo::Foo, Bar::Bar = baz # ^^^^^^^^ ^^^^^^^^ # # source://prism//lib/prism/node.rb#5348 class Prism::ConstantPathTargetNode < ::Prism::Node # def initialize: (Node? parent, Node child, Location delimiter_loc, Location location) -> void # # @return [ConstantPathTargetNode] a new instance of ConstantPathTargetNode # # source://prism//lib/prism/node.rb#5349 def initialize(source, parent, child, delimiter_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#5359 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # attr_reader child: Node # # source://prism//lib/prism/node.rb#5404 sig { returns(Prism::Node) } def child; end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#5364 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#5377 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#5369 def compact_child_nodes; end # def copy: (**params) -> ConstantPathTargetNode # # source://prism//lib/prism/node.rb#5382 sig { params(params: T.untyped).returns(Prism::ConstantPathTargetNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#5364 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { parent: Node?, child: Node, delimiter_loc: Location, location: Location } # # source://prism//lib/prism/node.rb#5396 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def delimiter: () -> String # # source://prism//lib/prism/node.rb#5414 sig { returns(String) } def delimiter; end # attr_reader delimiter_loc: Location # # source://prism//lib/prism/node.rb#5407 sig { returns(Prism::Location) } def delimiter_loc; end # Returns the full name of this constant path. For example: "Foo::Bar" # # source://prism//lib/prism/node_ext.rb#152 def full_name; end # Returns the list of parts for the full name of this constant path. # For example: [:Foo, :Bar] # # source://prism//lib/prism/node_ext.rb#137 def full_name_parts; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#5419 def inspect(inspector = T.unsafe(nil)); end # attr_reader parent: Node? # # source://prism//lib/prism/node.rb#5401 sig { returns(T.nilable(Prism::Node)) } def parent; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#5447 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#5457 def type; end end end # Represents writing to a constant path. # # ::Foo = 1 # ^^^^^^^^^ # # Foo::Bar = 1 # ^^^^^^^^^^^^ # # ::Foo::Bar = 1 # ^^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#5473 class Prism::ConstantPathWriteNode < ::Prism::Node # def initialize: (ConstantPathNode target, Location operator_loc, Node value, Location location) -> void # # @return [ConstantPathWriteNode] a new instance of ConstantPathWriteNode # # source://prism//lib/prism/node.rb#5474 def initialize(source, target, operator_loc, value, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#5484 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#5489 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#5499 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#5494 def compact_child_nodes; end # def copy: (**params) -> ConstantPathWriteNode # # source://prism//lib/prism/node.rb#5504 sig { params(params: T.untyped).returns(Prism::ConstantPathWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#5489 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, operator_loc: Location, value: Node, location: Location } # # source://prism//lib/prism/node.rb#5518 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#5541 def inspect(inspector = T.unsafe(nil)); end # def operator: () -> String # # source://prism//lib/prism/node.rb#5536 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism//lib/prism/node.rb#5526 sig { returns(Prism::Location) } def operator_loc; end # attr_reader target: ConstantPathNode # # source://prism//lib/prism/node.rb#5523 sig { returns(Prism::ConstantPathNode) } def target; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#5565 def type; end # attr_reader value: Node # # source://prism//lib/prism/node.rb#5532 sig { returns(Prism::Node) } def value; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#5575 def type; end end end # Represents referencing a constant. # # Foo # ^^^ # # source://prism//lib/prism/node.rb#5585 class Prism::ConstantReadNode < ::Prism::Node # def initialize: (Symbol name, Location location) -> void # # @return [ConstantReadNode] a new instance of ConstantReadNode # # source://prism//lib/prism/node.rb#5586 def initialize(source, name, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#5594 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#5599 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#5609 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#5604 def compact_child_nodes; end # def copy: (**params) -> ConstantReadNode # # source://prism//lib/prism/node.rb#5614 sig { params(params: T.untyped).returns(Prism::ConstantReadNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#5599 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } # # source://prism//lib/prism/node.rb#5626 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # Returns the full name of this constant. For example: "Foo" # # source://prism//lib/prism/node_ext.rb#96 def full_name; end # Returns the list of parts for the full name of this constant. # For example: [:Foo] # # source://prism//lib/prism/node_ext.rb#91 def full_name_parts; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#5639 def inspect(inspector = T.unsafe(nil)); end # The name of the [constant](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#constants). # # X # name `:X` # # SOME_CONSTANT # name `:SOME_CONSTANT` # # source://prism//lib/prism/node.rb#5635 sig { returns(Symbol) } def name; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#5659 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#5669 def type; end end end # Represents writing to a constant in a context that doesn't have an explicit value. # # Foo, Bar = baz # ^^^ ^^^ # # source://prism//lib/prism/node.rb#5679 class Prism::ConstantTargetNode < ::Prism::Node # def initialize: (Symbol name, Location location) -> void # # @return [ConstantTargetNode] a new instance of ConstantTargetNode # # source://prism//lib/prism/node.rb#5680 def initialize(source, name, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#5688 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#5693 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#5703 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#5698 def compact_child_nodes; end # def copy: (**params) -> ConstantTargetNode # # source://prism//lib/prism/node.rb#5708 sig { params(params: T.untyped).returns(Prism::ConstantTargetNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#5693 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } # # source://prism//lib/prism/node.rb#5720 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # Returns the full name of this constant. For example: "Foo" # # source://prism//lib/prism/node_ext.rb#165 def full_name; end # Returns the list of parts for the full name of this constant. # For example: [:Foo] # # source://prism//lib/prism/node_ext.rb#160 def full_name_parts; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#5729 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # # source://prism//lib/prism/node.rb#5725 sig { returns(Symbol) } def name; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#5749 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#5759 def type; end end end # Represents writing to a constant. # # Foo = 1 # ^^^^^^^ # # source://prism//lib/prism/node.rb#5769 class Prism::ConstantWriteNode < ::Prism::Node # def initialize: (Symbol name, Location name_loc, Node value, Location operator_loc, Location location) -> void # # @return [ConstantWriteNode] a new instance of ConstantWriteNode # # source://prism//lib/prism/node.rb#5770 def initialize(source, name, name_loc, value, operator_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#5781 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#5786 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#5796 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#5791 def compact_child_nodes; end # def copy: (**params) -> ConstantWriteNode # # source://prism//lib/prism/node.rb#5801 sig { params(params: T.untyped).returns(Prism::ConstantWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#5786 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location } # # source://prism//lib/prism/node.rb#5816 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#5845 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # # source://prism//lib/prism/node.rb#5821 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # # source://prism//lib/prism/node.rb#5824 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # # source://prism//lib/prism/node.rb#5840 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism//lib/prism/node.rb#5833 sig { returns(Prism::Location) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#5869 def type; end # attr_reader value: Node # # source://prism//lib/prism/node.rb#5830 sig { returns(Prism::Node) } def value; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#5879 def type; end end end class Prism::DATAComment < Prism::Comment; end # The DSL module provides a set of methods that can be used to create prism # nodes in a more concise manner. For example, instead of writing: # # source = Prism::Source.new("[1]") # # Prism::ArrayNode.new( # [ # Prism::IntegerNode.new( # Prism::IntegerBaseFlags::DECIMAL, # Prism::Location.new(source, 1, 1), # source # ) # ], # Prism::Location.new(source, 0, 1), # Prism::Location.new(source, 2, 1), # source # ) # # you could instead write: # # source = Prism::Source.new("[1]") # # ArrayNode( # IntegerNode(Prism::IntegerBaseFlags::DECIMAL, Location(source, 1, 1)), source), # Location(source, 0, 1), # Location(source, 2, 1), # source # ) # # This is mostly helpful in the context of writing tests, but can also be used # to generate trees programmatically. # # source://prism//lib/prism/dsl.rb#40 module Prism::DSL private # Create a new AliasGlobalVariableNode node # # source://prism//lib/prism/dsl.rb#49 def AliasGlobalVariableNode(new_name, old_name, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new AliasMethodNode node # # source://prism//lib/prism/dsl.rb#54 def AliasMethodNode(new_name, old_name, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new AlternationPatternNode node # # source://prism//lib/prism/dsl.rb#59 def AlternationPatternNode(left, right, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new AndNode node # # source://prism//lib/prism/dsl.rb#64 def AndNode(left, right, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ArgumentsNode node # # source://prism//lib/prism/dsl.rb#69 def ArgumentsNode(flags, arguments, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ArrayNode node # # source://prism//lib/prism/dsl.rb#74 def ArrayNode(flags, elements, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ArrayPatternNode node # # source://prism//lib/prism/dsl.rb#79 def ArrayPatternNode(constant, requireds, rest, posts, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new AssocNode node # # source://prism//lib/prism/dsl.rb#84 def AssocNode(key, value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new AssocSplatNode node # # source://prism//lib/prism/dsl.rb#89 def AssocSplatNode(value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new BackReferenceReadNode node # # source://prism//lib/prism/dsl.rb#94 def BackReferenceReadNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new BeginNode node # # source://prism//lib/prism/dsl.rb#99 def BeginNode(begin_keyword_loc, statements, rescue_clause, else_clause, ensure_clause, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new BlockArgumentNode node # # source://prism//lib/prism/dsl.rb#104 def BlockArgumentNode(expression, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new BlockLocalVariableNode node # # source://prism//lib/prism/dsl.rb#109 def BlockLocalVariableNode(flags, name, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new BlockNode node # # source://prism//lib/prism/dsl.rb#114 def BlockNode(locals, parameters, body, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new BlockParameterNode node # # source://prism//lib/prism/dsl.rb#119 def BlockParameterNode(flags, name, name_loc, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new BlockParametersNode node # # source://prism//lib/prism/dsl.rb#124 def BlockParametersNode(parameters, locals, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new BreakNode node # # source://prism//lib/prism/dsl.rb#129 def BreakNode(arguments, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new CallAndWriteNode node # # source://prism//lib/prism/dsl.rb#134 def CallAndWriteNode(flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new CallNode node # # source://prism//lib/prism/dsl.rb#139 def CallNode(flags, receiver, call_operator_loc, name, message_loc, opening_loc, arguments, closing_loc, block, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new CallOperatorWriteNode node # # source://prism//lib/prism/dsl.rb#144 def CallOperatorWriteNode(flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new CallOrWriteNode node # # source://prism//lib/prism/dsl.rb#149 def CallOrWriteNode(flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new CallTargetNode node # # source://prism//lib/prism/dsl.rb#154 def CallTargetNode(flags, receiver, call_operator_loc, name, message_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new CapturePatternNode node # # source://prism//lib/prism/dsl.rb#159 def CapturePatternNode(value, target, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new CaseMatchNode node # # source://prism//lib/prism/dsl.rb#164 def CaseMatchNode(predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new CaseNode node # # source://prism//lib/prism/dsl.rb#169 def CaseNode(predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ClassNode node # # source://prism//lib/prism/dsl.rb#174 def ClassNode(locals, class_keyword_loc, constant_path, inheritance_operator_loc, superclass, body, end_keyword_loc, name, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ClassVariableAndWriteNode node # # source://prism//lib/prism/dsl.rb#179 def ClassVariableAndWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ClassVariableOperatorWriteNode node # # source://prism//lib/prism/dsl.rb#184 def ClassVariableOperatorWriteNode(name, name_loc, operator_loc, value, operator, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ClassVariableOrWriteNode node # # source://prism//lib/prism/dsl.rb#189 def ClassVariableOrWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ClassVariableReadNode node # # source://prism//lib/prism/dsl.rb#194 def ClassVariableReadNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ClassVariableTargetNode node # # source://prism//lib/prism/dsl.rb#199 def ClassVariableTargetNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ClassVariableWriteNode node # # source://prism//lib/prism/dsl.rb#204 def ClassVariableWriteNode(name, name_loc, value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ConstantAndWriteNode node # # source://prism//lib/prism/dsl.rb#209 def ConstantAndWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ConstantOperatorWriteNode node # # source://prism//lib/prism/dsl.rb#214 def ConstantOperatorWriteNode(name, name_loc, operator_loc, value, operator, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ConstantOrWriteNode node # # source://prism//lib/prism/dsl.rb#219 def ConstantOrWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ConstantPathAndWriteNode node # # source://prism//lib/prism/dsl.rb#224 def ConstantPathAndWriteNode(target, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ConstantPathNode node # # source://prism//lib/prism/dsl.rb#229 def ConstantPathNode(parent, child, delimiter_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ConstantPathOperatorWriteNode node # # source://prism//lib/prism/dsl.rb#234 def ConstantPathOperatorWriteNode(target, operator_loc, value, operator, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ConstantPathOrWriteNode node # # source://prism//lib/prism/dsl.rb#239 def ConstantPathOrWriteNode(target, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ConstantPathTargetNode node # # source://prism//lib/prism/dsl.rb#244 def ConstantPathTargetNode(parent, child, delimiter_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ConstantPathWriteNode node # # source://prism//lib/prism/dsl.rb#249 def ConstantPathWriteNode(target, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ConstantReadNode node # # source://prism//lib/prism/dsl.rb#254 def ConstantReadNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ConstantTargetNode node # # source://prism//lib/prism/dsl.rb#259 def ConstantTargetNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ConstantWriteNode node # # source://prism//lib/prism/dsl.rb#264 def ConstantWriteNode(name, name_loc, value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new DefNode node # # source://prism//lib/prism/dsl.rb#269 def DefNode(name, name_loc, receiver, parameters, body, locals, def_keyword_loc, operator_loc, lparen_loc, rparen_loc, equal_loc, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new DefinedNode node # # source://prism//lib/prism/dsl.rb#274 def DefinedNode(lparen_loc, value, rparen_loc, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ElseNode node # # source://prism//lib/prism/dsl.rb#279 def ElseNode(else_keyword_loc, statements, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new EmbeddedStatementsNode node # # source://prism//lib/prism/dsl.rb#284 def EmbeddedStatementsNode(opening_loc, statements, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new EmbeddedVariableNode node # # source://prism//lib/prism/dsl.rb#289 def EmbeddedVariableNode(operator_loc, variable, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new EnsureNode node # # source://prism//lib/prism/dsl.rb#294 def EnsureNode(ensure_keyword_loc, statements, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new FalseNode node # # source://prism//lib/prism/dsl.rb#299 def FalseNode(source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new FindPatternNode node # # source://prism//lib/prism/dsl.rb#304 def FindPatternNode(constant, left, requireds, right, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new FlipFlopNode node # # source://prism//lib/prism/dsl.rb#309 def FlipFlopNode(flags, left, right, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new FloatNode node # # source://prism//lib/prism/dsl.rb#314 def FloatNode(source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ForNode node # # source://prism//lib/prism/dsl.rb#319 def ForNode(index, collection, statements, for_keyword_loc, in_keyword_loc, do_keyword_loc, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ForwardingArgumentsNode node # # source://prism//lib/prism/dsl.rb#324 def ForwardingArgumentsNode(source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ForwardingParameterNode node # # source://prism//lib/prism/dsl.rb#329 def ForwardingParameterNode(source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ForwardingSuperNode node # # source://prism//lib/prism/dsl.rb#334 def ForwardingSuperNode(block, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new GlobalVariableAndWriteNode node # # source://prism//lib/prism/dsl.rb#339 def GlobalVariableAndWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new GlobalVariableOperatorWriteNode node # # source://prism//lib/prism/dsl.rb#344 def GlobalVariableOperatorWriteNode(name, name_loc, operator_loc, value, operator, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new GlobalVariableOrWriteNode node # # source://prism//lib/prism/dsl.rb#349 def GlobalVariableOrWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new GlobalVariableReadNode node # # source://prism//lib/prism/dsl.rb#354 def GlobalVariableReadNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new GlobalVariableTargetNode node # # source://prism//lib/prism/dsl.rb#359 def GlobalVariableTargetNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new GlobalVariableWriteNode node # # source://prism//lib/prism/dsl.rb#364 def GlobalVariableWriteNode(name, name_loc, value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new HashNode node # # source://prism//lib/prism/dsl.rb#369 def HashNode(opening_loc, elements, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new HashPatternNode node # # source://prism//lib/prism/dsl.rb#374 def HashPatternNode(constant, elements, rest, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new IfNode node # # source://prism//lib/prism/dsl.rb#379 def IfNode(if_keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ImaginaryNode node # # source://prism//lib/prism/dsl.rb#384 def ImaginaryNode(numeric, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ImplicitNode node # # source://prism//lib/prism/dsl.rb#389 def ImplicitNode(value, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ImplicitRestNode node # # source://prism//lib/prism/dsl.rb#394 def ImplicitRestNode(source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new InNode node # # source://prism//lib/prism/dsl.rb#399 def InNode(pattern, statements, in_loc, then_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new IndexAndWriteNode node # # source://prism//lib/prism/dsl.rb#404 def IndexAndWriteNode(flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new IndexOperatorWriteNode node # # source://prism//lib/prism/dsl.rb#409 def IndexOperatorWriteNode(flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new IndexOrWriteNode node # # source://prism//lib/prism/dsl.rb#414 def IndexOrWriteNode(flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new IndexTargetNode node # # source://prism//lib/prism/dsl.rb#419 def IndexTargetNode(flags, receiver, opening_loc, arguments, closing_loc, block, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new InstanceVariableAndWriteNode node # # source://prism//lib/prism/dsl.rb#424 def InstanceVariableAndWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new InstanceVariableOperatorWriteNode node # # source://prism//lib/prism/dsl.rb#429 def InstanceVariableOperatorWriteNode(name, name_loc, operator_loc, value, operator, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new InstanceVariableOrWriteNode node # # source://prism//lib/prism/dsl.rb#434 def InstanceVariableOrWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new InstanceVariableReadNode node # # source://prism//lib/prism/dsl.rb#439 def InstanceVariableReadNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new InstanceVariableTargetNode node # # source://prism//lib/prism/dsl.rb#444 def InstanceVariableTargetNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new InstanceVariableWriteNode node # # source://prism//lib/prism/dsl.rb#449 def InstanceVariableWriteNode(name, name_loc, value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new IntegerNode node # # source://prism//lib/prism/dsl.rb#454 def IntegerNode(flags, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new InterpolatedMatchLastLineNode node # # source://prism//lib/prism/dsl.rb#459 def InterpolatedMatchLastLineNode(flags, opening_loc, parts, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new InterpolatedRegularExpressionNode node # # source://prism//lib/prism/dsl.rb#464 def InterpolatedRegularExpressionNode(flags, opening_loc, parts, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new InterpolatedStringNode node # # source://prism//lib/prism/dsl.rb#469 def InterpolatedStringNode(opening_loc, parts, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new InterpolatedSymbolNode node # # source://prism//lib/prism/dsl.rb#474 def InterpolatedSymbolNode(opening_loc, parts, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new InterpolatedXStringNode node # # source://prism//lib/prism/dsl.rb#479 def InterpolatedXStringNode(opening_loc, parts, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new KeywordHashNode node # # source://prism//lib/prism/dsl.rb#484 def KeywordHashNode(flags, elements, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new KeywordRestParameterNode node # # source://prism//lib/prism/dsl.rb#489 def KeywordRestParameterNode(flags, name, name_loc, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new LambdaNode node # # source://prism//lib/prism/dsl.rb#494 def LambdaNode(locals, operator_loc, opening_loc, closing_loc, parameters, body, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new LocalVariableAndWriteNode node # # source://prism//lib/prism/dsl.rb#499 def LocalVariableAndWriteNode(name_loc, operator_loc, value, name, depth, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new LocalVariableOperatorWriteNode node # # source://prism//lib/prism/dsl.rb#504 def LocalVariableOperatorWriteNode(name_loc, operator_loc, value, name, operator, depth, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new LocalVariableOrWriteNode node # # source://prism//lib/prism/dsl.rb#509 def LocalVariableOrWriteNode(name_loc, operator_loc, value, name, depth, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new LocalVariableReadNode node # # source://prism//lib/prism/dsl.rb#514 def LocalVariableReadNode(name, depth, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new LocalVariableTargetNode node # # source://prism//lib/prism/dsl.rb#519 def LocalVariableTargetNode(name, depth, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new LocalVariableWriteNode node # # source://prism//lib/prism/dsl.rb#524 def LocalVariableWriteNode(name, depth, name_loc, value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new Location object # # source://prism//lib/prism/dsl.rb#44 def Location(source = T.unsafe(nil), start_offset = T.unsafe(nil), length = T.unsafe(nil)); end # Create a new MatchLastLineNode node # # source://prism//lib/prism/dsl.rb#529 def MatchLastLineNode(flags, opening_loc, content_loc, closing_loc, unescaped, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new MatchPredicateNode node # # source://prism//lib/prism/dsl.rb#534 def MatchPredicateNode(value, pattern, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new MatchRequiredNode node # # source://prism//lib/prism/dsl.rb#539 def MatchRequiredNode(value, pattern, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new MatchWriteNode node # # source://prism//lib/prism/dsl.rb#544 def MatchWriteNode(call, targets, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new MissingNode node # # source://prism//lib/prism/dsl.rb#549 def MissingNode(source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ModuleNode node # # source://prism//lib/prism/dsl.rb#554 def ModuleNode(locals, module_keyword_loc, constant_path, body, end_keyword_loc, name, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new MultiTargetNode node # # source://prism//lib/prism/dsl.rb#559 def MultiTargetNode(lefts, rest, rights, lparen_loc, rparen_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new MultiWriteNode node # # source://prism//lib/prism/dsl.rb#564 def MultiWriteNode(lefts, rest, rights, lparen_loc, rparen_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new NextNode node # # source://prism//lib/prism/dsl.rb#569 def NextNode(arguments, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new NilNode node # # source://prism//lib/prism/dsl.rb#574 def NilNode(source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new NoKeywordsParameterNode node # # source://prism//lib/prism/dsl.rb#579 def NoKeywordsParameterNode(operator_loc, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new NumberedParametersNode node # # source://prism//lib/prism/dsl.rb#584 def NumberedParametersNode(maximum, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new NumberedReferenceReadNode node # # source://prism//lib/prism/dsl.rb#589 def NumberedReferenceReadNode(number, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new OptionalKeywordParameterNode node # # source://prism//lib/prism/dsl.rb#594 def OptionalKeywordParameterNode(flags, name, name_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new OptionalParameterNode node # # source://prism//lib/prism/dsl.rb#599 def OptionalParameterNode(flags, name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new OrNode node # # source://prism//lib/prism/dsl.rb#604 def OrNode(left, right, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ParametersNode node # # source://prism//lib/prism/dsl.rb#609 def ParametersNode(requireds, optionals, rest, posts, keywords, keyword_rest, block, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ParenthesesNode node # # source://prism//lib/prism/dsl.rb#614 def ParenthesesNode(body, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new PinnedExpressionNode node # # source://prism//lib/prism/dsl.rb#619 def PinnedExpressionNode(expression, operator_loc, lparen_loc, rparen_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new PinnedVariableNode node # # source://prism//lib/prism/dsl.rb#624 def PinnedVariableNode(variable, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new PostExecutionNode node # # source://prism//lib/prism/dsl.rb#629 def PostExecutionNode(statements, keyword_loc, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new PreExecutionNode node # # source://prism//lib/prism/dsl.rb#634 def PreExecutionNode(statements, keyword_loc, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ProgramNode node # # source://prism//lib/prism/dsl.rb#639 def ProgramNode(locals, statements, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new RangeNode node # # source://prism//lib/prism/dsl.rb#644 def RangeNode(flags, left, right, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new RationalNode node # # source://prism//lib/prism/dsl.rb#649 def RationalNode(numeric, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new RedoNode node # # source://prism//lib/prism/dsl.rb#654 def RedoNode(source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new RegularExpressionNode node # # source://prism//lib/prism/dsl.rb#659 def RegularExpressionNode(flags, opening_loc, content_loc, closing_loc, unescaped, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new RequiredKeywordParameterNode node # # source://prism//lib/prism/dsl.rb#664 def RequiredKeywordParameterNode(flags, name, name_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new RequiredParameterNode node # # source://prism//lib/prism/dsl.rb#669 def RequiredParameterNode(flags, name, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new RescueModifierNode node # # source://prism//lib/prism/dsl.rb#674 def RescueModifierNode(expression, keyword_loc, rescue_expression, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new RescueNode node # # source://prism//lib/prism/dsl.rb#679 def RescueNode(keyword_loc, exceptions, operator_loc, reference, statements, consequent, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new RestParameterNode node # # source://prism//lib/prism/dsl.rb#684 def RestParameterNode(flags, name, name_loc, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new RetryNode node # # source://prism//lib/prism/dsl.rb#689 def RetryNode(source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ReturnNode node # # source://prism//lib/prism/dsl.rb#694 def ReturnNode(keyword_loc, arguments, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new SelfNode node # # source://prism//lib/prism/dsl.rb#699 def SelfNode(source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new SingletonClassNode node # # source://prism//lib/prism/dsl.rb#704 def SingletonClassNode(locals, class_keyword_loc, operator_loc, expression, body, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new SourceEncodingNode node # # source://prism//lib/prism/dsl.rb#709 def SourceEncodingNode(source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new SourceFileNode node # # source://prism//lib/prism/dsl.rb#714 def SourceFileNode(filepath, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new SourceLineNode node # # source://prism//lib/prism/dsl.rb#719 def SourceLineNode(source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new SplatNode node # # source://prism//lib/prism/dsl.rb#724 def SplatNode(operator_loc, expression, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new StatementsNode node # # source://prism//lib/prism/dsl.rb#729 def StatementsNode(body, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new StringNode node # # source://prism//lib/prism/dsl.rb#734 def StringNode(flags, opening_loc, content_loc, closing_loc, unescaped, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new SuperNode node # # source://prism//lib/prism/dsl.rb#739 def SuperNode(keyword_loc, lparen_loc, arguments, rparen_loc, block, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new SymbolNode node # # source://prism//lib/prism/dsl.rb#744 def SymbolNode(flags, opening_loc, value_loc, closing_loc, unescaped, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new TrueNode node # # source://prism//lib/prism/dsl.rb#749 def TrueNode(source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new UndefNode node # # source://prism//lib/prism/dsl.rb#754 def UndefNode(names, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new UnlessNode node # # source://prism//lib/prism/dsl.rb#759 def UnlessNode(keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new UntilNode node # # source://prism//lib/prism/dsl.rb#764 def UntilNode(flags, keyword_loc, closing_loc, predicate, statements, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new WhenNode node # # source://prism//lib/prism/dsl.rb#769 def WhenNode(keyword_loc, conditions, statements, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new WhileNode node # # source://prism//lib/prism/dsl.rb#774 def WhileNode(flags, keyword_loc, closing_loc, predicate, statements, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new XStringNode node # # source://prism//lib/prism/dsl.rb#779 def XStringNode(flags, opening_loc, content_loc, closing_loc, unescaped, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new YieldNode node # # source://prism//lib/prism/dsl.rb#784 def YieldNode(keyword_loc, lparen_loc, arguments, rparen_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end end # This module is used for testing and debugging and is not meant to be used by # consumers of this library. # # source://prism//lib/prism/debug.rb#6 module Prism::Debug class << self # :call-seq: # Debug::cruby_locals(source) -> Array # # For the given source, compiles with CRuby and returns a list of all of the # sets of local variables that were encountered. # # source://prism//lib/prism/debug.rb#54 def cruby_locals(source); end def format_errors(_arg0, _arg1); end def inspect_node(_arg0); end def memsize(_arg0); end def named_captures(_arg0); end # :call-seq: # Debug::newlines(source) -> Array # # For the given source string, return the byte offsets of every newline in # the source. # # source://prism//lib/prism/debug.rb#202 def newlines(source); end # :call-seq: # Debug::prism_locals(source) -> Array # # For the given source, parses with prism and returns a list of all of the # sets of local variables that were encountered. # # source://prism//lib/prism/debug.rb#98 def prism_locals(source); end def profile_file(_arg0); end end end # Used to hold the place of a local that will be in the local table but # cannot be accessed directly from the source code. For example, the # iteration variable in a for loop or the positional parameter on a method # definition that is destructured. # # source://prism//lib/prism/debug.rb#90 Prism::Debug::AnonymousLocal = T.let(T.unsafe(nil), Object) # A wrapper around a RubyVM::InstructionSequence that provides a more # convenient interface for accessing parts of the iseq. # # source://prism//lib/prism/debug.rb#9 class Prism::Debug::ISeq # @return [ISeq] a new instance of ISeq # # source://prism//lib/prism/debug.rb#12 def initialize(parts); end # source://prism//lib/prism/debug.rb#28 def each_child; end # source://prism//lib/prism/debug.rb#24 def instructions; end # source://prism//lib/prism/debug.rb#20 def local_table; end # source://prism//lib/prism/debug.rb#10 def parts; end # source://prism//lib/prism/debug.rb#16 def type; end end # Represents a method definition. # # def method # end # ^^^^^^^^^^ # # source://prism//lib/prism/node.rb#5890 class Prism::DefNode < ::Prism::Node # def initialize: (Symbol name, Location name_loc, Node? receiver, ParametersNode? parameters, Node? body, Array[Symbol] locals, Location def_keyword_loc, Location? operator_loc, Location? lparen_loc, Location? rparen_loc, Location? equal_loc, Location? end_keyword_loc, Location location) -> void # # @return [DefNode] a new instance of DefNode # # source://prism//lib/prism/node.rb#5891 def initialize(source, name, name_loc, receiver, parameters, body, locals, def_keyword_loc, operator_loc, lparen_loc, rparen_loc, equal_loc, end_keyword_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#5910 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # attr_reader body: Node? # # source://prism//lib/prism/node.rb#5977 sig { returns(T.nilable(Prism::Node)) } def body; end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#5915 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#5929 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#5920 def compact_child_nodes; end # def copy: (**params) -> DefNode # # source://prism//lib/prism/node.rb#5934 sig { params(params: T.untyped).returns(Prism::DefNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#5915 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, receiver: Node?, parameters: ParametersNode?, body: Node?, locals: Array[Symbol], def_keyword_loc: Location, operator_loc: Location?, lparen_loc: Location?, rparen_loc: Location?, equal_loc: Location?, end_keyword_loc: Location?, location: Location } # # source://prism//lib/prism/node.rb#5957 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def def_keyword: () -> String # # source://prism//lib/prism/node.rb#6050 sig { returns(String) } def def_keyword; end # attr_reader def_keyword_loc: Location # # source://prism//lib/prism/node.rb#5983 sig { returns(Prism::Location) } def def_keyword_loc; end # def end_keyword: () -> String? # # source://prism//lib/prism/node.rb#6075 sig { returns(T.nilable(String)) } def end_keyword; end # attr_reader end_keyword_loc: Location? # # source://prism//lib/prism/node.rb#6037 sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end # def equal: () -> String? # # source://prism//lib/prism/node.rb#6070 sig { returns(T.nilable(String)) } def equal; end # attr_reader equal_loc: Location? # # source://prism//lib/prism/node.rb#6025 sig { returns(T.nilable(Prism::Location)) } def equal_loc; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#6080 def inspect(inspector = T.unsafe(nil)); end # attr_reader locals: Array[Symbol] # # source://prism//lib/prism/node.rb#5980 sig { returns(T::Array[Symbol]) } def locals; end # def lparen: () -> String? # # source://prism//lib/prism/node.rb#6060 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # # source://prism//lib/prism/node.rb#6001 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # attr_reader name: Symbol # # source://prism//lib/prism/node.rb#5962 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # # source://prism//lib/prism/node.rb#5965 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String? # # source://prism//lib/prism/node.rb#6055 sig { returns(T.nilable(String)) } def operator; end # attr_reader operator_loc: Location? # # source://prism//lib/prism/node.rb#5989 sig { returns(T.nilable(Prism::Location)) } def operator_loc; end # attr_reader parameters: ParametersNode? # # source://prism//lib/prism/node.rb#5974 sig { returns(T.nilable(Prism::ParametersNode)) } def parameters; end # attr_reader receiver: Node? # # source://prism//lib/prism/node.rb#5971 sig { returns(T.nilable(Prism::Node)) } def receiver; end # def rparen: () -> String? # # source://prism//lib/prism/node.rb#6065 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # # source://prism//lib/prism/node.rb#6013 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#6126 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#6136 def type; end end end # Represents the use of the `defined?` keyword. # # defined?(a) # ^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#6146 class Prism::DefinedNode < ::Prism::Node # def initialize: (Location? lparen_loc, Node value, Location? rparen_loc, Location keyword_loc, Location location) -> void # # @return [DefinedNode] a new instance of DefinedNode # # source://prism//lib/prism/node.rb#6147 def initialize(source, lparen_loc, value, rparen_loc, keyword_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#6158 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#6163 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#6173 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#6168 def compact_child_nodes; end # def copy: (**params) -> DefinedNode # # source://prism//lib/prism/node.rb#6178 sig { params(params: T.untyped).returns(Prism::DefinedNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#6163 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { lparen_loc: Location?, value: Node, rparen_loc: Location?, keyword_loc: Location, location: Location } # # source://prism//lib/prism/node.rb#6193 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#6247 def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # # source://prism//lib/prism/node.rb#6242 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # # source://prism//lib/prism/node.rb#6225 sig { returns(Prism::Location) } def keyword_loc; end # def lparen: () -> String? # # source://prism//lib/prism/node.rb#6232 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # # source://prism//lib/prism/node.rb#6198 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def rparen: () -> String? # # source://prism//lib/prism/node.rb#6237 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # # source://prism//lib/prism/node.rb#6213 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#6271 def type; end # attr_reader value: Node # # source://prism//lib/prism/node.rb#6210 sig { returns(Prism::Node) } def value; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#6281 def type; end end end # source://prism//lib/prism/desugar_compiler.rb#4 class Prism::DesugarAndWriteNode # @return [DesugarAndWriteNode] a new instance of DesugarAndWriteNode # # source://prism//lib/prism/desugar_compiler.rb#7 def initialize(node, source, read_class, write_class, *arguments); end # Returns the value of attribute arguments. # # source://prism//lib/prism/desugar_compiler.rb#5 def arguments; end # Desugar `x &&= y` to `x && x = y` # # source://prism//lib/prism/desugar_compiler.rb#16 def compile; end # Returns the value of attribute node. # # source://prism//lib/prism/desugar_compiler.rb#5 def node; end # Returns the value of attribute read_class. # # source://prism//lib/prism/desugar_compiler.rb#5 def read_class; end # Returns the value of attribute source. # # source://prism//lib/prism/desugar_compiler.rb#5 def source; end # Returns the value of attribute write_class. # # source://prism//lib/prism/desugar_compiler.rb#5 def write_class; end end # DesugarCompiler is a compiler that desugars Ruby code into a more primitive # form. This is useful for consumers that want to deal with fewer node types. # # source://prism//lib/prism/desugar_compiler.rb#221 class Prism::DesugarCompiler < ::Prism::MutationCompiler # @@foo &&= bar # # becomes # # @@foo && @@foo = bar # # source://prism//lib/prism/desugar_compiler.rb#222 def visit_class_variable_and_write_node(node); end # @@foo += bar # # becomes # # @@foo = @@foo + bar # # source://prism//lib/prism/desugar_compiler.rb#240 def visit_class_variable_operator_write_node(node); end # @@foo ||= bar # # becomes # # defined?(@@foo) ? @@foo : @@foo = bar # # source://prism//lib/prism/desugar_compiler.rb#231 def visit_class_variable_or_write_node(node); end # Foo &&= bar # # becomes # # Foo && Foo = bar # # source://prism//lib/prism/desugar_compiler.rb#249 def visit_constant_and_write_node(node); end # Foo += bar # # becomes # # Foo = Foo + bar # # source://prism//lib/prism/desugar_compiler.rb#267 def visit_constant_operator_write_node(node); end # Foo ||= bar # # becomes # # defined?(Foo) ? Foo : Foo = bar # # source://prism//lib/prism/desugar_compiler.rb#258 def visit_constant_or_write_node(node); end # $foo &&= bar # # becomes # # $foo && $foo = bar # # source://prism//lib/prism/desugar_compiler.rb#276 def visit_global_variable_and_write_node(node); end # $foo += bar # # becomes # # $foo = $foo + bar # # source://prism//lib/prism/desugar_compiler.rb#294 def visit_global_variable_operator_write_node(node); end # $foo ||= bar # # becomes # # defined?($foo) ? $foo : $foo = bar # # source://prism//lib/prism/desugar_compiler.rb#285 def visit_global_variable_or_write_node(node); end # becomes # # source://prism//lib/prism/desugar_compiler.rb#303 def visit_instance_variable_and_write_node(node); end # becomes # # source://prism//lib/prism/desugar_compiler.rb#321 def visit_instance_variable_operator_write_node(node); end # becomes # # source://prism//lib/prism/desugar_compiler.rb#312 def visit_instance_variable_or_write_node(node); end # foo &&= bar # # becomes # # foo && foo = bar # # source://prism//lib/prism/desugar_compiler.rb#330 def visit_local_variable_and_write_node(node); end # foo += bar # # becomes # # foo = foo + bar # # source://prism//lib/prism/desugar_compiler.rb#348 def visit_local_variable_operator_write_node(node); end # foo ||= bar # # becomes # # foo || foo = bar # # source://prism//lib/prism/desugar_compiler.rb#339 def visit_local_variable_or_write_node(node); end end # source://prism//lib/prism/desugar_compiler.rb#63 class Prism::DesugarOperatorWriteNode # @return [DesugarOperatorWriteNode] a new instance of DesugarOperatorWriteNode # # source://prism//lib/prism/desugar_compiler.rb#66 def initialize(node, source, read_class, write_class, *arguments); end # Returns the value of attribute arguments. # # source://prism//lib/prism/desugar_compiler.rb#64 def arguments; end # Desugar `x += y` to `x = x + y` # # source://prism//lib/prism/desugar_compiler.rb#75 def compile; end # Returns the value of attribute node. # # source://prism//lib/prism/desugar_compiler.rb#64 def node; end # Returns the value of attribute read_class. # # source://prism//lib/prism/desugar_compiler.rb#64 def read_class; end # Returns the value of attribute source. # # source://prism//lib/prism/desugar_compiler.rb#64 def source; end # Returns the value of attribute write_class. # # source://prism//lib/prism/desugar_compiler.rb#64 def write_class; end end # source://prism//lib/prism/desugar_compiler.rb#27 class Prism::DesugarOrWriteDefinedNode # @return [DesugarOrWriteDefinedNode] a new instance of DesugarOrWriteDefinedNode # # source://prism//lib/prism/desugar_compiler.rb#30 def initialize(node, source, read_class, write_class, *arguments); end # Returns the value of attribute arguments. # # source://prism//lib/prism/desugar_compiler.rb#28 def arguments; end # Desugar `x ||= y` to `defined?(x) ? x : x = y` # # source://prism//lib/prism/desugar_compiler.rb#39 def compile; end # Returns the value of attribute node. # # source://prism//lib/prism/desugar_compiler.rb#28 def node; end # Returns the value of attribute read_class. # # source://prism//lib/prism/desugar_compiler.rb#28 def read_class; end # Returns the value of attribute source. # # source://prism//lib/prism/desugar_compiler.rb#28 def source; end # Returns the value of attribute write_class. # # source://prism//lib/prism/desugar_compiler.rb#28 def write_class; end end # source://prism//lib/prism/desugar_compiler.rb#99 class Prism::DesugarOrWriteNode # @return [DesugarOrWriteNode] a new instance of DesugarOrWriteNode # # source://prism//lib/prism/desugar_compiler.rb#102 def initialize(node, source, read_class, write_class, *arguments); end # Returns the value of attribute arguments. # # source://prism//lib/prism/desugar_compiler.rb#100 def arguments; end # Desugar `x ||= y` to `x || x = y` # # source://prism//lib/prism/desugar_compiler.rb#111 def compile; end # Returns the value of attribute node. # # source://prism//lib/prism/desugar_compiler.rb#100 def node; end # Returns the value of attribute read_class. # # source://prism//lib/prism/desugar_compiler.rb#100 def read_class; end # Returns the value of attribute source. # # source://prism//lib/prism/desugar_compiler.rb#100 def source; end # Returns the value of attribute write_class. # # source://prism//lib/prism/desugar_compiler.rb#100 def write_class; end end # The dispatcher class fires events for nodes that are found while walking an # AST to all registered listeners. It's useful for performing different types # of analysis on the AST while only having to walk the tree once. # # To use the dispatcher, you would first instantiate it and register listeners # for the events you're interested in: # # class OctalListener # def on_integer_node_enter(node) # if node.octal? && !node.slice.start_with?("0o") # warn("Octal integers should be written with the 0o prefix") # end # end # end # # dispatcher = Dispatcher.new # dispatcher.register(listener, :on_integer_node_enter) # # Then, you can walk any number of trees and dispatch events to the listeners: # # result = Prism.parse("001 + 002 + 003") # dispatcher.dispatch(result.value) # # Optionally, you can also use `#dispatch_once` to dispatch enter and leave # events for a single node without recursing further down the tree. This can # be useful in circumstances where you want to reuse the listeners you already # have registers but want to stop walking the tree at a certain point. # # integer = result.value.statements.body.first.receiver.receiver # dispatcher.dispatch_once(integer) # # source://prism//lib/prism/dispatcher.rb#41 class Prism::Dispatcher < ::Prism::Visitor # Initialize a new dispatcher. # # @return [Dispatcher] a new instance of Dispatcher # # source://prism//lib/prism/dispatcher.rb#45 def initialize; end # Walks `root` dispatching events to all registered listeners. # # def dispatch: (Node) -> void # # source://prism//lib/prism/visitor.rb#16 def dispatch(node); end # Dispatches a single event for `node` to all registered listeners. # # def dispatch_once: (Node) -> void # # source://prism//lib/prism/dispatcher.rb#64 def dispatch_once(node); end # attr_reader listeners: Hash[Symbol, Array[Listener]] # # source://prism//lib/prism/dispatcher.rb#42 def listeners; end # Register a listener for one or more events. # # def register: (Listener, *Symbol) -> void # # source://prism//lib/prism/dispatcher.rb#52 def register(listener, *events); end # Dispatch enter and leave events for AliasGlobalVariableNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#70 def visit_alias_global_variable_node(node); end # Dispatch enter and leave events for AliasMethodNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#78 def visit_alias_method_node(node); end # Dispatch enter and leave events for AlternationPatternNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#86 def visit_alternation_pattern_node(node); end # Dispatch enter and leave events for AndNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#94 def visit_and_node(node); end # Dispatch enter and leave events for ArgumentsNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#102 def visit_arguments_node(node); end # Dispatch enter and leave events for ArrayNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#110 def visit_array_node(node); end # Dispatch enter and leave events for ArrayPatternNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#118 def visit_array_pattern_node(node); end # Dispatch enter and leave events for AssocNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#126 def visit_assoc_node(node); end # Dispatch enter and leave events for AssocSplatNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#134 def visit_assoc_splat_node(node); end # Dispatch enter and leave events for BackReferenceReadNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#142 def visit_back_reference_read_node(node); end # Dispatch enter and leave events for BeginNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#150 def visit_begin_node(node); end # Dispatch enter and leave events for BlockArgumentNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#158 def visit_block_argument_node(node); end # Dispatch enter and leave events for BlockLocalVariableNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#166 def visit_block_local_variable_node(node); end # Dispatch enter and leave events for BlockNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#174 def visit_block_node(node); end # Dispatch enter and leave events for BlockParameterNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#182 def visit_block_parameter_node(node); end # Dispatch enter and leave events for BlockParametersNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#190 def visit_block_parameters_node(node); end # Dispatch enter and leave events for BreakNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#198 def visit_break_node(node); end # Dispatch enter and leave events for CallAndWriteNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#206 def visit_call_and_write_node(node); end # Dispatch enter and leave events for CallNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#214 def visit_call_node(node); end # Dispatch enter and leave events for CallOperatorWriteNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#222 def visit_call_operator_write_node(node); end # Dispatch enter and leave events for CallOrWriteNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#230 def visit_call_or_write_node(node); end # Dispatch enter and leave events for CallTargetNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#238 def visit_call_target_node(node); end # Dispatch enter and leave events for CapturePatternNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#246 def visit_capture_pattern_node(node); end # Dispatch enter and leave events for CaseMatchNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#254 def visit_case_match_node(node); end # Dispatch enter and leave events for CaseNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#262 def visit_case_node(node); end # Dispatch enter and leave events for ClassNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#270 def visit_class_node(node); end # Dispatch enter and leave events for ClassVariableAndWriteNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#278 def visit_class_variable_and_write_node(node); end # Dispatch enter and leave events for ClassVariableOperatorWriteNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#286 def visit_class_variable_operator_write_node(node); end # Dispatch enter and leave events for ClassVariableOrWriteNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#294 def visit_class_variable_or_write_node(node); end # Dispatch enter and leave events for ClassVariableReadNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#302 def visit_class_variable_read_node(node); end # Dispatch enter and leave events for ClassVariableTargetNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#310 def visit_class_variable_target_node(node); end # Dispatch enter and leave events for ClassVariableWriteNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#318 def visit_class_variable_write_node(node); end # Dispatch enter and leave events for ConstantAndWriteNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#326 def visit_constant_and_write_node(node); end # Dispatch enter and leave events for ConstantOperatorWriteNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#334 def visit_constant_operator_write_node(node); end # Dispatch enter and leave events for ConstantOrWriteNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#342 def visit_constant_or_write_node(node); end # Dispatch enter and leave events for ConstantPathAndWriteNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#350 def visit_constant_path_and_write_node(node); end # Dispatch enter and leave events for ConstantPathNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#358 def visit_constant_path_node(node); end # Dispatch enter and leave events for ConstantPathOperatorWriteNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#366 def visit_constant_path_operator_write_node(node); end # Dispatch enter and leave events for ConstantPathOrWriteNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#374 def visit_constant_path_or_write_node(node); end # Dispatch enter and leave events for ConstantPathTargetNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#382 def visit_constant_path_target_node(node); end # Dispatch enter and leave events for ConstantPathWriteNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#390 def visit_constant_path_write_node(node); end # Dispatch enter and leave events for ConstantReadNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#398 def visit_constant_read_node(node); end # Dispatch enter and leave events for ConstantTargetNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#406 def visit_constant_target_node(node); end # Dispatch enter and leave events for ConstantWriteNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#414 def visit_constant_write_node(node); end # Dispatch enter and leave events for DefNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#422 def visit_def_node(node); end # Dispatch enter and leave events for DefinedNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#430 def visit_defined_node(node); end # Dispatch enter and leave events for ElseNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#438 def visit_else_node(node); end # Dispatch enter and leave events for EmbeddedStatementsNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#446 def visit_embedded_statements_node(node); end # Dispatch enter and leave events for EmbeddedVariableNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#454 def visit_embedded_variable_node(node); end # Dispatch enter and leave events for EnsureNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#462 def visit_ensure_node(node); end # Dispatch enter and leave events for FalseNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#470 def visit_false_node(node); end # Dispatch enter and leave events for FindPatternNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#478 def visit_find_pattern_node(node); end # Dispatch enter and leave events for FlipFlopNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#486 def visit_flip_flop_node(node); end # Dispatch enter and leave events for FloatNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#494 def visit_float_node(node); end # Dispatch enter and leave events for ForNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#502 def visit_for_node(node); end # Dispatch enter and leave events for ForwardingArgumentsNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#510 def visit_forwarding_arguments_node(node); end # Dispatch enter and leave events for ForwardingParameterNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#518 def visit_forwarding_parameter_node(node); end # Dispatch enter and leave events for ForwardingSuperNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#526 def visit_forwarding_super_node(node); end # Dispatch enter and leave events for GlobalVariableAndWriteNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#534 def visit_global_variable_and_write_node(node); end # Dispatch enter and leave events for GlobalVariableOperatorWriteNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#542 def visit_global_variable_operator_write_node(node); end # Dispatch enter and leave events for GlobalVariableOrWriteNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#550 def visit_global_variable_or_write_node(node); end # Dispatch enter and leave events for GlobalVariableReadNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#558 def visit_global_variable_read_node(node); end # Dispatch enter and leave events for GlobalVariableTargetNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#566 def visit_global_variable_target_node(node); end # Dispatch enter and leave events for GlobalVariableWriteNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#574 def visit_global_variable_write_node(node); end # Dispatch enter and leave events for HashNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#582 def visit_hash_node(node); end # Dispatch enter and leave events for HashPatternNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#590 def visit_hash_pattern_node(node); end # Dispatch enter and leave events for IfNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#598 def visit_if_node(node); end # Dispatch enter and leave events for ImaginaryNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#606 def visit_imaginary_node(node); end # Dispatch enter and leave events for ImplicitNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#614 def visit_implicit_node(node); end # Dispatch enter and leave events for ImplicitRestNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#622 def visit_implicit_rest_node(node); end # Dispatch enter and leave events for InNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#630 def visit_in_node(node); end # Dispatch enter and leave events for IndexAndWriteNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#638 def visit_index_and_write_node(node); end # Dispatch enter and leave events for IndexOperatorWriteNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#646 def visit_index_operator_write_node(node); end # Dispatch enter and leave events for IndexOrWriteNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#654 def visit_index_or_write_node(node); end # Dispatch enter and leave events for IndexTargetNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#662 def visit_index_target_node(node); end # Dispatch enter and leave events for InstanceVariableAndWriteNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#670 def visit_instance_variable_and_write_node(node); end # Dispatch enter and leave events for InstanceVariableOperatorWriteNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#678 def visit_instance_variable_operator_write_node(node); end # Dispatch enter and leave events for InstanceVariableOrWriteNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#686 def visit_instance_variable_or_write_node(node); end # Dispatch enter and leave events for InstanceVariableReadNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#694 def visit_instance_variable_read_node(node); end # Dispatch enter and leave events for InstanceVariableTargetNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#702 def visit_instance_variable_target_node(node); end # Dispatch enter and leave events for InstanceVariableWriteNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#710 def visit_instance_variable_write_node(node); end # Dispatch enter and leave events for IntegerNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#718 def visit_integer_node(node); end # Dispatch enter and leave events for InterpolatedMatchLastLineNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#726 def visit_interpolated_match_last_line_node(node); end # Dispatch enter and leave events for InterpolatedRegularExpressionNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#734 def visit_interpolated_regular_expression_node(node); end # Dispatch enter and leave events for InterpolatedStringNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#742 def visit_interpolated_string_node(node); end # Dispatch enter and leave events for InterpolatedSymbolNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#750 def visit_interpolated_symbol_node(node); end # Dispatch enter and leave events for InterpolatedXStringNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#758 def visit_interpolated_x_string_node(node); end # Dispatch enter and leave events for KeywordHashNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#766 def visit_keyword_hash_node(node); end # Dispatch enter and leave events for KeywordRestParameterNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#774 def visit_keyword_rest_parameter_node(node); end # Dispatch enter and leave events for LambdaNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#782 def visit_lambda_node(node); end # Dispatch enter and leave events for LocalVariableAndWriteNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#790 def visit_local_variable_and_write_node(node); end # Dispatch enter and leave events for LocalVariableOperatorWriteNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#798 def visit_local_variable_operator_write_node(node); end # Dispatch enter and leave events for LocalVariableOrWriteNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#806 def visit_local_variable_or_write_node(node); end # Dispatch enter and leave events for LocalVariableReadNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#814 def visit_local_variable_read_node(node); end # Dispatch enter and leave events for LocalVariableTargetNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#822 def visit_local_variable_target_node(node); end # Dispatch enter and leave events for LocalVariableWriteNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#830 def visit_local_variable_write_node(node); end # Dispatch enter and leave events for MatchLastLineNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#838 def visit_match_last_line_node(node); end # Dispatch enter and leave events for MatchPredicateNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#846 def visit_match_predicate_node(node); end # Dispatch enter and leave events for MatchRequiredNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#854 def visit_match_required_node(node); end # Dispatch enter and leave events for MatchWriteNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#862 def visit_match_write_node(node); end # Dispatch enter and leave events for MissingNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#870 def visit_missing_node(node); end # Dispatch enter and leave events for ModuleNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#878 def visit_module_node(node); end # Dispatch enter and leave events for MultiTargetNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#886 def visit_multi_target_node(node); end # Dispatch enter and leave events for MultiWriteNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#894 def visit_multi_write_node(node); end # Dispatch enter and leave events for NextNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#902 def visit_next_node(node); end # Dispatch enter and leave events for NilNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#910 def visit_nil_node(node); end # Dispatch enter and leave events for NoKeywordsParameterNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#918 def visit_no_keywords_parameter_node(node); end # Dispatch enter and leave events for NumberedParametersNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#926 def visit_numbered_parameters_node(node); end # Dispatch enter and leave events for NumberedReferenceReadNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#934 def visit_numbered_reference_read_node(node); end # Dispatch enter and leave events for OptionalKeywordParameterNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#942 def visit_optional_keyword_parameter_node(node); end # Dispatch enter and leave events for OptionalParameterNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#950 def visit_optional_parameter_node(node); end # Dispatch enter and leave events for OrNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#958 def visit_or_node(node); end # Dispatch enter and leave events for ParametersNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#966 def visit_parameters_node(node); end # Dispatch enter and leave events for ParenthesesNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#974 def visit_parentheses_node(node); end # Dispatch enter and leave events for PinnedExpressionNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#982 def visit_pinned_expression_node(node); end # Dispatch enter and leave events for PinnedVariableNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#990 def visit_pinned_variable_node(node); end # Dispatch enter and leave events for PostExecutionNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#998 def visit_post_execution_node(node); end # Dispatch enter and leave events for PreExecutionNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#1006 def visit_pre_execution_node(node); end # Dispatch enter and leave events for ProgramNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#1014 def visit_program_node(node); end # Dispatch enter and leave events for RangeNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#1022 def visit_range_node(node); end # Dispatch enter and leave events for RationalNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#1030 def visit_rational_node(node); end # Dispatch enter and leave events for RedoNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#1038 def visit_redo_node(node); end # Dispatch enter and leave events for RegularExpressionNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#1046 def visit_regular_expression_node(node); end # Dispatch enter and leave events for RequiredKeywordParameterNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#1054 def visit_required_keyword_parameter_node(node); end # Dispatch enter and leave events for RequiredParameterNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#1062 def visit_required_parameter_node(node); end # Dispatch enter and leave events for RescueModifierNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#1070 def visit_rescue_modifier_node(node); end # Dispatch enter and leave events for RescueNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#1078 def visit_rescue_node(node); end # Dispatch enter and leave events for RestParameterNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#1086 def visit_rest_parameter_node(node); end # Dispatch enter and leave events for RetryNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#1094 def visit_retry_node(node); end # Dispatch enter and leave events for ReturnNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#1102 def visit_return_node(node); end # Dispatch enter and leave events for SelfNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#1110 def visit_self_node(node); end # Dispatch enter and leave events for SingletonClassNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#1118 def visit_singleton_class_node(node); end # Dispatch enter and leave events for SourceEncodingNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#1126 def visit_source_encoding_node(node); end # Dispatch enter and leave events for SourceFileNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#1134 def visit_source_file_node(node); end # Dispatch enter and leave events for SourceLineNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#1142 def visit_source_line_node(node); end # Dispatch enter and leave events for SplatNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#1150 def visit_splat_node(node); end # Dispatch enter and leave events for StatementsNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#1158 def visit_statements_node(node); end # Dispatch enter and leave events for StringNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#1166 def visit_string_node(node); end # Dispatch enter and leave events for SuperNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#1174 def visit_super_node(node); end # Dispatch enter and leave events for SymbolNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#1182 def visit_symbol_node(node); end # Dispatch enter and leave events for TrueNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#1190 def visit_true_node(node); end # Dispatch enter and leave events for UndefNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#1198 def visit_undef_node(node); end # Dispatch enter and leave events for UnlessNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#1206 def visit_unless_node(node); end # Dispatch enter and leave events for UntilNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#1214 def visit_until_node(node); end # Dispatch enter and leave events for WhenNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#1222 def visit_when_node(node); end # Dispatch enter and leave events for WhileNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#1230 def visit_while_node(node); end # Dispatch enter and leave events for XStringNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#1238 def visit_x_string_node(node); end # Dispatch enter and leave events for YieldNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#1246 def visit_yield_node(node); end end # source://prism//lib/prism/dispatcher.rb#1252 class Prism::Dispatcher::DispatchOnce < ::Prism::Visitor # @return [DispatchOnce] a new instance of DispatchOnce # # source://prism//lib/prism/dispatcher.rb#1255 def initialize(listeners); end # Returns the value of attribute listeners. # # source://prism//lib/prism/dispatcher.rb#1253 def listeners; end # Dispatch enter and leave events for AliasGlobalVariableNode nodes. # # source://prism//lib/prism/dispatcher.rb#1260 def visit_alias_global_variable_node(node); end # Dispatch enter and leave events for AliasMethodNode nodes. # # source://prism//lib/prism/dispatcher.rb#1266 def visit_alias_method_node(node); end # Dispatch enter and leave events for AlternationPatternNode nodes. # # source://prism//lib/prism/dispatcher.rb#1272 def visit_alternation_pattern_node(node); end # Dispatch enter and leave events for AndNode nodes. # # source://prism//lib/prism/dispatcher.rb#1278 def visit_and_node(node); end # Dispatch enter and leave events for ArgumentsNode nodes. # # source://prism//lib/prism/dispatcher.rb#1284 def visit_arguments_node(node); end # Dispatch enter and leave events for ArrayNode nodes. # # source://prism//lib/prism/dispatcher.rb#1290 def visit_array_node(node); end # Dispatch enter and leave events for ArrayPatternNode nodes. # # source://prism//lib/prism/dispatcher.rb#1296 def visit_array_pattern_node(node); end # Dispatch enter and leave events for AssocNode nodes. # # source://prism//lib/prism/dispatcher.rb#1302 def visit_assoc_node(node); end # Dispatch enter and leave events for AssocSplatNode nodes. # # source://prism//lib/prism/dispatcher.rb#1308 def visit_assoc_splat_node(node); end # Dispatch enter and leave events for BackReferenceReadNode nodes. # # source://prism//lib/prism/dispatcher.rb#1314 def visit_back_reference_read_node(node); end # Dispatch enter and leave events for BeginNode nodes. # # source://prism//lib/prism/dispatcher.rb#1320 def visit_begin_node(node); end # Dispatch enter and leave events for BlockArgumentNode nodes. # # source://prism//lib/prism/dispatcher.rb#1326 def visit_block_argument_node(node); end # Dispatch enter and leave events for BlockLocalVariableNode nodes. # # source://prism//lib/prism/dispatcher.rb#1332 def visit_block_local_variable_node(node); end # Dispatch enter and leave events for BlockNode nodes. # # source://prism//lib/prism/dispatcher.rb#1338 def visit_block_node(node); end # Dispatch enter and leave events for BlockParameterNode nodes. # # source://prism//lib/prism/dispatcher.rb#1344 def visit_block_parameter_node(node); end # Dispatch enter and leave events for BlockParametersNode nodes. # # source://prism//lib/prism/dispatcher.rb#1350 def visit_block_parameters_node(node); end # Dispatch enter and leave events for BreakNode nodes. # # source://prism//lib/prism/dispatcher.rb#1356 def visit_break_node(node); end # Dispatch enter and leave events for CallAndWriteNode nodes. # # source://prism//lib/prism/dispatcher.rb#1362 def visit_call_and_write_node(node); end # Dispatch enter and leave events for CallNode nodes. # # source://prism//lib/prism/dispatcher.rb#1368 def visit_call_node(node); end # Dispatch enter and leave events for CallOperatorWriteNode nodes. # # source://prism//lib/prism/dispatcher.rb#1374 def visit_call_operator_write_node(node); end # Dispatch enter and leave events for CallOrWriteNode nodes. # # source://prism//lib/prism/dispatcher.rb#1380 def visit_call_or_write_node(node); end # Dispatch enter and leave events for CallTargetNode nodes. # # source://prism//lib/prism/dispatcher.rb#1386 def visit_call_target_node(node); end # Dispatch enter and leave events for CapturePatternNode nodes. # # source://prism//lib/prism/dispatcher.rb#1392 def visit_capture_pattern_node(node); end # Dispatch enter and leave events for CaseMatchNode nodes. # # source://prism//lib/prism/dispatcher.rb#1398 def visit_case_match_node(node); end # Dispatch enter and leave events for CaseNode nodes. # # source://prism//lib/prism/dispatcher.rb#1404 def visit_case_node(node); end # Dispatch enter and leave events for ClassNode nodes. # # source://prism//lib/prism/dispatcher.rb#1410 def visit_class_node(node); end # Dispatch enter and leave events for ClassVariableAndWriteNode nodes. # # source://prism//lib/prism/dispatcher.rb#1416 def visit_class_variable_and_write_node(node); end # Dispatch enter and leave events for ClassVariableOperatorWriteNode nodes. # # source://prism//lib/prism/dispatcher.rb#1422 def visit_class_variable_operator_write_node(node); end # Dispatch enter and leave events for ClassVariableOrWriteNode nodes. # # source://prism//lib/prism/dispatcher.rb#1428 def visit_class_variable_or_write_node(node); end # Dispatch enter and leave events for ClassVariableReadNode nodes. # # source://prism//lib/prism/dispatcher.rb#1434 def visit_class_variable_read_node(node); end # Dispatch enter and leave events for ClassVariableTargetNode nodes. # # source://prism//lib/prism/dispatcher.rb#1440 def visit_class_variable_target_node(node); end # Dispatch enter and leave events for ClassVariableWriteNode nodes. # # source://prism//lib/prism/dispatcher.rb#1446 def visit_class_variable_write_node(node); end # Dispatch enter and leave events for ConstantAndWriteNode nodes. # # source://prism//lib/prism/dispatcher.rb#1452 def visit_constant_and_write_node(node); end # Dispatch enter and leave events for ConstantOperatorWriteNode nodes. # # source://prism//lib/prism/dispatcher.rb#1458 def visit_constant_operator_write_node(node); end # Dispatch enter and leave events for ConstantOrWriteNode nodes. # # source://prism//lib/prism/dispatcher.rb#1464 def visit_constant_or_write_node(node); end # Dispatch enter and leave events for ConstantPathAndWriteNode nodes. # # source://prism//lib/prism/dispatcher.rb#1470 def visit_constant_path_and_write_node(node); end # Dispatch enter and leave events for ConstantPathNode nodes. # # source://prism//lib/prism/dispatcher.rb#1476 def visit_constant_path_node(node); end # Dispatch enter and leave events for ConstantPathOperatorWriteNode nodes. # # source://prism//lib/prism/dispatcher.rb#1482 def visit_constant_path_operator_write_node(node); end # Dispatch enter and leave events for ConstantPathOrWriteNode nodes. # # source://prism//lib/prism/dispatcher.rb#1488 def visit_constant_path_or_write_node(node); end # Dispatch enter and leave events for ConstantPathTargetNode nodes. # # source://prism//lib/prism/dispatcher.rb#1494 def visit_constant_path_target_node(node); end # Dispatch enter and leave events for ConstantPathWriteNode nodes. # # source://prism//lib/prism/dispatcher.rb#1500 def visit_constant_path_write_node(node); end # Dispatch enter and leave events for ConstantReadNode nodes. # # source://prism//lib/prism/dispatcher.rb#1506 def visit_constant_read_node(node); end # Dispatch enter and leave events for ConstantTargetNode nodes. # # source://prism//lib/prism/dispatcher.rb#1512 def visit_constant_target_node(node); end # Dispatch enter and leave events for ConstantWriteNode nodes. # # source://prism//lib/prism/dispatcher.rb#1518 def visit_constant_write_node(node); end # Dispatch enter and leave events for DefNode nodes. # # source://prism//lib/prism/dispatcher.rb#1524 def visit_def_node(node); end # Dispatch enter and leave events for DefinedNode nodes. # # source://prism//lib/prism/dispatcher.rb#1530 def visit_defined_node(node); end # Dispatch enter and leave events for ElseNode nodes. # # source://prism//lib/prism/dispatcher.rb#1536 def visit_else_node(node); end # Dispatch enter and leave events for EmbeddedStatementsNode nodes. # # source://prism//lib/prism/dispatcher.rb#1542 def visit_embedded_statements_node(node); end # Dispatch enter and leave events for EmbeddedVariableNode nodes. # # source://prism//lib/prism/dispatcher.rb#1548 def visit_embedded_variable_node(node); end # Dispatch enter and leave events for EnsureNode nodes. # # source://prism//lib/prism/dispatcher.rb#1554 def visit_ensure_node(node); end # Dispatch enter and leave events for FalseNode nodes. # # source://prism//lib/prism/dispatcher.rb#1560 def visit_false_node(node); end # Dispatch enter and leave events for FindPatternNode nodes. # # source://prism//lib/prism/dispatcher.rb#1566 def visit_find_pattern_node(node); end # Dispatch enter and leave events for FlipFlopNode nodes. # # source://prism//lib/prism/dispatcher.rb#1572 def visit_flip_flop_node(node); end # Dispatch enter and leave events for FloatNode nodes. # # source://prism//lib/prism/dispatcher.rb#1578 def visit_float_node(node); end # Dispatch enter and leave events for ForNode nodes. # # source://prism//lib/prism/dispatcher.rb#1584 def visit_for_node(node); end # Dispatch enter and leave events for ForwardingArgumentsNode nodes. # # source://prism//lib/prism/dispatcher.rb#1590 def visit_forwarding_arguments_node(node); end # Dispatch enter and leave events for ForwardingParameterNode nodes. # # source://prism//lib/prism/dispatcher.rb#1596 def visit_forwarding_parameter_node(node); end # Dispatch enter and leave events for ForwardingSuperNode nodes. # # source://prism//lib/prism/dispatcher.rb#1602 def visit_forwarding_super_node(node); end # Dispatch enter and leave events for GlobalVariableAndWriteNode nodes. # # source://prism//lib/prism/dispatcher.rb#1608 def visit_global_variable_and_write_node(node); end # Dispatch enter and leave events for GlobalVariableOperatorWriteNode nodes. # # source://prism//lib/prism/dispatcher.rb#1614 def visit_global_variable_operator_write_node(node); end # Dispatch enter and leave events for GlobalVariableOrWriteNode nodes. # # source://prism//lib/prism/dispatcher.rb#1620 def visit_global_variable_or_write_node(node); end # Dispatch enter and leave events for GlobalVariableReadNode nodes. # # source://prism//lib/prism/dispatcher.rb#1626 def visit_global_variable_read_node(node); end # Dispatch enter and leave events for GlobalVariableTargetNode nodes. # # source://prism//lib/prism/dispatcher.rb#1632 def visit_global_variable_target_node(node); end # Dispatch enter and leave events for GlobalVariableWriteNode nodes. # # source://prism//lib/prism/dispatcher.rb#1638 def visit_global_variable_write_node(node); end # Dispatch enter and leave events for HashNode nodes. # # source://prism//lib/prism/dispatcher.rb#1644 def visit_hash_node(node); end # Dispatch enter and leave events for HashPatternNode nodes. # # source://prism//lib/prism/dispatcher.rb#1650 def visit_hash_pattern_node(node); end # Dispatch enter and leave events for IfNode nodes. # # source://prism//lib/prism/dispatcher.rb#1656 def visit_if_node(node); end # Dispatch enter and leave events for ImaginaryNode nodes. # # source://prism//lib/prism/dispatcher.rb#1662 def visit_imaginary_node(node); end # Dispatch enter and leave events for ImplicitNode nodes. # # source://prism//lib/prism/dispatcher.rb#1668 def visit_implicit_node(node); end # Dispatch enter and leave events for ImplicitRestNode nodes. # # source://prism//lib/prism/dispatcher.rb#1674 def visit_implicit_rest_node(node); end # Dispatch enter and leave events for InNode nodes. # # source://prism//lib/prism/dispatcher.rb#1680 def visit_in_node(node); end # Dispatch enter and leave events for IndexAndWriteNode nodes. # # source://prism//lib/prism/dispatcher.rb#1686 def visit_index_and_write_node(node); end # Dispatch enter and leave events for IndexOperatorWriteNode nodes. # # source://prism//lib/prism/dispatcher.rb#1692 def visit_index_operator_write_node(node); end # Dispatch enter and leave events for IndexOrWriteNode nodes. # # source://prism//lib/prism/dispatcher.rb#1698 def visit_index_or_write_node(node); end # Dispatch enter and leave events for IndexTargetNode nodes. # # source://prism//lib/prism/dispatcher.rb#1704 def visit_index_target_node(node); end # Dispatch enter and leave events for InstanceVariableAndWriteNode nodes. # # source://prism//lib/prism/dispatcher.rb#1710 def visit_instance_variable_and_write_node(node); end # Dispatch enter and leave events for InstanceVariableOperatorWriteNode nodes. # # source://prism//lib/prism/dispatcher.rb#1716 def visit_instance_variable_operator_write_node(node); end # Dispatch enter and leave events for InstanceVariableOrWriteNode nodes. # # source://prism//lib/prism/dispatcher.rb#1722 def visit_instance_variable_or_write_node(node); end # Dispatch enter and leave events for InstanceVariableReadNode nodes. # # source://prism//lib/prism/dispatcher.rb#1728 def visit_instance_variable_read_node(node); end # Dispatch enter and leave events for InstanceVariableTargetNode nodes. # # source://prism//lib/prism/dispatcher.rb#1734 def visit_instance_variable_target_node(node); end # Dispatch enter and leave events for InstanceVariableWriteNode nodes. # # source://prism//lib/prism/dispatcher.rb#1740 def visit_instance_variable_write_node(node); end # Dispatch enter and leave events for IntegerNode nodes. # # source://prism//lib/prism/dispatcher.rb#1746 def visit_integer_node(node); end # Dispatch enter and leave events for InterpolatedMatchLastLineNode nodes. # # source://prism//lib/prism/dispatcher.rb#1752 def visit_interpolated_match_last_line_node(node); end # Dispatch enter and leave events for InterpolatedRegularExpressionNode nodes. # # source://prism//lib/prism/dispatcher.rb#1758 def visit_interpolated_regular_expression_node(node); end # Dispatch enter and leave events for InterpolatedStringNode nodes. # # source://prism//lib/prism/dispatcher.rb#1764 def visit_interpolated_string_node(node); end # Dispatch enter and leave events for InterpolatedSymbolNode nodes. # # source://prism//lib/prism/dispatcher.rb#1770 def visit_interpolated_symbol_node(node); end # Dispatch enter and leave events for InterpolatedXStringNode nodes. # # source://prism//lib/prism/dispatcher.rb#1776 def visit_interpolated_x_string_node(node); end # Dispatch enter and leave events for KeywordHashNode nodes. # # source://prism//lib/prism/dispatcher.rb#1782 def visit_keyword_hash_node(node); end # Dispatch enter and leave events for KeywordRestParameterNode nodes. # # source://prism//lib/prism/dispatcher.rb#1788 def visit_keyword_rest_parameter_node(node); end # Dispatch enter and leave events for LambdaNode nodes. # # source://prism//lib/prism/dispatcher.rb#1794 def visit_lambda_node(node); end # Dispatch enter and leave events for LocalVariableAndWriteNode nodes. # # source://prism//lib/prism/dispatcher.rb#1800 def visit_local_variable_and_write_node(node); end # Dispatch enter and leave events for LocalVariableOperatorWriteNode nodes. # # source://prism//lib/prism/dispatcher.rb#1806 def visit_local_variable_operator_write_node(node); end # Dispatch enter and leave events for LocalVariableOrWriteNode nodes. # # source://prism//lib/prism/dispatcher.rb#1812 def visit_local_variable_or_write_node(node); end # Dispatch enter and leave events for LocalVariableReadNode nodes. # # source://prism//lib/prism/dispatcher.rb#1818 def visit_local_variable_read_node(node); end # Dispatch enter and leave events for LocalVariableTargetNode nodes. # # source://prism//lib/prism/dispatcher.rb#1824 def visit_local_variable_target_node(node); end # Dispatch enter and leave events for LocalVariableWriteNode nodes. # # source://prism//lib/prism/dispatcher.rb#1830 def visit_local_variable_write_node(node); end # Dispatch enter and leave events for MatchLastLineNode nodes. # # source://prism//lib/prism/dispatcher.rb#1836 def visit_match_last_line_node(node); end # Dispatch enter and leave events for MatchPredicateNode nodes. # # source://prism//lib/prism/dispatcher.rb#1842 def visit_match_predicate_node(node); end # Dispatch enter and leave events for MatchRequiredNode nodes. # # source://prism//lib/prism/dispatcher.rb#1848 def visit_match_required_node(node); end # Dispatch enter and leave events for MatchWriteNode nodes. # # source://prism//lib/prism/dispatcher.rb#1854 def visit_match_write_node(node); end # Dispatch enter and leave events for MissingNode nodes. # # source://prism//lib/prism/dispatcher.rb#1860 def visit_missing_node(node); end # Dispatch enter and leave events for ModuleNode nodes. # # source://prism//lib/prism/dispatcher.rb#1866 def visit_module_node(node); end # Dispatch enter and leave events for MultiTargetNode nodes. # # source://prism//lib/prism/dispatcher.rb#1872 def visit_multi_target_node(node); end # Dispatch enter and leave events for MultiWriteNode nodes. # # source://prism//lib/prism/dispatcher.rb#1878 def visit_multi_write_node(node); end # Dispatch enter and leave events for NextNode nodes. # # source://prism//lib/prism/dispatcher.rb#1884 def visit_next_node(node); end # Dispatch enter and leave events for NilNode nodes. # # source://prism//lib/prism/dispatcher.rb#1890 def visit_nil_node(node); end # Dispatch enter and leave events for NoKeywordsParameterNode nodes. # # source://prism//lib/prism/dispatcher.rb#1896 def visit_no_keywords_parameter_node(node); end # Dispatch enter and leave events for NumberedParametersNode nodes. # # source://prism//lib/prism/dispatcher.rb#1902 def visit_numbered_parameters_node(node); end # Dispatch enter and leave events for NumberedReferenceReadNode nodes. # # source://prism//lib/prism/dispatcher.rb#1908 def visit_numbered_reference_read_node(node); end # Dispatch enter and leave events for OptionalKeywordParameterNode nodes. # # source://prism//lib/prism/dispatcher.rb#1914 def visit_optional_keyword_parameter_node(node); end # Dispatch enter and leave events for OptionalParameterNode nodes. # # source://prism//lib/prism/dispatcher.rb#1920 def visit_optional_parameter_node(node); end # Dispatch enter and leave events for OrNode nodes. # # source://prism//lib/prism/dispatcher.rb#1926 def visit_or_node(node); end # Dispatch enter and leave events for ParametersNode nodes. # # source://prism//lib/prism/dispatcher.rb#1932 def visit_parameters_node(node); end # Dispatch enter and leave events for ParenthesesNode nodes. # # source://prism//lib/prism/dispatcher.rb#1938 def visit_parentheses_node(node); end # Dispatch enter and leave events for PinnedExpressionNode nodes. # # source://prism//lib/prism/dispatcher.rb#1944 def visit_pinned_expression_node(node); end # Dispatch enter and leave events for PinnedVariableNode nodes. # # source://prism//lib/prism/dispatcher.rb#1950 def visit_pinned_variable_node(node); end # Dispatch enter and leave events for PostExecutionNode nodes. # # source://prism//lib/prism/dispatcher.rb#1956 def visit_post_execution_node(node); end # Dispatch enter and leave events for PreExecutionNode nodes. # # source://prism//lib/prism/dispatcher.rb#1962 def visit_pre_execution_node(node); end # Dispatch enter and leave events for ProgramNode nodes. # # source://prism//lib/prism/dispatcher.rb#1968 def visit_program_node(node); end # Dispatch enter and leave events for RangeNode nodes. # # source://prism//lib/prism/dispatcher.rb#1974 def visit_range_node(node); end # Dispatch enter and leave events for RationalNode nodes. # # source://prism//lib/prism/dispatcher.rb#1980 def visit_rational_node(node); end # Dispatch enter and leave events for RedoNode nodes. # # source://prism//lib/prism/dispatcher.rb#1986 def visit_redo_node(node); end # Dispatch enter and leave events for RegularExpressionNode nodes. # # source://prism//lib/prism/dispatcher.rb#1992 def visit_regular_expression_node(node); end # Dispatch enter and leave events for RequiredKeywordParameterNode nodes. # # source://prism//lib/prism/dispatcher.rb#1998 def visit_required_keyword_parameter_node(node); end # Dispatch enter and leave events for RequiredParameterNode nodes. # # source://prism//lib/prism/dispatcher.rb#2004 def visit_required_parameter_node(node); end # Dispatch enter and leave events for RescueModifierNode nodes. # # source://prism//lib/prism/dispatcher.rb#2010 def visit_rescue_modifier_node(node); end # Dispatch enter and leave events for RescueNode nodes. # # source://prism//lib/prism/dispatcher.rb#2016 def visit_rescue_node(node); end # Dispatch enter and leave events for RestParameterNode nodes. # # source://prism//lib/prism/dispatcher.rb#2022 def visit_rest_parameter_node(node); end # Dispatch enter and leave events for RetryNode nodes. # # source://prism//lib/prism/dispatcher.rb#2028 def visit_retry_node(node); end # Dispatch enter and leave events for ReturnNode nodes. # # source://prism//lib/prism/dispatcher.rb#2034 def visit_return_node(node); end # Dispatch enter and leave events for SelfNode nodes. # # source://prism//lib/prism/dispatcher.rb#2040 def visit_self_node(node); end # Dispatch enter and leave events for SingletonClassNode nodes. # # source://prism//lib/prism/dispatcher.rb#2046 def visit_singleton_class_node(node); end # Dispatch enter and leave events for SourceEncodingNode nodes. # # source://prism//lib/prism/dispatcher.rb#2052 def visit_source_encoding_node(node); end # Dispatch enter and leave events for SourceFileNode nodes. # # source://prism//lib/prism/dispatcher.rb#2058 def visit_source_file_node(node); end # Dispatch enter and leave events for SourceLineNode nodes. # # source://prism//lib/prism/dispatcher.rb#2064 def visit_source_line_node(node); end # Dispatch enter and leave events for SplatNode nodes. # # source://prism//lib/prism/dispatcher.rb#2070 def visit_splat_node(node); end # Dispatch enter and leave events for StatementsNode nodes. # # source://prism//lib/prism/dispatcher.rb#2076 def visit_statements_node(node); end # Dispatch enter and leave events for StringNode nodes. # # source://prism//lib/prism/dispatcher.rb#2082 def visit_string_node(node); end # Dispatch enter and leave events for SuperNode nodes. # # source://prism//lib/prism/dispatcher.rb#2088 def visit_super_node(node); end # Dispatch enter and leave events for SymbolNode nodes. # # source://prism//lib/prism/dispatcher.rb#2094 def visit_symbol_node(node); end # Dispatch enter and leave events for TrueNode nodes. # # source://prism//lib/prism/dispatcher.rb#2100 def visit_true_node(node); end # Dispatch enter and leave events for UndefNode nodes. # # source://prism//lib/prism/dispatcher.rb#2106 def visit_undef_node(node); end # Dispatch enter and leave events for UnlessNode nodes. # # source://prism//lib/prism/dispatcher.rb#2112 def visit_unless_node(node); end # Dispatch enter and leave events for UntilNode nodes. # # source://prism//lib/prism/dispatcher.rb#2118 def visit_until_node(node); end # Dispatch enter and leave events for WhenNode nodes. # # source://prism//lib/prism/dispatcher.rb#2124 def visit_when_node(node); end # Dispatch enter and leave events for WhileNode nodes. # # source://prism//lib/prism/dispatcher.rb#2130 def visit_while_node(node); end # Dispatch enter and leave events for XStringNode nodes. # # source://prism//lib/prism/dispatcher.rb#2136 def visit_x_string_node(node); end # Dispatch enter and leave events for YieldNode nodes. # # source://prism//lib/prism/dispatcher.rb#2142 def visit_yield_node(node); end end # This visitor provides the ability to call Node#to_dot, which converts a # subtree into a graphviz dot graph. # # source://prism//lib/prism/dot_visitor.rb#13 class Prism::DotVisitor < ::Prism::Visitor # Initialize a new dot visitor. # # @return [DotVisitor] a new instance of DotVisitor # # source://prism//lib/prism/dot_visitor.rb#105 def initialize; end # The digraph that is being built. # # source://prism//lib/prism/dot_visitor.rb#102 def digraph; end # Convert this visitor into a graphviz dot graph string. # # source://prism//lib/prism/dot_visitor.rb#110 def to_dot; end # Visit a AliasGlobalVariableNode node. # # source://prism//lib/prism/dot_visitor.rb#115 def visit_alias_global_variable_node(node); end # Visit a AliasMethodNode node. # # source://prism//lib/prism/dot_visitor.rb#140 def visit_alias_method_node(node); end # Visit a AlternationPatternNode node. # # source://prism//lib/prism/dot_visitor.rb#165 def visit_alternation_pattern_node(node); end # Visit a AndNode node. # # source://prism//lib/prism/dot_visitor.rb#190 def visit_and_node(node); end # Visit a ArgumentsNode node. # # source://prism//lib/prism/dot_visitor.rb#215 def visit_arguments_node(node); end # Visit a ArrayNode node. # # source://prism//lib/prism/dot_visitor.rb#245 def visit_array_node(node); end # Visit a ArrayPatternNode node. # # source://prism//lib/prism/dot_visitor.rb#285 def visit_array_pattern_node(node); end # Visit a AssocNode node. # # source://prism//lib/prism/dot_visitor.rb#347 def visit_assoc_node(node); end # Visit a AssocSplatNode node. # # source://prism//lib/prism/dot_visitor.rb#374 def visit_assoc_splat_node(node); end # Visit a BackReferenceReadNode node. # # source://prism//lib/prism/dot_visitor.rb#397 def visit_back_reference_read_node(node); end # Visit a BeginNode node. # # source://prism//lib/prism/dot_visitor.rb#414 def visit_begin_node(node); end # Visit a BlockArgumentNode node. # # source://prism//lib/prism/dot_visitor.rb#462 def visit_block_argument_node(node); end # Visit a BlockLocalVariableNode node. # # source://prism//lib/prism/dot_visitor.rb#485 def visit_block_local_variable_node(node); end # Visit a BlockNode node. # # source://prism//lib/prism/dot_visitor.rb#505 def visit_block_node(node); end # Visit a BlockParameterNode node. # # source://prism//lib/prism/dot_visitor.rb#540 def visit_block_parameter_node(node); end # Visit a BlockParametersNode node. # # source://prism//lib/prism/dot_visitor.rb#568 def visit_block_parameters_node(node); end # Visit a BreakNode node. # # source://prism//lib/prism/dot_visitor.rb#611 def visit_break_node(node); end # Visit a CallAndWriteNode node. # # source://prism//lib/prism/dot_visitor.rb#634 def visit_call_and_write_node(node); end # Visit a CallNode node. # # source://prism//lib/prism/dot_visitor.rb#680 def visit_call_node(node); end # Visit a CallOperatorWriteNode node. # # source://prism//lib/prism/dot_visitor.rb#738 def visit_call_operator_write_node(node); end # Visit a CallOrWriteNode node. # # source://prism//lib/prism/dot_visitor.rb#787 def visit_call_or_write_node(node); end # Visit a CallTargetNode node. # # source://prism//lib/prism/dot_visitor.rb#833 def visit_call_target_node(node); end # Visit a CapturePatternNode node. # # source://prism//lib/prism/dot_visitor.rb#863 def visit_capture_pattern_node(node); end # Visit a CaseMatchNode node. # # source://prism//lib/prism/dot_visitor.rb#888 def visit_case_match_node(node); end # Visit a CaseNode node. # # source://prism//lib/prism/dot_visitor.rb#933 def visit_case_node(node); end # Visit a ClassNode node. # # source://prism//lib/prism/dot_visitor.rb#978 def visit_class_node(node); end # Visit a ClassVariableAndWriteNode node. # # source://prism//lib/prism/dot_visitor.rb#1025 def visit_class_variable_and_write_node(node); end # Visit a ClassVariableOperatorWriteNode node. # # source://prism//lib/prism/dot_visitor.rb#1052 def visit_class_variable_operator_write_node(node); end # Visit a ClassVariableOrWriteNode node. # # source://prism//lib/prism/dot_visitor.rb#1082 def visit_class_variable_or_write_node(node); end # Visit a ClassVariableReadNode node. # # source://prism//lib/prism/dot_visitor.rb#1109 def visit_class_variable_read_node(node); end # Visit a ClassVariableTargetNode node. # # source://prism//lib/prism/dot_visitor.rb#1126 def visit_class_variable_target_node(node); end # Visit a ClassVariableWriteNode node. # # source://prism//lib/prism/dot_visitor.rb#1143 def visit_class_variable_write_node(node); end # Visit a ConstantAndWriteNode node. # # source://prism//lib/prism/dot_visitor.rb#1172 def visit_constant_and_write_node(node); end # Visit a ConstantOperatorWriteNode node. # # source://prism//lib/prism/dot_visitor.rb#1199 def visit_constant_operator_write_node(node); end # Visit a ConstantOrWriteNode node. # # source://prism//lib/prism/dot_visitor.rb#1229 def visit_constant_or_write_node(node); end # Visit a ConstantPathAndWriteNode node. # # source://prism//lib/prism/dot_visitor.rb#1256 def visit_constant_path_and_write_node(node); end # Visit a ConstantPathNode node. # # source://prism//lib/prism/dot_visitor.rb#1281 def visit_constant_path_node(node); end # Visit a ConstantPathOperatorWriteNode node. # # source://prism//lib/prism/dot_visitor.rb#1308 def visit_constant_path_operator_write_node(node); end # Visit a ConstantPathOrWriteNode node. # # source://prism//lib/prism/dot_visitor.rb#1336 def visit_constant_path_or_write_node(node); end # Visit a ConstantPathTargetNode node. # # source://prism//lib/prism/dot_visitor.rb#1361 def visit_constant_path_target_node(node); end # Visit a ConstantPathWriteNode node. # # source://prism//lib/prism/dot_visitor.rb#1388 def visit_constant_path_write_node(node); end # Visit a ConstantReadNode node. # # source://prism//lib/prism/dot_visitor.rb#1413 def visit_constant_read_node(node); end # Visit a ConstantTargetNode node. # # source://prism//lib/prism/dot_visitor.rb#1430 def visit_constant_target_node(node); end # Visit a ConstantWriteNode node. # # source://prism//lib/prism/dot_visitor.rb#1447 def visit_constant_write_node(node); end # Visit a DefNode node. # # source://prism//lib/prism/dot_visitor.rb#1474 def visit_def_node(node); end # Visit a DefinedNode node. # # source://prism//lib/prism/dot_visitor.rb#1543 def visit_defined_node(node); end # Visit a ElseNode node. # # source://prism//lib/prism/dot_visitor.rb#1574 def visit_else_node(node); end # Visit a EmbeddedStatementsNode node. # # source://prism//lib/prism/dot_visitor.rb#1602 def visit_embedded_statements_node(node); end # Visit a EmbeddedVariableNode node. # # source://prism//lib/prism/dot_visitor.rb#1628 def visit_embedded_variable_node(node); end # Visit a EnsureNode node. # # source://prism//lib/prism/dot_visitor.rb#1649 def visit_ensure_node(node); end # Visit a FalseNode node. # # source://prism//lib/prism/dot_visitor.rb#1675 def visit_false_node(node); end # Visit a FindPatternNode node. # # source://prism//lib/prism/dot_visitor.rb#1689 def visit_find_pattern_node(node); end # Visit a FlipFlopNode node. # # source://prism//lib/prism/dot_visitor.rb#1740 def visit_flip_flop_node(node); end # Visit a FloatNode node. # # source://prism//lib/prism/dot_visitor.rb#1772 def visit_float_node(node); end # Visit a ForNode node. # # source://prism//lib/prism/dot_visitor.rb#1786 def visit_for_node(node); end # Visit a ForwardingArgumentsNode node. # # source://prism//lib/prism/dot_visitor.rb#1828 def visit_forwarding_arguments_node(node); end # Visit a ForwardingParameterNode node. # # source://prism//lib/prism/dot_visitor.rb#1842 def visit_forwarding_parameter_node(node); end # Visit a ForwardingSuperNode node. # # source://prism//lib/prism/dot_visitor.rb#1856 def visit_forwarding_super_node(node); end # Visit a GlobalVariableAndWriteNode node. # # source://prism//lib/prism/dot_visitor.rb#1876 def visit_global_variable_and_write_node(node); end # Visit a GlobalVariableOperatorWriteNode node. # # source://prism//lib/prism/dot_visitor.rb#1903 def visit_global_variable_operator_write_node(node); end # Visit a GlobalVariableOrWriteNode node. # # source://prism//lib/prism/dot_visitor.rb#1933 def visit_global_variable_or_write_node(node); end # Visit a GlobalVariableReadNode node. # # source://prism//lib/prism/dot_visitor.rb#1960 def visit_global_variable_read_node(node); end # Visit a GlobalVariableTargetNode node. # # source://prism//lib/prism/dot_visitor.rb#1977 def visit_global_variable_target_node(node); end # Visit a GlobalVariableWriteNode node. # # source://prism//lib/prism/dot_visitor.rb#1994 def visit_global_variable_write_node(node); end # Visit a HashNode node. # # source://prism//lib/prism/dot_visitor.rb#2021 def visit_hash_node(node); end # Visit a HashPatternNode node. # # source://prism//lib/prism/dot_visitor.rb#2054 def visit_hash_pattern_node(node); end # Visit a IfNode node. # # source://prism//lib/prism/dot_visitor.rb#2103 def visit_if_node(node); end # Visit a ImaginaryNode node. # # source://prism//lib/prism/dot_visitor.rb#2148 def visit_imaginary_node(node); end # Visit a ImplicitNode node. # # source://prism//lib/prism/dot_visitor.rb#2166 def visit_implicit_node(node); end # Visit a ImplicitRestNode node. # # source://prism//lib/prism/dot_visitor.rb#2184 def visit_implicit_rest_node(node); end # Visit a InNode node. # # source://prism//lib/prism/dot_visitor.rb#2198 def visit_in_node(node); end # Visit a IndexAndWriteNode node. # # source://prism//lib/prism/dot_visitor.rb#2230 def visit_index_and_write_node(node); end # Visit a IndexOperatorWriteNode node. # # source://prism//lib/prism/dot_visitor.rb#2283 def visit_index_operator_write_node(node); end # Visit a IndexOrWriteNode node. # # source://prism//lib/prism/dot_visitor.rb#2339 def visit_index_or_write_node(node); end # Visit a IndexTargetNode node. # # source://prism//lib/prism/dot_visitor.rb#2392 def visit_index_target_node(node); end # Visit a InstanceVariableAndWriteNode node. # # source://prism//lib/prism/dot_visitor.rb#2431 def visit_instance_variable_and_write_node(node); end # Visit a InstanceVariableOperatorWriteNode node. # # source://prism//lib/prism/dot_visitor.rb#2458 def visit_instance_variable_operator_write_node(node); end # Visit a InstanceVariableOrWriteNode node. # # source://prism//lib/prism/dot_visitor.rb#2488 def visit_instance_variable_or_write_node(node); end # Visit a InstanceVariableReadNode node. # # source://prism//lib/prism/dot_visitor.rb#2515 def visit_instance_variable_read_node(node); end # Visit a InstanceVariableTargetNode node. # # source://prism//lib/prism/dot_visitor.rb#2532 def visit_instance_variable_target_node(node); end # Visit a InstanceVariableWriteNode node. # # source://prism//lib/prism/dot_visitor.rb#2549 def visit_instance_variable_write_node(node); end # Visit a IntegerNode node. # # source://prism//lib/prism/dot_visitor.rb#2576 def visit_integer_node(node); end # Visit a InterpolatedMatchLastLineNode node. # # source://prism//lib/prism/dot_visitor.rb#2593 def visit_interpolated_match_last_line_node(node); end # Visit a InterpolatedRegularExpressionNode node. # # source://prism//lib/prism/dot_visitor.rb#2629 def visit_interpolated_regular_expression_node(node); end # Visit a InterpolatedStringNode node. # # source://prism//lib/prism/dot_visitor.rb#2665 def visit_interpolated_string_node(node); end # Visit a InterpolatedSymbolNode node. # # source://prism//lib/prism/dot_visitor.rb#2702 def visit_interpolated_symbol_node(node); end # Visit a InterpolatedXStringNode node. # # source://prism//lib/prism/dot_visitor.rb#2739 def visit_interpolated_x_string_node(node); end # Visit a KeywordHashNode node. # # source://prism//lib/prism/dot_visitor.rb#2772 def visit_keyword_hash_node(node); end # Visit a KeywordRestParameterNode node. # # source://prism//lib/prism/dot_visitor.rb#2802 def visit_keyword_rest_parameter_node(node); end # Visit a LambdaNode node. # # source://prism//lib/prism/dot_visitor.rb#2830 def visit_lambda_node(node); end # Visit a LocalVariableAndWriteNode node. # # source://prism//lib/prism/dot_visitor.rb#2868 def visit_local_variable_and_write_node(node); end # Visit a LocalVariableOperatorWriteNode node. # # source://prism//lib/prism/dot_visitor.rb#2898 def visit_local_variable_operator_write_node(node); end # Visit a LocalVariableOrWriteNode node. # # source://prism//lib/prism/dot_visitor.rb#2931 def visit_local_variable_or_write_node(node); end # Visit a LocalVariableReadNode node. # # source://prism//lib/prism/dot_visitor.rb#2961 def visit_local_variable_read_node(node); end # Visit a LocalVariableTargetNode node. # # source://prism//lib/prism/dot_visitor.rb#2981 def visit_local_variable_target_node(node); end # Visit a LocalVariableWriteNode node. # # source://prism//lib/prism/dot_visitor.rb#3001 def visit_local_variable_write_node(node); end # Visit a MatchLastLineNode node. # # source://prism//lib/prism/dot_visitor.rb#3031 def visit_match_last_line_node(node); end # Visit a MatchPredicateNode node. # # source://prism//lib/prism/dot_visitor.rb#3060 def visit_match_predicate_node(node); end # Visit a MatchRequiredNode node. # # source://prism//lib/prism/dot_visitor.rb#3085 def visit_match_required_node(node); end # Visit a MatchWriteNode node. # # source://prism//lib/prism/dot_visitor.rb#3110 def visit_match_write_node(node); end # Visit a MissingNode node. # # source://prism//lib/prism/dot_visitor.rb#3141 def visit_missing_node(node); end # Visit a ModuleNode node. # # source://prism//lib/prism/dot_visitor.rb#3155 def visit_module_node(node); end # Visit a MultiTargetNode node. # # source://prism//lib/prism/dot_visitor.rb#3191 def visit_multi_target_node(node); end # Visit a MultiWriteNode node. # # source://prism//lib/prism/dot_visitor.rb#3247 def visit_multi_write_node(node); end # Visit a NextNode node. # # source://prism//lib/prism/dot_visitor.rb#3310 def visit_next_node(node); end # Visit a NilNode node. # # source://prism//lib/prism/dot_visitor.rb#3333 def visit_nil_node(node); end # Visit a NoKeywordsParameterNode node. # # source://prism//lib/prism/dot_visitor.rb#3347 def visit_no_keywords_parameter_node(node); end # Visit a NumberedParametersNode node. # # source://prism//lib/prism/dot_visitor.rb#3367 def visit_numbered_parameters_node(node); end # Visit a NumberedReferenceReadNode node. # # source://prism//lib/prism/dot_visitor.rb#3384 def visit_numbered_reference_read_node(node); end # Visit a OptionalKeywordParameterNode node. # # source://prism//lib/prism/dot_visitor.rb#3401 def visit_optional_keyword_parameter_node(node); end # Visit a OptionalParameterNode node. # # source://prism//lib/prism/dot_visitor.rb#3428 def visit_optional_parameter_node(node); end # Visit a OrNode node. # # source://prism//lib/prism/dot_visitor.rb#3458 def visit_or_node(node); end # Visit a ParametersNode node. # # source://prism//lib/prism/dot_visitor.rb#3483 def visit_parameters_node(node); end # Visit a ParenthesesNode node. # # source://prism//lib/prism/dot_visitor.rb#3567 def visit_parentheses_node(node); end # Visit a PinnedExpressionNode node. # # source://prism//lib/prism/dot_visitor.rb#3593 def visit_pinned_expression_node(node); end # Visit a PinnedVariableNode node. # # source://prism//lib/prism/dot_visitor.rb#3620 def visit_pinned_variable_node(node); end # Visit a PostExecutionNode node. # # source://prism//lib/prism/dot_visitor.rb#3641 def visit_post_execution_node(node); end # Visit a PreExecutionNode node. # # source://prism//lib/prism/dot_visitor.rb#3670 def visit_pre_execution_node(node); end # Visit a ProgramNode node. # # source://prism//lib/prism/dot_visitor.rb#3699 def visit_program_node(node); end # Visit a RangeNode node. # # source://prism//lib/prism/dot_visitor.rb#3720 def visit_range_node(node); end # Visit a RationalNode node. # # source://prism//lib/prism/dot_visitor.rb#3752 def visit_rational_node(node); end # Visit a RedoNode node. # # source://prism//lib/prism/dot_visitor.rb#3770 def visit_redo_node(node); end # Visit a RegularExpressionNode node. # # source://prism//lib/prism/dot_visitor.rb#3784 def visit_regular_expression_node(node); end # Visit a RequiredKeywordParameterNode node. # # source://prism//lib/prism/dot_visitor.rb#3813 def visit_required_keyword_parameter_node(node); end # Visit a RequiredParameterNode node. # # source://prism//lib/prism/dot_visitor.rb#3836 def visit_required_parameter_node(node); end # Visit a RescueModifierNode node. # # source://prism//lib/prism/dot_visitor.rb#3856 def visit_rescue_modifier_node(node); end # Visit a RescueNode node. # # source://prism//lib/prism/dot_visitor.rb#3881 def visit_rescue_node(node); end # Visit a RestParameterNode node. # # source://prism//lib/prism/dot_visitor.rb#3934 def visit_rest_parameter_node(node); end # Visit a RetryNode node. # # source://prism//lib/prism/dot_visitor.rb#3962 def visit_retry_node(node); end # Visit a ReturnNode node. # # source://prism//lib/prism/dot_visitor.rb#3976 def visit_return_node(node); end # Visit a SelfNode node. # # source://prism//lib/prism/dot_visitor.rb#3999 def visit_self_node(node); end # Visit a SingletonClassNode node. # # source://prism//lib/prism/dot_visitor.rb#4013 def visit_singleton_class_node(node); end # Visit a SourceEncodingNode node. # # source://prism//lib/prism/dot_visitor.rb#4049 def visit_source_encoding_node(node); end # Visit a SourceFileNode node. # # source://prism//lib/prism/dot_visitor.rb#4063 def visit_source_file_node(node); end # Visit a SourceLineNode node. # # source://prism//lib/prism/dot_visitor.rb#4080 def visit_source_line_node(node); end # Visit a SplatNode node. # # source://prism//lib/prism/dot_visitor.rb#4094 def visit_splat_node(node); end # Visit a StatementsNode node. # # source://prism//lib/prism/dot_visitor.rb#4117 def visit_statements_node(node); end # Visit a StringNode node. # # source://prism//lib/prism/dot_visitor.rb#4144 def visit_string_node(node); end # Visit a SuperNode node. # # source://prism//lib/prism/dot_visitor.rb#4177 def visit_super_node(node); end # Visit a SymbolNode node. # # source://prism//lib/prism/dot_visitor.rb#4216 def visit_symbol_node(node); end # Visit a TrueNode node. # # source://prism//lib/prism/dot_visitor.rb#4251 def visit_true_node(node); end # Visit a UndefNode node. # # source://prism//lib/prism/dot_visitor.rb#4265 def visit_undef_node(node); end # Visit a UnlessNode node. # # source://prism//lib/prism/dot_visitor.rb#4295 def visit_unless_node(node); end # Visit a UntilNode node. # # source://prism//lib/prism/dot_visitor.rb#4338 def visit_until_node(node); end # Visit a WhenNode node. # # source://prism//lib/prism/dot_visitor.rb#4373 def visit_when_node(node); end # Visit a WhileNode node. # # source://prism//lib/prism/dot_visitor.rb#4409 def visit_while_node(node); end # Visit a XStringNode node. # # source://prism//lib/prism/dot_visitor.rb#4444 def visit_x_string_node(node); end # Visit a YieldNode node. # # source://prism//lib/prism/dot_visitor.rb#4473 def visit_yield_node(node); end private # Inspect a node that has arguments_node_flags flags to display the flags as a # comma-separated list. # # source://prism//lib/prism/dot_visitor.rb#4519 def arguments_node_flags_inspect(node); end # Inspect a node that has array_node_flags flags to display the flags as a # comma-separated list. # # source://prism//lib/prism/dot_visitor.rb#4527 def array_node_flags_inspect(node); end # Inspect a node that has call_node_flags flags to display the flags as a # comma-separated list. # # source://prism//lib/prism/dot_visitor.rb#4535 def call_node_flags_inspect(node); end # Inspect a node that has encoding_flags flags to display the flags as a # comma-separated list. # # source://prism//lib/prism/dot_visitor.rb#4546 def encoding_flags_inspect(node); end # Inspect a node that has integer_base_flags flags to display the flags as a # comma-separated list. # # source://prism//lib/prism/dot_visitor.rb#4555 def integer_base_flags_inspect(node); end # Inspect a node that has keyword_hash_node_flags flags to display the flags as a # comma-separated list. # # source://prism//lib/prism/dot_visitor.rb#4566 def keyword_hash_node_flags_inspect(node); end # Inspect a location to display the start and end line and column numbers. # # source://prism//lib/prism/dot_visitor.rb#4513 def location_inspect(location); end # Inspect a node that has loop_flags flags to display the flags as a # comma-separated list. # # source://prism//lib/prism/dot_visitor.rb#4574 def loop_flags_inspect(node); end # Generate a unique node ID for a node throughout the digraph. # # source://prism//lib/prism/dot_visitor.rb#4508 def node_id(node); end # Inspect a node that has parameter_flags flags to display the flags as a # comma-separated list. # # source://prism//lib/prism/dot_visitor.rb#4582 def parameter_flags_inspect(node); end # Inspect a node that has range_flags flags to display the flags as a # comma-separated list. # # source://prism//lib/prism/dot_visitor.rb#4590 def range_flags_inspect(node); end # Inspect a node that has regular_expression_flags flags to display the flags as a # comma-separated list. # # source://prism//lib/prism/dot_visitor.rb#4598 def regular_expression_flags_inspect(node); end # Inspect a node that has string_flags flags to display the flags as a # comma-separated list. # # source://prism//lib/prism/dot_visitor.rb#4616 def string_flags_inspect(node); end # Inspect a node that has symbol_flags flags to display the flags as a # comma-separated list. # # source://prism//lib/prism/dot_visitor.rb#4626 def symbol_flags_inspect(node); end end # source://prism//lib/prism/dot_visitor.rb#58 class Prism::DotVisitor::Digraph # @return [Digraph] a new instance of Digraph # # source://prism//lib/prism/dot_visitor.rb#61 def initialize; end # source://prism//lib/prism/dot_visitor.rb#75 def edge(value); end # Returns the value of attribute edges. # # source://prism//lib/prism/dot_visitor.rb#59 def edges; end # source://prism//lib/prism/dot_visitor.rb#67 def node(value); end # Returns the value of attribute nodes. # # source://prism//lib/prism/dot_visitor.rb#59 def nodes; end # source://prism//lib/prism/dot_visitor.rb#79 def to_dot; end # source://prism//lib/prism/dot_visitor.rb#71 def waypoint(value); end # Returns the value of attribute waypoints. # # source://prism//lib/prism/dot_visitor.rb#59 def waypoints; end end # source://prism//lib/prism/dot_visitor.rb#14 class Prism::DotVisitor::Field # @return [Field] a new instance of Field # # source://prism//lib/prism/dot_visitor.rb#17 def initialize(name, value, port); end # Returns the value of attribute name. # # source://prism//lib/prism/dot_visitor.rb#15 def name; end # Returns the value of attribute port. # # source://prism//lib/prism/dot_visitor.rb#15 def port; end # source://prism//lib/prism/dot_visitor.rb#23 def to_dot; end # Returns the value of attribute value. # # source://prism//lib/prism/dot_visitor.rb#15 def value; end end # source://prism//lib/prism/dot_visitor.rb#32 class Prism::DotVisitor::Table # @return [Table] a new instance of Table # # source://prism//lib/prism/dot_visitor.rb#35 def initialize(name); end # source://prism//lib/prism/dot_visitor.rb#40 def field(name, value = T.unsafe(nil), port: T.unsafe(nil)); end # Returns the value of attribute fields. # # source://prism//lib/prism/dot_visitor.rb#33 def fields; end # Returns the value of attribute name. # # source://prism//lib/prism/dot_visitor.rb#33 def name; end # source://prism//lib/prism/dot_visitor.rb#44 def to_dot; end end # Represents an `else` clause in a `case`, `if`, or `unless` statement. # # if a then b else c end # ^^^^^^^^^^ # # source://prism//lib/prism/node.rb#6291 class Prism::ElseNode < ::Prism::Node # def initialize: (Location else_keyword_loc, StatementsNode? statements, Location? end_keyword_loc, Location location) -> void # # @return [ElseNode] a new instance of ElseNode # # source://prism//lib/prism/node.rb#6292 def initialize(source, else_keyword_loc, statements, end_keyword_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#6302 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#6307 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#6319 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#6312 def compact_child_nodes; end # def copy: (**params) -> ElseNode # # source://prism//lib/prism/node.rb#6324 sig { params(params: T.untyped).returns(Prism::ElseNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#6307 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { else_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location?, location: Location } # # source://prism//lib/prism/node.rb#6338 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def else_keyword: () -> String # # source://prism//lib/prism/node.rb#6365 sig { returns(String) } def else_keyword; end # attr_reader else_keyword_loc: Location # # source://prism//lib/prism/node.rb#6343 sig { returns(Prism::Location) } def else_keyword_loc; end # def end_keyword: () -> String? # # source://prism//lib/prism/node.rb#6370 sig { returns(T.nilable(String)) } def end_keyword; end # attr_reader end_keyword_loc: Location? # # source://prism//lib/prism/node.rb#6352 sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#6375 def inspect(inspector = T.unsafe(nil)); end # attr_reader statements: StatementsNode? # # source://prism//lib/prism/node.rb#6349 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#6402 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#6412 def type; end end end # EmbDocComment objects correspond to comments that are surrounded by =begin # and =end. # # source://prism//lib/prism/parse_result.rb#291 class Prism::EmbDocComment < ::Prism::Comment # Returns a string representation of this comment. # # source://prism//lib/prism/parse_result.rb#297 def inspect; end # This can only be true for inline comments. # # @return [Boolean] # # source://prism//lib/prism/parse_result.rb#292 def trailing?; end end # Represents an interpolated set of statements. # # "foo #{bar}" # ^^^^^^ # # source://prism//lib/prism/node.rb#6422 class Prism::EmbeddedStatementsNode < ::Prism::Node # def initialize: (Location opening_loc, StatementsNode? statements, Location closing_loc, Location location) -> void # # @return [EmbeddedStatementsNode] a new instance of EmbeddedStatementsNode # # source://prism//lib/prism/node.rb#6423 def initialize(source, opening_loc, statements, closing_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#6433 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#6438 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # # source://prism//lib/prism/node.rb#6495 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # # source://prism//lib/prism/node.rb#6483 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#6450 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#6443 def compact_child_nodes; end # def copy: (**params) -> EmbeddedStatementsNode # # source://prism//lib/prism/node.rb#6455 sig { params(params: T.untyped).returns(Prism::EmbeddedStatementsNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#6438 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location, statements: StatementsNode?, closing_loc: Location, location: Location } # # source://prism//lib/prism/node.rb#6469 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#6500 def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String # # source://prism//lib/prism/node.rb#6490 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # # source://prism//lib/prism/node.rb#6474 sig { returns(Prism::Location) } def opening_loc; end # attr_reader statements: StatementsNode? # # source://prism//lib/prism/node.rb#6480 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#6527 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#6537 def type; end end end # Represents an interpolated variable. # # "foo #@bar" # ^^^^^ # # source://prism//lib/prism/node.rb#6547 class Prism::EmbeddedVariableNode < ::Prism::Node # def initialize: (Location operator_loc, Node variable, Location location) -> void # # @return [EmbeddedVariableNode] a new instance of EmbeddedVariableNode # # source://prism//lib/prism/node.rb#6548 def initialize(source, operator_loc, variable, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#6557 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#6562 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#6572 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#6567 def compact_child_nodes; end # def copy: (**params) -> EmbeddedVariableNode # # source://prism//lib/prism/node.rb#6577 sig { params(params: T.untyped).returns(Prism::EmbeddedVariableNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#6562 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { operator_loc: Location, variable: Node, location: Location } # # source://prism//lib/prism/node.rb#6590 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#6610 def inspect(inspector = T.unsafe(nil)); end # def operator: () -> String # # source://prism//lib/prism/node.rb#6605 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism//lib/prism/node.rb#6595 sig { returns(Prism::Location) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#6632 def type; end # attr_reader variable: Node # # source://prism//lib/prism/node.rb#6601 sig { returns(Prism::Node) } def variable; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#6642 def type; end end end # Flags for nodes that have unescaped content. # # source://prism//lib/prism/node.rb#19268 module Prism::EncodingFlags; end # internal bytes forced the encoding to binary # # source://prism//lib/prism/node.rb#19273 Prism::EncodingFlags::FORCED_BINARY_ENCODING = T.let(T.unsafe(nil), Integer) # internal bytes forced the encoding to UTF-8 # # source://prism//lib/prism/node.rb#19270 Prism::EncodingFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) # Represents an `ensure` clause in a `begin` statement. # # begin # foo # ensure # ^^^^^^ # bar # end # # source://prism//lib/prism/node.rb#6656 class Prism::EnsureNode < ::Prism::Node # def initialize: (Location ensure_keyword_loc, StatementsNode? statements, Location end_keyword_loc, Location location) -> void # # @return [EnsureNode] a new instance of EnsureNode # # source://prism//lib/prism/node.rb#6657 def initialize(source, ensure_keyword_loc, statements, end_keyword_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#6667 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#6672 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#6684 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#6677 def compact_child_nodes; end # def copy: (**params) -> EnsureNode # # source://prism//lib/prism/node.rb#6689 sig { params(params: T.untyped).returns(Prism::EnsureNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#6672 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { ensure_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location, location: Location } # # source://prism//lib/prism/node.rb#6703 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def end_keyword: () -> String # # source://prism//lib/prism/node.rb#6729 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # # source://prism//lib/prism/node.rb#6717 sig { returns(Prism::Location) } def end_keyword_loc; end # def ensure_keyword: () -> String # # source://prism//lib/prism/node.rb#6724 sig { returns(String) } def ensure_keyword; end # attr_reader ensure_keyword_loc: Location # # source://prism//lib/prism/node.rb#6708 sig { returns(Prism::Location) } def ensure_keyword_loc; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#6734 def inspect(inspector = T.unsafe(nil)); end # attr_reader statements: StatementsNode? # # source://prism//lib/prism/node.rb#6714 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#6761 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#6771 def type; end end end # Represents the use of the literal `false` keyword. # # false # ^^^^^ # # source://prism//lib/prism/node.rb#6781 class Prism::FalseNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [FalseNode] a new instance of FalseNode # # source://prism//lib/prism/node.rb#6782 def initialize(source, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#6789 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#6794 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#6804 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#6799 def compact_child_nodes; end # def copy: (**params) -> FalseNode # # source://prism//lib/prism/node.rb#6809 sig { params(params: T.untyped).returns(Prism::FalseNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#6794 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } # # source://prism//lib/prism/node.rb#6820 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#6826 def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#6845 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#6855 def type; end end end # Represents a find pattern in pattern matching. # # foo in *bar, baz, *qux # ^^^^^^^^^^^^^^^ # # foo in [*bar, baz, *qux] # ^^^^^^^^^^^^^^^^^ # # foo in Foo(*bar, baz, *qux) # ^^^^^^^^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#6871 class Prism::FindPatternNode < ::Prism::Node # def initialize: (Node? constant, Node left, Array[Node] requireds, Node right, Location? opening_loc, Location? closing_loc, Location location) -> void # # @return [FindPatternNode] a new instance of FindPatternNode # # source://prism//lib/prism/node.rb#6872 def initialize(source, constant, left, requireds, right, opening_loc, closing_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#6885 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#6890 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # # source://prism//lib/prism/node.rb#6974 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # # source://prism//lib/prism/node.rb#6956 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#6905 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#6895 def compact_child_nodes; end # attr_reader constant: Node? # # source://prism//lib/prism/node.rb#6932 sig { returns(T.nilable(Prism::Node)) } def constant; end # def copy: (**params) -> FindPatternNode # # source://prism//lib/prism/node.rb#6910 sig { params(params: T.untyped).returns(Prism::FindPatternNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#6890 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { constant: Node?, left: Node, requireds: Array[Node], right: Node, opening_loc: Location?, closing_loc: Location?, location: Location } # # source://prism//lib/prism/node.rb#6927 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#6979 def inspect(inspector = T.unsafe(nil)); end # attr_reader left: Node # # source://prism//lib/prism/node.rb#6935 sig { returns(Prism::Node) } def left; end # def opening: () -> String? # # source://prism//lib/prism/node.rb#6969 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # # source://prism//lib/prism/node.rb#6944 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader requireds: Array[Node] # # source://prism//lib/prism/node.rb#6938 sig { returns(T::Array[Prism::Node]) } def requireds; end # attr_reader right: Node # # source://prism//lib/prism/node.rb#6941 sig { returns(Prism::Node) } def right; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#7011 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#7021 def type; end end end # Represents the use of the `..` or `...` operators to create flip flops. # # baz if foo .. bar # ^^^^^^^^^^ # # source://prism//lib/prism/node.rb#7031 class Prism::FlipFlopNode < ::Prism::Node # def initialize: (Integer flags, Node? left, Node? right, Location operator_loc, Location location) -> void # # @return [FlipFlopNode] a new instance of FlipFlopNode # # source://prism//lib/prism/node.rb#7032 def initialize(source, flags, left, right, operator_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#7043 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#7048 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#7061 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#7053 def compact_child_nodes; end # def copy: (**params) -> FlipFlopNode # # source://prism//lib/prism/node.rb#7066 sig { params(params: T.untyped).returns(Prism::FlipFlopNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#7048 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, left: Node?, right: Node?, operator_loc: Location, location: Location } # # source://prism//lib/prism/node.rb#7081 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def exclude_end?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#7103 sig { returns(T::Boolean) } def exclude_end?; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#7113 def inspect(inspector = T.unsafe(nil)); end # attr_reader left: Node? # # source://prism//lib/prism/node.rb#7090 sig { returns(T.nilable(Prism::Node)) } def left; end # def operator: () -> String # # source://prism//lib/prism/node.rb#7108 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism//lib/prism/node.rb#7096 sig { returns(Prism::Location) } def operator_loc; end # attr_reader right: Node? # # source://prism//lib/prism/node.rb#7093 sig { returns(T.nilable(Prism::Node)) } def right; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#7147 def type; end private # private attr_reader flags: Integer # # source://prism//lib/prism/node.rb#7086 sig { returns(Integer) } def flags; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#7157 def type; end end end # Represents a floating point number literal. # # 1.0 # ^^^ # # source://prism//lib/prism/node.rb#7167 class Prism::FloatNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [FloatNode] a new instance of FloatNode # # source://prism//lib/prism/node.rb#7168 def initialize(source, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#7175 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#7180 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#7190 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#7185 def compact_child_nodes; end # def copy: (**params) -> FloatNode # # source://prism//lib/prism/node.rb#7195 sig { params(params: T.untyped).returns(Prism::FloatNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#7180 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } # # source://prism//lib/prism/node.rb#7206 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#7212 def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#7231 def type; end # Returns the value of the node as a Ruby Float. # # source://prism//lib/prism/node_ext.rb#62 def value; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#7241 def type; end end end # Represents the use of the `for` keyword. # # for i in a end # ^^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#7251 class Prism::ForNode < ::Prism::Node # def initialize: (Node index, Node collection, StatementsNode? statements, Location for_keyword_loc, Location in_keyword_loc, Location? do_keyword_loc, Location end_keyword_loc, Location location) -> void # # @return [ForNode] a new instance of ForNode # # source://prism//lib/prism/node.rb#7252 def initialize(source, index, collection, statements, for_keyword_loc, in_keyword_loc, do_keyword_loc, end_keyword_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#7266 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#7271 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # attr_reader collection: Node # # source://prism//lib/prism/node.rb#7316 sig { returns(Prism::Node) } def collection; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#7285 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#7276 def compact_child_nodes; end # def copy: (**params) -> ForNode # # source://prism//lib/prism/node.rb#7290 sig { params(params: T.untyped).returns(Prism::ForNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#7271 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { index: Node, collection: Node, statements: StatementsNode?, for_keyword_loc: Location, in_keyword_loc: Location, do_keyword_loc: Location?, end_keyword_loc: Location, location: Location } # # source://prism//lib/prism/node.rb#7308 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def do_keyword: () -> String? # # source://prism//lib/prism/node.rb#7363 sig { returns(T.nilable(String)) } def do_keyword; end # attr_reader do_keyword_loc: Location? # # source://prism//lib/prism/node.rb#7334 sig { returns(T.nilable(Prism::Location)) } def do_keyword_loc; end # def end_keyword: () -> String # # source://prism//lib/prism/node.rb#7368 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # # source://prism//lib/prism/node.rb#7346 sig { returns(Prism::Location) } def end_keyword_loc; end # def for_keyword: () -> String # # source://prism//lib/prism/node.rb#7353 sig { returns(String) } def for_keyword; end # attr_reader for_keyword_loc: Location # # source://prism//lib/prism/node.rb#7322 sig { returns(Prism::Location) } def for_keyword_loc; end # def in_keyword: () -> String # # source://prism//lib/prism/node.rb#7358 sig { returns(String) } def in_keyword; end # attr_reader in_keyword_loc: Location # # source://prism//lib/prism/node.rb#7328 sig { returns(Prism::Location) } def in_keyword_loc; end # attr_reader index: Node # # source://prism//lib/prism/node.rb#7313 sig { returns(Prism::Node) } def index; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#7373 def inspect(inspector = T.unsafe(nil)); end # attr_reader statements: StatementsNode? # # source://prism//lib/prism/node.rb#7319 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#7406 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#7416 def type; end end end # Represents forwarding all arguments to this method to another method. # # def foo(...) # bar(...) # ^^^ # end # # source://prism//lib/prism/node.rb#7428 class Prism::ForwardingArgumentsNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [ForwardingArgumentsNode] a new instance of ForwardingArgumentsNode # # source://prism//lib/prism/node.rb#7429 def initialize(source, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#7436 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#7441 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#7451 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#7446 def compact_child_nodes; end # def copy: (**params) -> ForwardingArgumentsNode # # source://prism//lib/prism/node.rb#7456 sig { params(params: T.untyped).returns(Prism::ForwardingArgumentsNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#7441 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } # # source://prism//lib/prism/node.rb#7467 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#7473 def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#7492 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#7502 def type; end end end # Represents the use of the forwarding parameter in a method, block, or lambda declaration. # # def foo(...) # ^^^ # end # # source://prism//lib/prism/node.rb#7513 class Prism::ForwardingParameterNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [ForwardingParameterNode] a new instance of ForwardingParameterNode # # source://prism//lib/prism/node.rb#7514 def initialize(source, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#7521 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#7526 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#7536 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#7531 def compact_child_nodes; end # def copy: (**params) -> ForwardingParameterNode # # source://prism//lib/prism/node.rb#7541 sig { params(params: T.untyped).returns(Prism::ForwardingParameterNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#7526 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } # # source://prism//lib/prism/node.rb#7552 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#7558 def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#7577 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#7587 def type; end end end # Represents the use of the `super` keyword without parentheses or arguments. # # super # ^^^^^ # # source://prism//lib/prism/node.rb#7597 class Prism::ForwardingSuperNode < ::Prism::Node # def initialize: (BlockNode? block, Location location) -> void # # @return [ForwardingSuperNode] a new instance of ForwardingSuperNode # # source://prism//lib/prism/node.rb#7598 def initialize(source, block, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#7606 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # attr_reader block: BlockNode? # # source://prism//lib/prism/node.rb#7645 sig { returns(T.nilable(Prism::BlockNode)) } def block; end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#7611 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#7623 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#7616 def compact_child_nodes; end # def copy: (**params) -> ForwardingSuperNode # # source://prism//lib/prism/node.rb#7628 sig { params(params: T.untyped).returns(Prism::ForwardingSuperNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#7611 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { block: BlockNode?, location: Location } # # source://prism//lib/prism/node.rb#7640 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#7649 def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#7674 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#7684 def type; end end end # Represents the use of the `&&=` operator for assignment to a global variable. # # $target &&= value # ^^^^^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#7694 class Prism::GlobalVariableAndWriteNode < ::Prism::Node # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Location location) -> void # # @return [GlobalVariableAndWriteNode] a new instance of GlobalVariableAndWriteNode # # source://prism//lib/prism/node.rb#7695 def initialize(source, name, name_loc, operator_loc, value, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#7706 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#7711 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#7721 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#7716 def compact_child_nodes; end # def copy: (**params) -> GlobalVariableAndWriteNode # # source://prism//lib/prism/node.rb#7726 sig { params(params: T.untyped).returns(Prism::GlobalVariableAndWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#7711 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location } # # source://prism//lib/prism/node.rb#7741 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # source://prism//lib/prism/desugar_compiler.rb#161 def desugar; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#7770 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # # source://prism//lib/prism/node.rb#7746 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # # source://prism//lib/prism/node.rb#7749 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # # source://prism//lib/prism/node.rb#7765 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism//lib/prism/node.rb#7755 sig { returns(Prism::Location) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#7794 def type; end # attr_reader value: Node # # source://prism//lib/prism/node.rb#7761 sig { returns(Prism::Node) } def value; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#7804 def type; end end end # Represents assigning to a global variable using an operator that isn't `=`. # # $target += value # ^^^^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#7814 class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Symbol operator, Location location) -> void # # @return [GlobalVariableOperatorWriteNode] a new instance of GlobalVariableOperatorWriteNode # # source://prism//lib/prism/node.rb#7815 def initialize(source, name, name_loc, operator_loc, value, operator, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#7827 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#7832 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#7842 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#7837 def compact_child_nodes; end # def copy: (**params) -> GlobalVariableOperatorWriteNode # # source://prism//lib/prism/node.rb#7847 sig { params(params: T.untyped).returns(Prism::GlobalVariableOperatorWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#7832 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location } # # source://prism//lib/prism/node.rb#7863 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # source://prism//lib/prism/desugar_compiler.rb#173 def desugar; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#7890 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # # source://prism//lib/prism/node.rb#7868 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # # source://prism//lib/prism/node.rb#7871 sig { returns(Prism::Location) } def name_loc; end # attr_reader operator: Symbol # # source://prism//lib/prism/node.rb#7886 sig { returns(Symbol) } def operator; end # attr_reader operator_loc: Location # # source://prism//lib/prism/node.rb#7877 sig { returns(Prism::Location) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#7915 def type; end # attr_reader value: Node # # source://prism//lib/prism/node.rb#7883 sig { returns(Prism::Node) } def value; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#7925 def type; end end end # Represents the use of the `||=` operator for assignment to a global variable. # # $target ||= value # ^^^^^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#7935 class Prism::GlobalVariableOrWriteNode < ::Prism::Node # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Location location) -> void # # @return [GlobalVariableOrWriteNode] a new instance of GlobalVariableOrWriteNode # # source://prism//lib/prism/node.rb#7936 def initialize(source, name, name_loc, operator_loc, value, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#7947 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#7952 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#7962 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#7957 def compact_child_nodes; end # def copy: (**params) -> GlobalVariableOrWriteNode # # source://prism//lib/prism/node.rb#7967 sig { params(params: T.untyped).returns(Prism::GlobalVariableOrWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#7952 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location } # # source://prism//lib/prism/node.rb#7982 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # source://prism//lib/prism/desugar_compiler.rb#167 def desugar; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#8011 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # # source://prism//lib/prism/node.rb#7987 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # # source://prism//lib/prism/node.rb#7990 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # # source://prism//lib/prism/node.rb#8006 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism//lib/prism/node.rb#7996 sig { returns(Prism::Location) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#8035 def type; end # attr_reader value: Node # # source://prism//lib/prism/node.rb#8002 sig { returns(Prism::Node) } def value; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#8045 def type; end end end # Represents referencing a global variable. # # $foo # ^^^^ # # source://prism//lib/prism/node.rb#8055 class Prism::GlobalVariableReadNode < ::Prism::Node # def initialize: (Symbol name, Location location) -> void # # @return [GlobalVariableReadNode] a new instance of GlobalVariableReadNode # # source://prism//lib/prism/node.rb#8056 def initialize(source, name, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#8064 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#8069 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#8079 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#8074 def compact_child_nodes; end # def copy: (**params) -> GlobalVariableReadNode # # source://prism//lib/prism/node.rb#8084 sig { params(params: T.untyped).returns(Prism::GlobalVariableReadNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#8069 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } # # source://prism//lib/prism/node.rb#8096 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#8109 def inspect(inspector = T.unsafe(nil)); end # The name of the global variable, which is a `$` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifier). Alternatively, it can be one of the special global variables designated by a symbol. # # $foo # name `:$foo` # # $_Test # name `:$_Test` # # source://prism//lib/prism/node.rb#8105 sig { returns(Symbol) } def name; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#8129 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#8139 def type; end end end # Represents writing to a global variable in a context that doesn't have an explicit value. # # $foo, $bar = baz # ^^^^ ^^^^ # # source://prism//lib/prism/node.rb#8149 class Prism::GlobalVariableTargetNode < ::Prism::Node # def initialize: (Symbol name, Location location) -> void # # @return [GlobalVariableTargetNode] a new instance of GlobalVariableTargetNode # # source://prism//lib/prism/node.rb#8150 def initialize(source, name, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#8158 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#8163 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#8173 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#8168 def compact_child_nodes; end # def copy: (**params) -> GlobalVariableTargetNode # # source://prism//lib/prism/node.rb#8178 sig { params(params: T.untyped).returns(Prism::GlobalVariableTargetNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#8163 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } # # source://prism//lib/prism/node.rb#8190 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#8199 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # # source://prism//lib/prism/node.rb#8195 sig { returns(Symbol) } def name; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#8219 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#8229 def type; end end end # Represents writing to a global variable. # # $foo = 1 # ^^^^^^^^ # # source://prism//lib/prism/node.rb#8239 class Prism::GlobalVariableWriteNode < ::Prism::Node # def initialize: (Symbol name, Location name_loc, Node value, Location operator_loc, Location location) -> void # # @return [GlobalVariableWriteNode] a new instance of GlobalVariableWriteNode # # source://prism//lib/prism/node.rb#8240 def initialize(source, name, name_loc, value, operator_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#8251 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#8256 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#8266 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#8261 def compact_child_nodes; end # def copy: (**params) -> GlobalVariableWriteNode # # source://prism//lib/prism/node.rb#8271 sig { params(params: T.untyped).returns(Prism::GlobalVariableWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#8256 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location } # # source://prism//lib/prism/node.rb#8286 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#8315 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # # source://prism//lib/prism/node.rb#8291 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # # source://prism//lib/prism/node.rb#8294 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # # source://prism//lib/prism/node.rb#8310 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism//lib/prism/node.rb#8303 sig { returns(Prism::Location) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#8339 def type; end # attr_reader value: Node # # source://prism//lib/prism/node.rb#8300 sig { returns(Prism::Node) } def value; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#8349 def type; end end end # Represents a hash literal. # # { a => b } # ^^^^^^^^^^ # # source://prism//lib/prism/node.rb#8359 class Prism::HashNode < ::Prism::Node # def initialize: (Location opening_loc, Array[Node] elements, Location closing_loc, Location location) -> void # # @return [HashNode] a new instance of HashNode # # source://prism//lib/prism/node.rb#8360 def initialize(source, opening_loc, elements, closing_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#8370 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#8375 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # # source://prism//lib/prism/node.rb#8442 sig { returns(String) } def closing; end # The location of the closing brace. # # { a => b } # ^ # # source://prism//lib/prism/node.rb#8430 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#8385 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#8380 def compact_child_nodes; end # def copy: (**params) -> HashNode # # source://prism//lib/prism/node.rb#8390 sig { params(params: T.untyped).returns(Prism::HashNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#8375 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location, elements: Array[Node], closing_loc: Location, location: Location } # # source://prism//lib/prism/node.rb#8404 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # The elements of the hash. These can be either `AssocNode`s or `AssocSplatNode`s. # # { a: b } # ^^^^ # # { **foo } # ^^^^^ # # source://prism//lib/prism/node.rb#8424 sig { returns(T::Array[Prism::Node]) } def elements; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#8447 def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String # # source://prism//lib/prism/node.rb#8437 sig { returns(String) } def opening; end # The location of the opening brace. # # { a => b } # ^ # # source://prism//lib/prism/node.rb#8412 sig { returns(Prism::Location) } def opening_loc; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#8469 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#8479 def type; end end end # Represents a hash pattern in pattern matching. # # foo => { a: 1, b: 2 } # ^^^^^^^^^^^^^^ # # foo => { a: 1, b: 2, **c } # ^^^^^^^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#8492 class Prism::HashPatternNode < ::Prism::Node # def initialize: (Node? constant, Array[Node] elements, Node? rest, Location? opening_loc, Location? closing_loc, Location location) -> void # # @return [HashPatternNode] a new instance of HashPatternNode # # source://prism//lib/prism/node.rb#8493 def initialize(source, constant, elements, rest, opening_loc, closing_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#8505 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#8510 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # # source://prism//lib/prism/node.rb#8589 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # # source://prism//lib/prism/node.rb#8571 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#8524 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#8515 def compact_child_nodes; end # attr_reader constant: Node? # # source://prism//lib/prism/node.rb#8550 sig { returns(T.nilable(Prism::Node)) } def constant; end # def copy: (**params) -> HashPatternNode # # source://prism//lib/prism/node.rb#8529 sig { params(params: T.untyped).returns(Prism::HashPatternNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#8510 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { constant: Node?, elements: Array[Node], rest: Node?, opening_loc: Location?, closing_loc: Location?, location: Location } # # source://prism//lib/prism/node.rb#8545 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # attr_reader elements: Array[Node] # # source://prism//lib/prism/node.rb#8553 sig { returns(T::Array[Prism::Node]) } def elements; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#8594 def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String? # # source://prism//lib/prism/node.rb#8584 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # # source://prism//lib/prism/node.rb#8559 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader rest: Node? # # source://prism//lib/prism/node.rb#8556 sig { returns(T.nilable(Prism::Node)) } def rest; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#8628 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#8638 def type; end end end # source://prism//lib/prism/node_ext.rb#35 module Prism::HeredocQuery # Returns true if this node was represented as a heredoc in the source code. # # @return [Boolean] # # source://prism//lib/prism/node_ext.rb#37 def heredoc?; end end # Represents the use of the `if` keyword, either in the block form or the modifier form. # # bar if foo # ^^^^^^^^^^ # # if foo then bar end # ^^^^^^^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#8651 class Prism::IfNode < ::Prism::Node # def initialize: (Location? if_keyword_loc, Node predicate, Location? then_keyword_loc, StatementsNode? statements, Node? consequent, Location? end_keyword_loc, Location location) -> void # # @return [IfNode] a new instance of IfNode # # source://prism//lib/prism/node.rb#8652 def initialize(source, if_keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#8665 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#8674 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#8688 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#8679 def compact_child_nodes; end # attr_reader consequent: Node? # # source://prism//lib/prism/node.rb#8745 sig { returns(T.nilable(Prism::Node)) } def consequent; end # def copy: (**params) -> IfNode # # source://prism//lib/prism/node.rb#8693 sig { params(params: T.untyped).returns(Prism::IfNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#8674 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { if_keyword_loc: Location?, predicate: Node, then_keyword_loc: Location?, statements: StatementsNode?, consequent: Node?, end_keyword_loc: Location?, location: Location } # # source://prism//lib/prism/node.rb#8710 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def end_keyword: () -> String? # # source://prism//lib/prism/node.rb#8771 sig { returns(T.nilable(String)) } def end_keyword; end # attr_reader end_keyword_loc: Location? # # source://prism//lib/prism/node.rb#8748 sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end # def if_keyword: () -> String? # # source://prism//lib/prism/node.rb#8761 sig { returns(T.nilable(String)) } def if_keyword; end # attr_reader if_keyword_loc: Location? # # source://prism//lib/prism/node.rb#8715 sig { returns(T.nilable(Prism::Location)) } def if_keyword_loc; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#8776 def inspect(inspector = T.unsafe(nil)); end # attr_reader predicate: Node # # source://prism//lib/prism/node.rb#8727 sig { returns(Prism::Node) } def predicate; end # source://prism//lib/prism/node.rb#8669 def set_newline_flag(newline_marked); end # attr_reader statements: StatementsNode? # # source://prism//lib/prism/node.rb#8742 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # def then_keyword: () -> String? # # source://prism//lib/prism/node.rb#8766 sig { returns(T.nilable(String)) } def then_keyword; end # attr_reader then_keyword_loc: Location? # # source://prism//lib/prism/node.rb#8730 sig { returns(T.nilable(Prism::Location)) } def then_keyword_loc; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#8812 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#8822 def type; end end end # Represents an imaginary number literal. # # 1.0i # ^^^^ # # source://prism//lib/prism/node.rb#8832 class Prism::ImaginaryNode < ::Prism::Node # def initialize: (Node numeric, Location location) -> void # # @return [ImaginaryNode] a new instance of ImaginaryNode # # source://prism//lib/prism/node.rb#8833 def initialize(source, numeric, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#8841 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#8846 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#8856 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#8851 def compact_child_nodes; end # def copy: (**params) -> ImaginaryNode # # source://prism//lib/prism/node.rb#8861 sig { params(params: T.untyped).returns(Prism::ImaginaryNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#8846 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { numeric: Node, location: Location } # # source://prism//lib/prism/node.rb#8873 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#8882 def inspect(inspector = T.unsafe(nil)); end # attr_reader numeric: Node # # source://prism//lib/prism/node.rb#8878 sig { returns(Prism::Node) } def numeric; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#8903 def type; end # Returns the value of the node as a Ruby Complex. # # source://prism//lib/prism/node_ext.rb#69 def value; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#8913 def type; end end end # Represents a node that is implicitly being added to the tree but doesn't correspond directly to a node in the source. # # { foo: } # ^^^^ # # { Foo: } # ^^^^ # # foo in { bar: } # ^^^^ # # source://prism//lib/prism/node.rb#8929 class Prism::ImplicitNode < ::Prism::Node # def initialize: (Node value, Location location) -> void # # @return [ImplicitNode] a new instance of ImplicitNode # # source://prism//lib/prism/node.rb#8930 def initialize(source, value, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#8938 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#8943 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#8953 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#8948 def compact_child_nodes; end # def copy: (**params) -> ImplicitNode # # source://prism//lib/prism/node.rb#8958 sig { params(params: T.untyped).returns(Prism::ImplicitNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#8943 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { value: Node, location: Location } # # source://prism//lib/prism/node.rb#8970 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#8979 def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#9000 def type; end # attr_reader value: Node # # source://prism//lib/prism/node.rb#8975 sig { returns(Prism::Node) } def value; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#9010 def type; end end end # Represents using a trailing comma to indicate an implicit rest parameter. # # foo { |bar,| } # ^ # # foo in [bar,] # ^ # # for foo, in bar do end # ^ # # foo, = bar # ^ # # source://prism//lib/prism/node.rb#9029 class Prism::ImplicitRestNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [ImplicitRestNode] a new instance of ImplicitRestNode # # source://prism//lib/prism/node.rb#9030 def initialize(source, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#9037 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#9042 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#9052 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#9047 def compact_child_nodes; end # def copy: (**params) -> ImplicitRestNode # # source://prism//lib/prism/node.rb#9057 sig { params(params: T.untyped).returns(Prism::ImplicitRestNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#9042 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } # # source://prism//lib/prism/node.rb#9068 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#9074 def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#9093 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#9103 def type; end end end # Represents the use of the `in` keyword in a case statement. # # case a; in b then c end # ^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#9113 class Prism::InNode < ::Prism::Node # def initialize: (Node pattern, StatementsNode? statements, Location in_loc, Location? then_loc, Location location) -> void # # @return [InNode] a new instance of InNode # # source://prism//lib/prism/node.rb#9114 def initialize(source, pattern, statements, in_loc, then_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#9125 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#9130 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#9143 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#9135 def compact_child_nodes; end # def copy: (**params) -> InNode # # source://prism//lib/prism/node.rb#9148 sig { params(params: T.untyped).returns(Prism::InNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#9130 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { pattern: Node, statements: StatementsNode?, in_loc: Location, then_loc: Location?, location: Location } # # source://prism//lib/prism/node.rb#9163 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def in: () -> String # # source://prism//lib/prism/node.rb#9193 sig { returns(String) } def in; end # attr_reader in_loc: Location # # source://prism//lib/prism/node.rb#9174 sig { returns(Prism::Location) } def in_loc; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#9203 def inspect(inspector = T.unsafe(nil)); end # attr_reader pattern: Node # # source://prism//lib/prism/node.rb#9168 sig { returns(Prism::Node) } def pattern; end # attr_reader statements: StatementsNode? # # source://prism//lib/prism/node.rb#9171 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # def then: () -> String? # # source://prism//lib/prism/node.rb#9198 sig { returns(T.nilable(String)) } def then; end # attr_reader then_loc: Location? # # source://prism//lib/prism/node.rb#9180 sig { returns(T.nilable(Prism::Location)) } def then_loc; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#9232 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#9242 def type; end end end # Represents the use of the `&&=` operator on a call to the `[]` method. # # foo.bar[baz] &&= value # ^^^^^^^^^^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#9252 class Prism::IndexAndWriteNode < ::Prism::Node # def initialize: (Integer flags, Node? receiver, Location? call_operator_loc, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Node? block, Location operator_loc, Node value, Location location) -> void # # @return [IndexAndWriteNode] a new instance of IndexAndWriteNode # # source://prism//lib/prism/node.rb#9253 def initialize(source, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#9269 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # # source://prism//lib/prism/node.rb#9344 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def attribute_write?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#9376 sig { returns(T::Boolean) } def attribute_write?; end # attr_reader block: Node? # # source://prism//lib/prism/node.rb#9353 sig { returns(T.nilable(Prism::Node)) } def block; end # def call_operator: () -> String? # # source://prism//lib/prism/node.rb#9386 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # # source://prism//lib/prism/node.rb#9326 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#9274 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # # source://prism//lib/prism/node.rb#9396 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # # source://prism//lib/prism/node.rb#9347 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#9289 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#9279 def compact_child_nodes; end # def copy: (**params) -> IndexAndWriteNode # # source://prism//lib/prism/node.rb#9294 sig { params(params: T.untyped).returns(Prism::IndexAndWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#9274 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, operator_loc: Location, value: Node, location: Location } # # source://prism//lib/prism/node.rb#9314 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def ignore_visibility?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#9381 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#9406 def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String # # source://prism//lib/prism/node.rb#9391 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # # source://prism//lib/prism/node.rb#9338 sig { returns(Prism::Location) } def opening_loc; end # def operator: () -> String # # source://prism//lib/prism/node.rb#9401 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism//lib/prism/node.rb#9356 sig { returns(Prism::Location) } def operator_loc; end # attr_reader receiver: Node? # # source://prism//lib/prism/node.rb#9323 sig { returns(T.nilable(Prism::Node)) } def receiver; end # def safe_navigation?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#9366 sig { returns(T::Boolean) } def safe_navigation?; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#9451 def type; end # attr_reader value: Node # # source://prism//lib/prism/node.rb#9362 sig { returns(Prism::Node) } def value; end # def variable_call?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#9371 sig { returns(T::Boolean) } def variable_call?; end private # private attr_reader flags: Integer # # source://prism//lib/prism/node.rb#9319 sig { returns(Integer) } def flags; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#9461 def type; end end end # Represents the use of an assignment operator on a call to `[]`. # # foo.bar[baz] += value # ^^^^^^^^^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#9471 class Prism::IndexOperatorWriteNode < ::Prism::Node # def initialize: (Integer flags, Node? receiver, Location? call_operator_loc, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Node? block, Symbol operator, Location operator_loc, Node value, Location location) -> void # # @return [IndexOperatorWriteNode] a new instance of IndexOperatorWriteNode # # source://prism//lib/prism/node.rb#9472 def initialize(source, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator, operator_loc, value, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#9489 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # # source://prism//lib/prism/node.rb#9565 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def attribute_write?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#9600 sig { returns(T::Boolean) } def attribute_write?; end # attr_reader block: Node? # # source://prism//lib/prism/node.rb#9574 sig { returns(T.nilable(Prism::Node)) } def block; end # def call_operator: () -> String? # # source://prism//lib/prism/node.rb#9610 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # # source://prism//lib/prism/node.rb#9547 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#9494 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # # source://prism//lib/prism/node.rb#9620 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # # source://prism//lib/prism/node.rb#9568 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#9509 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#9499 def compact_child_nodes; end # def copy: (**params) -> IndexOperatorWriteNode # # source://prism//lib/prism/node.rb#9514 sig { params(params: T.untyped).returns(Prism::IndexOperatorWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#9494 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, operator: Symbol, operator_loc: Location, value: Node, location: Location } # # source://prism//lib/prism/node.rb#9535 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def ignore_visibility?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#9605 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#9625 def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String # # source://prism//lib/prism/node.rb#9615 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # # source://prism//lib/prism/node.rb#9559 sig { returns(Prism::Location) } def opening_loc; end # attr_reader operator: Symbol # # source://prism//lib/prism/node.rb#9577 sig { returns(Symbol) } def operator; end # attr_reader operator_loc: Location # # source://prism//lib/prism/node.rb#9580 sig { returns(Prism::Location) } def operator_loc; end # attr_reader receiver: Node? # # source://prism//lib/prism/node.rb#9544 sig { returns(T.nilable(Prism::Node)) } def receiver; end # def safe_navigation?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#9590 sig { returns(T::Boolean) } def safe_navigation?; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#9671 def type; end # attr_reader value: Node # # source://prism//lib/prism/node.rb#9586 sig { returns(Prism::Node) } def value; end # def variable_call?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#9595 sig { returns(T::Boolean) } def variable_call?; end private # private attr_reader flags: Integer # # source://prism//lib/prism/node.rb#9540 sig { returns(Integer) } def flags; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#9681 def type; end end end # Represents the use of the `||=` operator on a call to `[]`. # # foo.bar[baz] ||= value # ^^^^^^^^^^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#9691 class Prism::IndexOrWriteNode < ::Prism::Node # def initialize: (Integer flags, Node? receiver, Location? call_operator_loc, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Node? block, Location operator_loc, Node value, Location location) -> void # # @return [IndexOrWriteNode] a new instance of IndexOrWriteNode # # source://prism//lib/prism/node.rb#9692 def initialize(source, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#9708 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # # source://prism//lib/prism/node.rb#9783 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def attribute_write?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#9815 sig { returns(T::Boolean) } def attribute_write?; end # attr_reader block: Node? # # source://prism//lib/prism/node.rb#9792 sig { returns(T.nilable(Prism::Node)) } def block; end # def call_operator: () -> String? # # source://prism//lib/prism/node.rb#9825 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # # source://prism//lib/prism/node.rb#9765 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#9713 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # # source://prism//lib/prism/node.rb#9835 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # # source://prism//lib/prism/node.rb#9786 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#9728 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#9718 def compact_child_nodes; end # def copy: (**params) -> IndexOrWriteNode # # source://prism//lib/prism/node.rb#9733 sig { params(params: T.untyped).returns(Prism::IndexOrWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#9713 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, operator_loc: Location, value: Node, location: Location } # # source://prism//lib/prism/node.rb#9753 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def ignore_visibility?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#9820 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#9845 def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String # # source://prism//lib/prism/node.rb#9830 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # # source://prism//lib/prism/node.rb#9777 sig { returns(Prism::Location) } def opening_loc; end # def operator: () -> String # # source://prism//lib/prism/node.rb#9840 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism//lib/prism/node.rb#9795 sig { returns(Prism::Location) } def operator_loc; end # attr_reader receiver: Node? # # source://prism//lib/prism/node.rb#9762 sig { returns(T.nilable(Prism::Node)) } def receiver; end # def safe_navigation?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#9805 sig { returns(T::Boolean) } def safe_navigation?; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#9890 def type; end # attr_reader value: Node # # source://prism//lib/prism/node.rb#9801 sig { returns(Prism::Node) } def value; end # def variable_call?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#9810 sig { returns(T::Boolean) } def variable_call?; end private # private attr_reader flags: Integer # # source://prism//lib/prism/node.rb#9758 sig { returns(Integer) } def flags; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#9900 def type; end end end # Represents assigning to an index. # # foo[bar], = 1 # ^^^^^^^^ # # begin # rescue => foo[bar] # ^^^^^^^^ # end # # for foo[bar] in baz do end # ^^^^^^^^ # # source://prism//lib/prism/node.rb#9918 class Prism::IndexTargetNode < ::Prism::Node # def initialize: (Integer flags, Node receiver, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Node? block, Location location) -> void # # @return [IndexTargetNode] a new instance of IndexTargetNode # # source://prism//lib/prism/node.rb#9919 def initialize(source, flags, receiver, opening_loc, arguments, closing_loc, block, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#9932 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # # source://prism//lib/prism/node.rb#9991 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def attribute_write?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#10014 sig { returns(T::Boolean) } def attribute_write?; end # attr_reader block: Node? # # source://prism//lib/prism/node.rb#10000 sig { returns(T.nilable(Prism::Node)) } def block; end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#9937 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # # source://prism//lib/prism/node.rb#10029 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # # source://prism//lib/prism/node.rb#9994 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#9951 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#9942 def compact_child_nodes; end # def copy: (**params) -> IndexTargetNode # # source://prism//lib/prism/node.rb#9956 sig { params(params: T.untyped).returns(Prism::IndexTargetNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#9937 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Node, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, location: Location } # # source://prism//lib/prism/node.rb#9973 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def ignore_visibility?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#10019 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#10034 def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String # # source://prism//lib/prism/node.rb#10024 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # # source://prism//lib/prism/node.rb#9985 sig { returns(Prism::Location) } def opening_loc; end # attr_reader receiver: Node # # source://prism//lib/prism/node.rb#9982 sig { returns(Prism::Node) } def receiver; end # def safe_navigation?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#10004 sig { returns(T::Boolean) } def safe_navigation?; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#10071 def type; end # def variable_call?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#10009 sig { returns(T::Boolean) } def variable_call?; end private # private attr_reader flags: Integer # # source://prism//lib/prism/node.rb#9978 sig { returns(Integer) } def flags; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#10081 def type; end end end # InlineComment objects are the most common. They correspond to comments in # the source file like this one that start with #. # # source://prism//lib/prism/parse_result.rb#277 class Prism::InlineComment < ::Prism::Comment # Returns a string representation of this comment. # # source://prism//lib/prism/parse_result.rb#283 def inspect; end # Returns true if this comment happens on the same line as other code and # false if the comment is by itself. # # @return [Boolean] # # source://prism//lib/prism/parse_result.rb#278 sig { override.returns(T::Boolean) } def trailing?; end end # Represents the use of the `&&=` operator for assignment to an instance variable. # # @target &&= value # ^^^^^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#10091 class Prism::InstanceVariableAndWriteNode < ::Prism::Node # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Location location) -> void # # @return [InstanceVariableAndWriteNode] a new instance of InstanceVariableAndWriteNode # # source://prism//lib/prism/node.rb#10092 def initialize(source, name, name_loc, operator_loc, value, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#10103 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#10108 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#10118 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#10113 def compact_child_nodes; end # def copy: (**params) -> InstanceVariableAndWriteNode # # source://prism//lib/prism/node.rb#10123 sig { params(params: T.untyped).returns(Prism::InstanceVariableAndWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#10108 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location } # # source://prism//lib/prism/node.rb#10138 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # source://prism//lib/prism/desugar_compiler.rb#179 def desugar; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#10167 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # # source://prism//lib/prism/node.rb#10143 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # # source://prism//lib/prism/node.rb#10146 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # # source://prism//lib/prism/node.rb#10162 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism//lib/prism/node.rb#10152 sig { returns(Prism::Location) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#10191 def type; end # attr_reader value: Node # # source://prism//lib/prism/node.rb#10158 sig { returns(Prism::Node) } def value; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#10201 def type; end end end # Represents assigning to an instance variable using an operator that isn't `=`. # # @target += value # ^^^^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#10211 class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Symbol operator, Location location) -> void # # @return [InstanceVariableOperatorWriteNode] a new instance of InstanceVariableOperatorWriteNode # # source://prism//lib/prism/node.rb#10212 def initialize(source, name, name_loc, operator_loc, value, operator, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#10224 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#10229 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#10239 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#10234 def compact_child_nodes; end # def copy: (**params) -> InstanceVariableOperatorWriteNode # # source://prism//lib/prism/node.rb#10244 sig { params(params: T.untyped).returns(Prism::InstanceVariableOperatorWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#10229 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location } # # source://prism//lib/prism/node.rb#10260 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # source://prism//lib/prism/desugar_compiler.rb#191 def desugar; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#10287 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # # source://prism//lib/prism/node.rb#10265 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # # source://prism//lib/prism/node.rb#10268 sig { returns(Prism::Location) } def name_loc; end # attr_reader operator: Symbol # # source://prism//lib/prism/node.rb#10283 sig { returns(Symbol) } def operator; end # attr_reader operator_loc: Location # # source://prism//lib/prism/node.rb#10274 sig { returns(Prism::Location) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#10312 def type; end # attr_reader value: Node # # source://prism//lib/prism/node.rb#10280 sig { returns(Prism::Node) } def value; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#10322 def type; end end end # Represents the use of the `||=` operator for assignment to an instance variable. # # @target ||= value # ^^^^^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#10332 class Prism::InstanceVariableOrWriteNode < ::Prism::Node # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Location location) -> void # # @return [InstanceVariableOrWriteNode] a new instance of InstanceVariableOrWriteNode # # source://prism//lib/prism/node.rb#10333 def initialize(source, name, name_loc, operator_loc, value, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#10344 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#10349 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#10359 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#10354 def compact_child_nodes; end # def copy: (**params) -> InstanceVariableOrWriteNode # # source://prism//lib/prism/node.rb#10364 sig { params(params: T.untyped).returns(Prism::InstanceVariableOrWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#10349 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location } # # source://prism//lib/prism/node.rb#10379 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # source://prism//lib/prism/desugar_compiler.rb#185 def desugar; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#10408 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # # source://prism//lib/prism/node.rb#10384 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # # source://prism//lib/prism/node.rb#10387 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # # source://prism//lib/prism/node.rb#10403 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism//lib/prism/node.rb#10393 sig { returns(Prism::Location) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#10432 def type; end # attr_reader value: Node # # source://prism//lib/prism/node.rb#10399 sig { returns(Prism::Node) } def value; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#10442 def type; end end end # Represents referencing an instance variable. # # @foo # ^^^^ # # source://prism//lib/prism/node.rb#10452 class Prism::InstanceVariableReadNode < ::Prism::Node # def initialize: (Symbol name, Location location) -> void # # @return [InstanceVariableReadNode] a new instance of InstanceVariableReadNode # # source://prism//lib/prism/node.rb#10453 def initialize(source, name, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#10461 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#10466 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#10476 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#10471 def compact_child_nodes; end # def copy: (**params) -> InstanceVariableReadNode # # source://prism//lib/prism/node.rb#10481 sig { params(params: T.untyped).returns(Prism::InstanceVariableReadNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#10466 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } # # source://prism//lib/prism/node.rb#10493 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#10506 def inspect(inspector = T.unsafe(nil)); end # The name of the instance variable, which is a `@` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers). # # @x # name `:@x` # # @_test # name `:@_test` # # source://prism//lib/prism/node.rb#10502 sig { returns(Symbol) } def name; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#10526 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#10536 def type; end end end # Represents writing to an instance variable in a context that doesn't have an explicit value. # # @foo, @bar = baz # ^^^^ ^^^^ # # source://prism//lib/prism/node.rb#10546 class Prism::InstanceVariableTargetNode < ::Prism::Node # def initialize: (Symbol name, Location location) -> void # # @return [InstanceVariableTargetNode] a new instance of InstanceVariableTargetNode # # source://prism//lib/prism/node.rb#10547 def initialize(source, name, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#10555 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#10560 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#10570 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#10565 def compact_child_nodes; end # def copy: (**params) -> InstanceVariableTargetNode # # source://prism//lib/prism/node.rb#10575 sig { params(params: T.untyped).returns(Prism::InstanceVariableTargetNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#10560 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } # # source://prism//lib/prism/node.rb#10587 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#10596 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # # source://prism//lib/prism/node.rb#10592 sig { returns(Symbol) } def name; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#10616 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#10626 def type; end end end # Represents writing to an instance variable. # # @foo = 1 # ^^^^^^^^ # # source://prism//lib/prism/node.rb#10636 class Prism::InstanceVariableWriteNode < ::Prism::Node # def initialize: (Symbol name, Location name_loc, Node value, Location operator_loc, Location location) -> void # # @return [InstanceVariableWriteNode] a new instance of InstanceVariableWriteNode # # source://prism//lib/prism/node.rb#10637 def initialize(source, name, name_loc, value, operator_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#10648 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#10653 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#10663 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#10658 def compact_child_nodes; end # def copy: (**params) -> InstanceVariableWriteNode # # source://prism//lib/prism/node.rb#10668 sig { params(params: T.untyped).returns(Prism::InstanceVariableWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#10653 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location } # # source://prism//lib/prism/node.rb#10683 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#10712 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # # source://prism//lib/prism/node.rb#10688 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # # source://prism//lib/prism/node.rb#10691 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # # source://prism//lib/prism/node.rb#10707 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism//lib/prism/node.rb#10700 sig { returns(Prism::Location) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#10736 def type; end # attr_reader value: Node # # source://prism//lib/prism/node.rb#10697 sig { returns(Prism::Node) } def value; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#10746 def type; end end end # Flags for integer nodes that correspond to the base of the integer. # # source://prism//lib/prism/node.rb#19277 module Prism::IntegerBaseFlags; end # 0b prefix # # source://prism//lib/prism/node.rb#19279 Prism::IntegerBaseFlags::BINARY = T.let(T.unsafe(nil), Integer) # 0d or no prefix # # source://prism//lib/prism/node.rb#19282 Prism::IntegerBaseFlags::DECIMAL = T.let(T.unsafe(nil), Integer) # 0x prefix # # source://prism//lib/prism/node.rb#19288 Prism::IntegerBaseFlags::HEXADECIMAL = T.let(T.unsafe(nil), Integer) # 0o or 0 prefix # # source://prism//lib/prism/node.rb#19285 Prism::IntegerBaseFlags::OCTAL = T.let(T.unsafe(nil), Integer) # Represents an integer number literal. # # 1 # ^ # # source://prism//lib/prism/node.rb#10756 class Prism::IntegerNode < ::Prism::Node # def initialize: (Integer flags, Location location) -> void # # @return [IntegerNode] a new instance of IntegerNode # # source://prism//lib/prism/node.rb#10757 def initialize(source, flags, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#10765 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def binary?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#10807 sig { returns(T::Boolean) } def binary?; end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#10770 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#10780 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#10775 def compact_child_nodes; end # def copy: (**params) -> IntegerNode # # source://prism//lib/prism/node.rb#10785 sig { params(params: T.untyped).returns(Prism::IntegerNode) } def copy(**params); end # def decimal?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#10812 sig { returns(T::Boolean) } def decimal?; end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#10770 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, location: Location } # # source://prism//lib/prism/node.rb#10797 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def hexadecimal?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#10822 sig { returns(T::Boolean) } def hexadecimal?; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#10827 def inspect(inspector = T.unsafe(nil)); end # def octal?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#10817 sig { returns(T::Boolean) } def octal?; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#10848 def type; end # Returns the value of the node as a Ruby Integer. # # source://prism//lib/prism/node_ext.rb#76 def value; end private # private attr_reader flags: Integer # # source://prism//lib/prism/node.rb#10802 sig { returns(Integer) } def flags; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#10858 def type; end end end # Represents a regular expression literal that contains interpolation that is being used in the predicate of a conditional to implicitly match against the last line read by an IO object. # # if /foo #{bar} baz/ then end # ^^^^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#10868 class Prism::InterpolatedMatchLastLineNode < ::Prism::Node include ::Prism::RegularExpressionOptions # def initialize: (Integer flags, Location opening_loc, Array[Node] parts, Location closing_loc, Location location) -> void # # @return [InterpolatedMatchLastLineNode] a new instance of InterpolatedMatchLastLineNode # # source://prism//lib/prism/node.rb#10869 def initialize(source, flags, opening_loc, parts, closing_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#10880 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def ascii_8bit?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#10970 sig { returns(T::Boolean) } def ascii_8bit?; end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#10890 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # # source://prism//lib/prism/node.rb#11005 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # # source://prism//lib/prism/node.rb#10938 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#10900 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#10895 def compact_child_nodes; end # def copy: (**params) -> InterpolatedMatchLastLineNode # # source://prism//lib/prism/node.rb#10905 sig { params(params: T.untyped).returns(Prism::InterpolatedMatchLastLineNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#10890 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location, parts: Array[Node], closing_loc: Location, location: Location } # # source://prism//lib/prism/node.rb#10920 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def euc_jp?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#10965 sig { returns(T::Boolean) } def euc_jp?; end # def extended?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#10950 sig { returns(T::Boolean) } def extended?; end # def forced_binary_encoding?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#10990 sig { returns(T::Boolean) } def forced_binary_encoding?; end # def forced_us_ascii_encoding?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#10995 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end # def forced_utf8_encoding?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#10985 sig { returns(T::Boolean) } def forced_utf8_encoding?; end # def ignore_case?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#10945 sig { returns(T::Boolean) } def ignore_case?; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#11010 def inspect(inspector = T.unsafe(nil)); end # def multi_line?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#10955 sig { returns(T::Boolean) } def multi_line?; end # def once?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#10960 sig { returns(T::Boolean) } def once?; end # def opening: () -> String # # source://prism//lib/prism/node.rb#11000 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # # source://prism//lib/prism/node.rb#10929 sig { returns(Prism::Location) } def opening_loc; end # attr_reader parts: Array[Node] # # source://prism//lib/prism/node.rb#10935 sig { returns(T::Array[Prism::Node]) } def parts; end # source://prism//lib/prism/node.rb#10884 def set_newline_flag(newline_marked); end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#11034 def type; end # def utf_8?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#10980 sig { returns(T::Boolean) } def utf_8?; end # def windows_31j?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#10975 sig { returns(T::Boolean) } def windows_31j?; end private # private attr_reader flags: Integer # # source://prism//lib/prism/node.rb#10925 sig { returns(Integer) } def flags; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#11044 def type; end end end # Represents a regular expression literal that contains interpolation. # # /foo #{bar} baz/ # ^^^^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#11054 class Prism::InterpolatedRegularExpressionNode < ::Prism::Node include ::Prism::RegularExpressionOptions # def initialize: (Integer flags, Location opening_loc, Array[Node] parts, Location closing_loc, Location location) -> void # # @return [InterpolatedRegularExpressionNode] a new instance of InterpolatedRegularExpressionNode # # source://prism//lib/prism/node.rb#11055 def initialize(source, flags, opening_loc, parts, closing_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#11066 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def ascii_8bit?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#11156 sig { returns(T::Boolean) } def ascii_8bit?; end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#11076 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # # source://prism//lib/prism/node.rb#11191 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # # source://prism//lib/prism/node.rb#11124 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#11086 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#11081 def compact_child_nodes; end # def copy: (**params) -> InterpolatedRegularExpressionNode # # source://prism//lib/prism/node.rb#11091 sig { params(params: T.untyped).returns(Prism::InterpolatedRegularExpressionNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#11076 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location, parts: Array[Node], closing_loc: Location, location: Location } # # source://prism//lib/prism/node.rb#11106 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def euc_jp?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#11151 sig { returns(T::Boolean) } def euc_jp?; end # def extended?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#11136 sig { returns(T::Boolean) } def extended?; end # def forced_binary_encoding?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#11176 sig { returns(T::Boolean) } def forced_binary_encoding?; end # def forced_us_ascii_encoding?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#11181 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end # def forced_utf8_encoding?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#11171 sig { returns(T::Boolean) } def forced_utf8_encoding?; end # def ignore_case?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#11131 sig { returns(T::Boolean) } def ignore_case?; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#11196 def inspect(inspector = T.unsafe(nil)); end # def multi_line?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#11141 sig { returns(T::Boolean) } def multi_line?; end # def once?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#11146 sig { returns(T::Boolean) } def once?; end # def opening: () -> String # # source://prism//lib/prism/node.rb#11186 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # # source://prism//lib/prism/node.rb#11115 sig { returns(Prism::Location) } def opening_loc; end # attr_reader parts: Array[Node] # # source://prism//lib/prism/node.rb#11121 sig { returns(T::Array[Prism::Node]) } def parts; end # source://prism//lib/prism/node.rb#11070 def set_newline_flag(newline_marked); end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#11220 def type; end # def utf_8?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#11166 sig { returns(T::Boolean) } def utf_8?; end # def windows_31j?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#11161 sig { returns(T::Boolean) } def windows_31j?; end private # private attr_reader flags: Integer # # source://prism//lib/prism/node.rb#11111 sig { returns(Integer) } def flags; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#11230 def type; end end end # Represents a string literal that contains interpolation. # # "foo #{bar} baz" # ^^^^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#11240 class Prism::InterpolatedStringNode < ::Prism::Node include ::Prism::HeredocQuery # def initialize: (Location? opening_loc, Array[Node] parts, Location? closing_loc, Location location) -> void # # @return [InterpolatedStringNode] a new instance of InterpolatedStringNode # # source://prism//lib/prism/node.rb#11241 def initialize(source, opening_loc, parts, closing_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#11251 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#11261 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # # source://prism//lib/prism/node.rb#11328 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # # source://prism//lib/prism/node.rb#11310 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#11271 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#11266 def compact_child_nodes; end # def copy: (**params) -> InterpolatedStringNode # # source://prism//lib/prism/node.rb#11276 sig { params(params: T.untyped).returns(Prism::InterpolatedStringNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#11261 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location?, parts: Array[Node], closing_loc: Location?, location: Location } # # source://prism//lib/prism/node.rb#11290 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#11333 def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String? # # source://prism//lib/prism/node.rb#11323 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # # source://prism//lib/prism/node.rb#11295 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader parts: Array[Node] # # source://prism//lib/prism/node.rb#11307 sig { returns(T::Array[Prism::Node]) } def parts; end # source://prism//lib/prism/node.rb#11255 def set_newline_flag(newline_marked); end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#11355 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#11365 def type; end end end # Represents a symbol literal that contains interpolation. # # :"foo #{bar} baz" # ^^^^^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#11375 class Prism::InterpolatedSymbolNode < ::Prism::Node # def initialize: (Location? opening_loc, Array[Node] parts, Location? closing_loc, Location location) -> void # # @return [InterpolatedSymbolNode] a new instance of InterpolatedSymbolNode # # source://prism//lib/prism/node.rb#11376 def initialize(source, opening_loc, parts, closing_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#11386 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#11396 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # # source://prism//lib/prism/node.rb#11463 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # # source://prism//lib/prism/node.rb#11445 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#11406 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#11401 def compact_child_nodes; end # def copy: (**params) -> InterpolatedSymbolNode # # source://prism//lib/prism/node.rb#11411 sig { params(params: T.untyped).returns(Prism::InterpolatedSymbolNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#11396 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location?, parts: Array[Node], closing_loc: Location?, location: Location } # # source://prism//lib/prism/node.rb#11425 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#11468 def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String? # # source://prism//lib/prism/node.rb#11458 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # # source://prism//lib/prism/node.rb#11430 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader parts: Array[Node] # # source://prism//lib/prism/node.rb#11442 sig { returns(T::Array[Prism::Node]) } def parts; end # source://prism//lib/prism/node.rb#11390 def set_newline_flag(newline_marked); end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#11490 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#11500 def type; end end end # Represents an xstring literal that contains interpolation. # # `foo #{bar} baz` # ^^^^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#11510 class Prism::InterpolatedXStringNode < ::Prism::Node include ::Prism::HeredocQuery # def initialize: (Location opening_loc, Array[Node] parts, Location closing_loc, Location location) -> void # # @return [InterpolatedXStringNode] a new instance of InterpolatedXStringNode # # source://prism//lib/prism/node.rb#11511 def initialize(source, opening_loc, parts, closing_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#11521 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#11531 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # # source://prism//lib/prism/node.rb#11586 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # # source://prism//lib/prism/node.rb#11574 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#11541 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#11536 def compact_child_nodes; end # def copy: (**params) -> InterpolatedXStringNode # # source://prism//lib/prism/node.rb#11546 sig { params(params: T.untyped).returns(Prism::InterpolatedXStringNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#11531 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location, parts: Array[Node], closing_loc: Location, location: Location } # # source://prism//lib/prism/node.rb#11560 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#11591 def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String # # source://prism//lib/prism/node.rb#11581 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # # source://prism//lib/prism/node.rb#11565 sig { returns(Prism::Location) } def opening_loc; end # attr_reader parts: Array[Node] # # source://prism//lib/prism/node.rb#11571 sig { returns(T::Array[Prism::Node]) } def parts; end # source://prism//lib/prism/node.rb#11525 def set_newline_flag(newline_marked); end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#11613 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#11623 def type; end end end # Represents a hash literal without opening and closing braces. # # foo(a: b) # ^^^^ # # source://prism//lib/prism/node.rb#11633 class Prism::KeywordHashNode < ::Prism::Node # def initialize: (Integer flags, Array[Node] elements, Location location) -> void # # @return [KeywordHashNode] a new instance of KeywordHashNode # # source://prism//lib/prism/node.rb#11634 def initialize(source, flags, elements, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#11643 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#11648 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#11658 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#11653 def compact_child_nodes; end # def copy: (**params) -> KeywordHashNode # # source://prism//lib/prism/node.rb#11663 sig { params(params: T.untyped).returns(Prism::KeywordHashNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#11648 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, elements: Array[Node], location: Location } # # source://prism//lib/prism/node.rb#11676 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # attr_reader elements: Array[Node] # # source://prism//lib/prism/node.rb#11685 sig { returns(T::Array[Prism::Node]) } def elements; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#11694 def inspect(inspector = T.unsafe(nil)); end # def symbol_keys?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#11689 sig { returns(T::Boolean) } def symbol_keys?; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#11716 def type; end private # private attr_reader flags: Integer # # source://prism//lib/prism/node.rb#11681 sig { returns(Integer) } def flags; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#11726 def type; end end end # Flags for keyword hash nodes. # # source://prism//lib/prism/node.rb#19292 module Prism::KeywordHashNodeFlags; end # a keyword hash which only has `AssocNode` elements all with symbol keys, which means the elements can be treated as keyword arguments # # source://prism//lib/prism/node.rb#19294 Prism::KeywordHashNodeFlags::SYMBOL_KEYS = T.let(T.unsafe(nil), Integer) # Represents a keyword rest parameter to a method, block, or lambda definition. # # def a(**b) # ^^^ # end # # source://prism//lib/prism/node.rb#11737 class Prism::KeywordRestParameterNode < ::Prism::Node # def initialize: (Integer flags, Symbol? name, Location? name_loc, Location operator_loc, Location location) -> void # # @return [KeywordRestParameterNode] a new instance of KeywordRestParameterNode # # source://prism//lib/prism/node.rb#11738 def initialize(source, flags, name, name_loc, operator_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#11749 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#11754 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#11764 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#11759 def compact_child_nodes; end # def copy: (**params) -> KeywordRestParameterNode # # source://prism//lib/prism/node.rb#11769 sig { params(params: T.untyped).returns(Prism::KeywordRestParameterNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#11754 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location } # # source://prism//lib/prism/node.rb#11784 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#11825 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol? # # source://prism//lib/prism/node.rb#11793 sig { returns(T.nilable(Symbol)) } def name; end # attr_reader name_loc: Location? # # source://prism//lib/prism/node.rb#11796 sig { returns(T.nilable(Prism::Location)) } def name_loc; end # def operator: () -> String # # source://prism//lib/prism/node.rb#11820 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism//lib/prism/node.rb#11808 sig { returns(Prism::Location) } def operator_loc; end # def repeated_parameter?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#11815 sig { returns(T::Boolean) } def repeated_parameter?; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#11853 def type; end private # private attr_reader flags: Integer # # source://prism//lib/prism/node.rb#11789 sig { returns(Integer) } def flags; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#11863 def type; end end end # Represents using a lambda literal (not the lambda method call). # # ->(value) { value * 2 } # ^^^^^^^^^^^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#11873 class Prism::LambdaNode < ::Prism::Node # def initialize: (Array[Symbol] locals, Location operator_loc, Location opening_loc, Location closing_loc, Node? parameters, Node? body, Location location) -> void # # @return [LambdaNode] a new instance of LambdaNode # # source://prism//lib/prism/node.rb#11874 def initialize(source, locals, operator_loc, opening_loc, closing_loc, parameters, body, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#11887 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # attr_reader body: Node? # # source://prism//lib/prism/node.rb#11956 sig { returns(T.nilable(Prism::Node)) } def body; end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#11892 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # # source://prism//lib/prism/node.rb#11970 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # # source://prism//lib/prism/node.rb#11947 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#11905 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#11897 def compact_child_nodes; end # def copy: (**params) -> LambdaNode # # source://prism//lib/prism/node.rb#11910 sig { params(params: T.untyped).returns(Prism::LambdaNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#11892 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], operator_loc: Location, opening_loc: Location, closing_loc: Location, parameters: Node?, body: Node?, location: Location } # # source://prism//lib/prism/node.rb#11927 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#11975 def inspect(inspector = T.unsafe(nil)); end # attr_reader locals: Array[Symbol] # # source://prism//lib/prism/node.rb#11932 sig { returns(T::Array[Symbol]) } def locals; end # def opening: () -> String # # source://prism//lib/prism/node.rb#11965 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # # source://prism//lib/prism/node.rb#11941 sig { returns(Prism::Location) } def opening_loc; end # def operator: () -> String # # source://prism//lib/prism/node.rb#11960 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism//lib/prism/node.rb#11935 sig { returns(Prism::Location) } def operator_loc; end # attr_reader parameters: Node? # # source://prism//lib/prism/node.rb#11953 sig { returns(T.nilable(Prism::Node)) } def parameters; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#12010 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#12020 def type; end end end # This class is responsible for lexing the source using prism and then # converting those tokens to be compatible with Ripper. In the vast majority # of cases, this is a one-to-one mapping of the token type. Everything else # generally lines up. However, there are a few cases that require special # handling. # # source://prism//lib/prism/lex_compat.rb#12 class Prism::LexCompat # @return [LexCompat] a new instance of LexCompat # # source://prism//lib/prism/lex_compat.rb#600 def initialize(source, **options); end # Returns the value of attribute options. # # source://prism//lib/prism/lex_compat.rb#598 def options; end # source://prism//lib/prism/lex_compat.rb#605 def result; end # Returns the value of attribute source. # # source://prism//lib/prism/lex_compat.rb#598 def source; end end # Ripper doesn't include the rest of the token in the event, so we need to # trim it down to just the content on the first line when comparing. # # source://prism//lib/prism/lex_compat.rb#211 class Prism::LexCompat::EndContentToken < ::Prism::LexCompat::Token # source://prism//lib/prism/lex_compat.rb#212 def ==(other); end end # A heredoc in this case is a list of tokens that belong to the body of the # heredoc that should be appended onto the list of tokens when the heredoc # closes. # # source://prism//lib/prism/lex_compat.rb#272 module Prism::LexCompat::Heredoc class << self # Here we will split between the two types of heredocs and return the # object that will store their tokens. # # source://prism//lib/prism/lex_compat.rb#584 def build(opening); end end end # Dash heredocs are a little more complicated. They are a list of tokens # that need to be split on "\\\n" to mimic Ripper's behavior. We also need # to keep track of the state that the heredoc was opened in. # # source://prism//lib/prism/lex_compat.rb#296 class Prism::LexCompat::Heredoc::DashHeredoc # @return [DashHeredoc] a new instance of DashHeredoc # # source://prism//lib/prism/lex_compat.rb#299 def initialize(split); end # source://prism//lib/prism/lex_compat.rb#304 def <<(token); end # source://prism//lib/prism/lex_compat.rb#297 def split; end # source://prism//lib/prism/lex_compat.rb#308 def to_a; end # source://prism//lib/prism/lex_compat.rb#297 def tokens; end end # Heredocs that are dedenting heredocs are a little more complicated. # Ripper outputs on_ignored_sp tokens for the whitespace that is being # removed from the output. prism only modifies the node itself and keeps # the token the same. This simplifies prism, but makes comparing against # Ripper much harder because there is a length mismatch. # # Fortunately, we already have to pull out the heredoc tokens in order to # insert them into the stream in the correct order. As such, we can do # some extra manipulation on the tokens to make them match Ripper's # output by mirroring the dedent logic that Ripper uses. # # source://prism//lib/prism/lex_compat.rb#355 class Prism::LexCompat::Heredoc::DedentingHeredoc # @return [DedentingHeredoc] a new instance of DedentingHeredoc # # source://prism//lib/prism/lex_compat.rb#360 def initialize; end # As tokens are coming in, we track the minimum amount of common leading # whitespace on plain string content tokens. This allows us to later # remove that amount of whitespace from the beginning of each line. # # source://prism//lib/prism/lex_compat.rb#371 def <<(token); end # Returns the value of attribute dedent. # # source://prism//lib/prism/lex_compat.rb#358 def dedent; end # Returns the value of attribute dedent_next. # # source://prism//lib/prism/lex_compat.rb#358 def dedent_next; end # Returns the value of attribute embexpr_balance. # # source://prism//lib/prism/lex_compat.rb#358 def embexpr_balance; end # source://prism//lib/prism/lex_compat.rb#408 def to_a; end # Returns the value of attribute tokens. # # source://prism//lib/prism/lex_compat.rb#358 def tokens; end end # source://prism//lib/prism/lex_compat.rb#356 Prism::LexCompat::Heredoc::DedentingHeredoc::TAB_WIDTH = T.let(T.unsafe(nil), Integer) # Heredocs that are no dash or tilde heredocs are just a list of tokens. # We need to keep them around so that we can insert them in the correct # order back into the token stream and set the state of the last token to # the state that the heredoc was opened in. # # source://prism//lib/prism/lex_compat.rb#277 class Prism::LexCompat::Heredoc::PlainHeredoc # @return [PlainHeredoc] a new instance of PlainHeredoc # # source://prism//lib/prism/lex_compat.rb#280 def initialize; end # source://prism//lib/prism/lex_compat.rb#284 def <<(token); end # source://prism//lib/prism/lex_compat.rb#288 def to_a; end # source://prism//lib/prism/lex_compat.rb#278 def tokens; end end # Ident tokens for the most part are exactly the same, except sometimes we # know an ident is a local when ripper doesn't (when they are introduced # through named captures in regular expressions). In that case we don't # compare the state. # # source://prism//lib/prism/lex_compat.rb#229 class Prism::LexCompat::IdentToken < ::Prism::LexCompat::Token # source://prism//lib/prism/lex_compat.rb#230 def ==(other); end end # Tokens where state should be ignored # used for :on_comment, :on_heredoc_end, :on_embexpr_end # # source://prism//lib/prism/lex_compat.rb#219 class Prism::LexCompat::IgnoreStateToken < ::Prism::LexCompat::Token # source://prism//lib/prism/lex_compat.rb#220 def ==(other); end end # Ignored newlines can occasionally have a LABEL state attached to them, so # we compare the state differently here. # # source://prism//lib/prism/lex_compat.rb#240 class Prism::LexCompat::IgnoredNewlineToken < ::Prism::LexCompat::Token # source://prism//lib/prism/lex_compat.rb#241 def ==(other); end end # If we have an identifier that follows a method name like: # # def foo bar # # then Ripper will mark bar as END|LABEL if there is a local in a parent # scope named bar because it hasn't pushed the local table yet. We do this # more accurately, so we need to allow comparing against both END and # END|LABEL. # # source://prism//lib/prism/lex_compat.rb#260 class Prism::LexCompat::ParamToken < ::Prism::LexCompat::Token # source://prism//lib/prism/lex_compat.rb#261 def ==(other); end end # This is a mapping of prism token types to Ripper token types. This is a # many-to-one mapping because we split up our token types, whereas Ripper # tends to group them. # # source://prism//lib/prism/lex_compat.rb#16 Prism::LexCompat::RIPPER = T.let(T.unsafe(nil), Hash) # When we produce tokens, we produce the same arrays that Ripper does. # However, we add a couple of convenience methods onto them to make them a # little easier to work with. We delegate all other methods to the array. # # source://prism//lib/prism/lex_compat.rb#188 class Prism::LexCompat::Token < ::SimpleDelegator # The type of the token. # # source://prism//lib/prism/lex_compat.rb#194 def event; end # The location of the token in the source. # # source://prism//lib/prism/lex_compat.rb#189 def location; end # The state of the lexer when this token was produced. # # source://prism//lib/prism/lex_compat.rb#204 def state; end # The slice of the source that this token represents. # # source://prism//lib/prism/lex_compat.rb#199 def value; end end # This is a class that wraps the Ripper lexer to produce almost exactly the # same tokens. # # source://prism//lib/prism/lex_compat.rb#853 class Prism::LexRipper # @return [LexRipper] a new instance of LexRipper # # source://prism//lib/prism/lex_compat.rb#856 def initialize(source); end # source://prism//lib/prism/lex_compat.rb#860 def result; end # source://prism//lib/prism/lex_compat.rb#854 def source; end private # source://prism//lib/prism/lex_compat.rb#894 def lex(source); end end # Represents the use of the `&&=` operator for assignment to a local variable. # # target &&= value # ^^^^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#12030 class Prism::LocalVariableAndWriteNode < ::Prism::Node # def initialize: (Location name_loc, Location operator_loc, Node value, Symbol name, Integer depth, Location location) -> void # # @return [LocalVariableAndWriteNode] a new instance of LocalVariableAndWriteNode # # source://prism//lib/prism/node.rb#12031 def initialize(source, name_loc, operator_loc, value, name, depth, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#12043 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#12048 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#12058 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#12053 def compact_child_nodes; end # def copy: (**params) -> LocalVariableAndWriteNode # # source://prism//lib/prism/node.rb#12063 sig { params(params: T.untyped).returns(Prism::LocalVariableAndWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#12048 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name_loc: Location, operator_loc: Location, value: Node, name: Symbol, depth: Integer, location: Location } # # source://prism//lib/prism/node.rb#12079 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # attr_reader depth: Integer # # source://prism//lib/prism/node.rb#12102 sig { returns(Integer) } def depth; end # source://prism//lib/prism/desugar_compiler.rb#197 def desugar; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#12111 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # # source://prism//lib/prism/node.rb#12099 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # # source://prism//lib/prism/node.rb#12084 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # # source://prism//lib/prism/node.rb#12106 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism//lib/prism/node.rb#12090 sig { returns(Prism::Location) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#12136 def type; end # attr_reader value: Node # # source://prism//lib/prism/node.rb#12096 sig { returns(Prism::Node) } def value; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#12146 def type; end end end # Represents assigning to a local variable using an operator that isn't `=`. # # target += value # ^^^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#12156 class Prism::LocalVariableOperatorWriteNode < ::Prism::Node # def initialize: (Location name_loc, Location operator_loc, Node value, Symbol name, Symbol operator, Integer depth, Location location) -> void # # @return [LocalVariableOperatorWriteNode] a new instance of LocalVariableOperatorWriteNode # # source://prism//lib/prism/node.rb#12157 def initialize(source, name_loc, operator_loc, value, name, operator, depth, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#12170 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#12175 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#12185 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#12180 def compact_child_nodes; end # def copy: (**params) -> LocalVariableOperatorWriteNode # # source://prism//lib/prism/node.rb#12190 sig { params(params: T.untyped).returns(Prism::LocalVariableOperatorWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#12175 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name_loc: Location, operator_loc: Location, value: Node, name: Symbol, operator: Symbol, depth: Integer, location: Location } # # source://prism//lib/prism/node.rb#12207 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # attr_reader depth: Integer # # source://prism//lib/prism/node.rb#12233 sig { returns(Integer) } def depth; end # source://prism//lib/prism/desugar_compiler.rb#209 def desugar; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#12237 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # # source://prism//lib/prism/node.rb#12227 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # # source://prism//lib/prism/node.rb#12212 sig { returns(Prism::Location) } def name_loc; end # attr_reader operator: Symbol # # source://prism//lib/prism/node.rb#12230 sig { returns(Symbol) } def operator; end # attr_reader operator_loc: Location # # source://prism//lib/prism/node.rb#12218 sig { returns(Prism::Location) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#12263 def type; end # attr_reader value: Node # # source://prism//lib/prism/node.rb#12224 sig { returns(Prism::Node) } def value; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#12273 def type; end end end # Represents the use of the `||=` operator for assignment to a local variable. # # target ||= value # ^^^^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#12283 class Prism::LocalVariableOrWriteNode < ::Prism::Node # def initialize: (Location name_loc, Location operator_loc, Node value, Symbol name, Integer depth, Location location) -> void # # @return [LocalVariableOrWriteNode] a new instance of LocalVariableOrWriteNode # # source://prism//lib/prism/node.rb#12284 def initialize(source, name_loc, operator_loc, value, name, depth, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#12296 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#12301 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#12311 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#12306 def compact_child_nodes; end # def copy: (**params) -> LocalVariableOrWriteNode # # source://prism//lib/prism/node.rb#12316 sig { params(params: T.untyped).returns(Prism::LocalVariableOrWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#12301 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name_loc: Location, operator_loc: Location, value: Node, name: Symbol, depth: Integer, location: Location } # # source://prism//lib/prism/node.rb#12332 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # attr_reader depth: Integer # # source://prism//lib/prism/node.rb#12355 sig { returns(Integer) } def depth; end # source://prism//lib/prism/desugar_compiler.rb#203 def desugar; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#12364 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # # source://prism//lib/prism/node.rb#12352 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # # source://prism//lib/prism/node.rb#12337 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # # source://prism//lib/prism/node.rb#12359 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism//lib/prism/node.rb#12343 sig { returns(Prism::Location) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#12389 def type; end # attr_reader value: Node # # source://prism//lib/prism/node.rb#12349 sig { returns(Prism::Node) } def value; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#12399 def type; end end end # Represents reading a local variable. Note that this requires that a local variable of the same name has already been written to in the same scope, otherwise it is parsed as a method call. # # foo # ^^^ # # source://prism//lib/prism/node.rb#12409 class Prism::LocalVariableReadNode < ::Prism::Node # def initialize: (Symbol name, Integer depth, Location location) -> void # # @return [LocalVariableReadNode] a new instance of LocalVariableReadNode # # source://prism//lib/prism/node.rb#12410 def initialize(source, name, depth, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#12419 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#12424 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#12434 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#12429 def compact_child_nodes; end # def copy: (**params) -> LocalVariableReadNode # # source://prism//lib/prism/node.rb#12439 sig { params(params: T.untyped).returns(Prism::LocalVariableReadNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#12424 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, depth: Integer, location: Location } # # source://prism//lib/prism/node.rb#12452 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # The number of visible scopes that should be searched to find the origin of this local variable. # # foo = 1; foo # depth 0 # # bar = 2; tap { bar } # depth 1 # # The specific rules for calculating the depth may differ from individual Ruby implementations, as they are not specified by the language. For more information, see [the Prism documentation](https://github.com/ruby/prism/blob/main/docs/local_variable_depth.md). # # source://prism//lib/prism/node.rb#12478 sig { returns(Integer) } def depth; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#12482 def inspect(inspector = T.unsafe(nil)); end # The name of the local variable, which is an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers). # # x # name `:x` # # _Test # name `:_Test` # # Note that this can also be an underscore followed by a number for the default block parameters. # # _1 # name `:_1` # # Finally, for the default `it` block parameter, the name is `0it`. This is to distinguish it from an `it` local variable that is explicitly declared. # # it # name `:0it` # # source://prism//lib/prism/node.rb#12469 sig { returns(Symbol) } def name; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#12503 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#12513 def type; end end end # Represents writing to a local variable in a context that doesn't have an explicit value. # # foo, bar = baz # ^^^ ^^^ # # source://prism//lib/prism/node.rb#12523 class Prism::LocalVariableTargetNode < ::Prism::Node # def initialize: (Symbol name, Integer depth, Location location) -> void # # @return [LocalVariableTargetNode] a new instance of LocalVariableTargetNode # # source://prism//lib/prism/node.rb#12524 def initialize(source, name, depth, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#12533 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#12538 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#12548 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#12543 def compact_child_nodes; end # def copy: (**params) -> LocalVariableTargetNode # # source://prism//lib/prism/node.rb#12553 sig { params(params: T.untyped).returns(Prism::LocalVariableTargetNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#12538 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, depth: Integer, location: Location } # # source://prism//lib/prism/node.rb#12566 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # attr_reader depth: Integer # # source://prism//lib/prism/node.rb#12574 sig { returns(Integer) } def depth; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#12578 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # # source://prism//lib/prism/node.rb#12571 sig { returns(Symbol) } def name; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#12599 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#12609 def type; end end end # Represents writing to a local variable. # # foo = 1 # ^^^^^^^ # # source://prism//lib/prism/node.rb#12619 class Prism::LocalVariableWriteNode < ::Prism::Node # def initialize: (Symbol name, Integer depth, Location name_loc, Node value, Location operator_loc, Location location) -> void # # @return [LocalVariableWriteNode] a new instance of LocalVariableWriteNode # # source://prism//lib/prism/node.rb#12620 def initialize(source, name, depth, name_loc, value, operator_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#12632 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#12637 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#12647 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#12642 def compact_child_nodes; end # def copy: (**params) -> LocalVariableWriteNode # # source://prism//lib/prism/node.rb#12652 sig { params(params: T.untyped).returns(Prism::LocalVariableWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#12637 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, depth: Integer, name_loc: Location, value: Node, operator_loc: Location, location: Location } # # source://prism//lib/prism/node.rb#12668 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # attr_reader depth: Integer # # source://prism//lib/prism/node.rb#12676 sig { returns(Integer) } def depth; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#12700 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # # source://prism//lib/prism/node.rb#12673 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # # source://prism//lib/prism/node.rb#12679 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # # source://prism//lib/prism/node.rb#12695 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism//lib/prism/node.rb#12688 sig { returns(Prism::Location) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#12725 def type; end # attr_reader value: Node # # source://prism//lib/prism/node.rb#12685 sig { returns(Prism::Node) } def value; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#12735 def type; end end end # This represents a location in the source. # # source://prism//lib/prism/parse_result.rb#98 class Prism::Location # Create a new location object with the given source, start byte offset, and # byte length. # # @return [Location] a new instance of Location # # source://prism//lib/prism/parse_result.rb#116 sig { params(source: Prism::Source, start_offset: Integer, length: Integer).void } def initialize(source, start_offset, length); end # Returns true if the given other location is equal to this location. # # source://prism//lib/prism/parse_result.rb#232 def ==(other); end # The list of comments attached to this location # # source://prism//lib/prism/parse_result.rb#112 sig { returns(T::Array[Prism::Comment]) } def comments; end # Create a new location object with the given options. # # source://prism//lib/prism/parse_result.rb#124 sig { params(options: T.untyped).returns(Prism::Location) } def copy(**options); end # Implement the hash pattern matching interface for Location. # # source://prism//lib/prism/parse_result.rb#222 def deconstruct_keys(keys); end # The column number in characters where this location ends from the start of # the line. # # source://prism//lib/prism/parse_result.rb#211 def end_character_column; end # The character offset from the beginning of the source where this location # ends. # # source://prism//lib/prism/parse_result.rb#160 def end_character_offset; end # The column number in code units of the given encoding where this location # ends from the start of the line. # # source://prism//lib/prism/parse_result.rb#217 def end_code_units_column(encoding = T.unsafe(nil)); end # The offset from the start of the file in code units of the given encoding. # # source://prism//lib/prism/parse_result.rb#165 def end_code_units_offset(encoding = T.unsafe(nil)); end # The column number in bytes where this location ends from the start of the # line. # # source://prism//lib/prism/parse_result.rb#205 sig { returns(Integer) } def end_column; end # The line number where this location ends. # # source://prism//lib/prism/parse_result.rb#181 sig { returns(Integer) } def end_line; end # The byte offset from the beginning of the source where this location ends. # # source://prism//lib/prism/parse_result.rb#154 sig { returns(Integer) } def end_offset; end # Returns a string representation of this location. # # source://prism//lib/prism/parse_result.rb#133 def inspect; end # Returns a new location that stretches from this location to the given # other location. Raises an error if this location is not before the other # location or if they don't share the same source. # # source://prism//lib/prism/parse_result.rb#241 def join(other); end # The length of this location in bytes. # # source://prism//lib/prism/parse_result.rb#109 def length; end # Implement the pretty print interface for Location. # # source://prism//lib/prism/parse_result.rb#227 def pretty_print(q); end # The source code that this location represents. # # source://prism//lib/prism/parse_result.rb#138 sig { returns(String) } def slice; end # The column number in characters where this location ends from the start of # the line. # # source://prism//lib/prism/parse_result.rb#193 def start_character_column; end # The character offset from the beginning of the source where this location # starts. # # source://prism//lib/prism/parse_result.rb#144 def start_character_offset; end # The column number in code units of the given encoding where this location # starts from the start of the line. # # source://prism//lib/prism/parse_result.rb#199 def start_code_units_column(encoding = T.unsafe(nil)); end # The offset from the start of the file in code units of the given encoding. # # source://prism//lib/prism/parse_result.rb#149 def start_code_units_offset(encoding = T.unsafe(nil)); end # The column number in bytes where this location starts from the start of # the line. # # source://prism//lib/prism/parse_result.rb#187 sig { returns(Integer) } def start_column; end # The line number where this location starts. # # source://prism//lib/prism/parse_result.rb#170 sig { returns(Integer) } def start_line; end # The content of the line where this location starts before this location. # # source://prism//lib/prism/parse_result.rb#175 def start_line_slice; end # The byte offset from the beginning of the source where this location # starts. # # source://prism//lib/prism/parse_result.rb#106 sig { returns(Integer) } def start_offset; end protected # A Source object that is used to determine more information from the given # offset and length. # # source://prism//lib/prism/parse_result.rb#101 def source; end class << self # Returns a null location that does not correspond to a source and points to # the beginning of the file. Useful for when you want a location object but # do not care where it points. # # source://prism//lib/prism/parse_result.rb#251 def null; end end end # Flags for while and until loop nodes. # # source://prism//lib/prism/node.rb#19298 module Prism::LoopFlags; end # a loop after a begin statement, so the body is executed first before the condition # # source://prism//lib/prism/node.rb#19300 Prism::LoopFlags::BEGIN_MODIFIER = T.let(T.unsafe(nil), Integer) # This represents a magic comment that was encountered during parsing. # # source://prism//lib/prism/parse_result.rb#303 class Prism::MagicComment # Create a new magic comment object with the given key and value locations. # # @return [MagicComment] a new instance of MagicComment # # source://prism//lib/prism/parse_result.rb#311 def initialize(key_loc, value_loc); end # Implement the hash pattern matching interface for MagicComment. # # source://prism//lib/prism/parse_result.rb#327 def deconstruct_keys(keys); end # Returns a string representation of this magic comment. # # source://prism//lib/prism/parse_result.rb#332 def inspect; end # Returns the key of the magic comment by slicing it from the source code. # # source://prism//lib/prism/parse_result.rb#317 def key; end # A Location object representing the location of the key in the source. # # source://prism//lib/prism/parse_result.rb#305 def key_loc; end # Returns the value of the magic comment by slicing it from the source code. # # source://prism//lib/prism/parse_result.rb#322 def value; end # A Location object representing the location of the value in the source. # # source://prism//lib/prism/parse_result.rb#308 def value_loc; end end # Represents a regular expression literal used in the predicate of a conditional to implicitly match against the last line read by an IO object. # # if /foo/i then end # ^^^^^^ # # source://prism//lib/prism/node.rb#12745 class Prism::MatchLastLineNode < ::Prism::Node include ::Prism::RegularExpressionOptions # def initialize: (Integer flags, Location opening_loc, Location content_loc, Location closing_loc, String unescaped, Location location) -> void # # @return [MatchLastLineNode] a new instance of MatchLastLineNode # # source://prism//lib/prism/node.rb#12746 def initialize(source, flags, opening_loc, content_loc, closing_loc, unescaped, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#12758 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def ascii_8bit?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#12850 sig { returns(T::Boolean) } def ascii_8bit?; end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#12763 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # # source://prism//lib/prism/node.rb#12890 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # # source://prism//lib/prism/node.rb#12815 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#12773 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#12768 def compact_child_nodes; end # def content: () -> String # # source://prism//lib/prism/node.rb#12885 sig { returns(String) } def content; end # attr_reader content_loc: Location # # source://prism//lib/prism/node.rb#12809 sig { returns(Prism::Location) } def content_loc; end # def copy: (**params) -> MatchLastLineNode # # source://prism//lib/prism/node.rb#12778 sig { params(params: T.untyped).returns(Prism::MatchLastLineNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#12763 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location } # # source://prism//lib/prism/node.rb#12794 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def euc_jp?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#12845 sig { returns(T::Boolean) } def euc_jp?; end # def extended?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#12830 sig { returns(T::Boolean) } def extended?; end # def forced_binary_encoding?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#12870 sig { returns(T::Boolean) } def forced_binary_encoding?; end # def forced_us_ascii_encoding?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#12875 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end # def forced_utf8_encoding?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#12865 sig { returns(T::Boolean) } def forced_utf8_encoding?; end # def ignore_case?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#12825 sig { returns(T::Boolean) } def ignore_case?; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#12895 def inspect(inspector = T.unsafe(nil)); end # def multi_line?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#12835 sig { returns(T::Boolean) } def multi_line?; end # def once?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#12840 sig { returns(T::Boolean) } def once?; end # def opening: () -> String # # source://prism//lib/prism/node.rb#12880 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # # source://prism//lib/prism/node.rb#12803 sig { returns(Prism::Location) } def opening_loc; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#12920 def type; end # attr_reader unescaped: String # # source://prism//lib/prism/node.rb#12821 sig { returns(String) } def unescaped; end # def utf_8?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#12860 sig { returns(T::Boolean) } def utf_8?; end # def windows_31j?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#12855 sig { returns(T::Boolean) } def windows_31j?; end private # private attr_reader flags: Integer # # source://prism//lib/prism/node.rb#12799 sig { returns(Integer) } def flags; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#12930 def type; end end end # Represents the use of the modifier `in` operator. # # foo in bar # ^^^^^^^^^^ # # source://prism//lib/prism/node.rb#12940 class Prism::MatchPredicateNode < ::Prism::Node # def initialize: (Node value, Node pattern, Location operator_loc, Location location) -> void # # @return [MatchPredicateNode] a new instance of MatchPredicateNode # # source://prism//lib/prism/node.rb#12941 def initialize(source, value, pattern, operator_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#12951 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#12956 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#12966 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#12961 def compact_child_nodes; end # def copy: (**params) -> MatchPredicateNode # # source://prism//lib/prism/node.rb#12971 sig { params(params: T.untyped).returns(Prism::MatchPredicateNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#12956 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { value: Node, pattern: Node, operator_loc: Location, location: Location } # # source://prism//lib/prism/node.rb#12985 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#13008 def inspect(inspector = T.unsafe(nil)); end # def operator: () -> String # # source://prism//lib/prism/node.rb#13003 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism//lib/prism/node.rb#12996 sig { returns(Prism::Location) } def operator_loc; end # attr_reader pattern: Node # # source://prism//lib/prism/node.rb#12993 sig { returns(Prism::Node) } def pattern; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#13032 def type; end # attr_reader value: Node # # source://prism//lib/prism/node.rb#12990 sig { returns(Prism::Node) } def value; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#13042 def type; end end end # Represents the use of the `=>` operator. # # foo => bar # ^^^^^^^^^^ # # source://prism//lib/prism/node.rb#13052 class Prism::MatchRequiredNode < ::Prism::Node # def initialize: (Node value, Node pattern, Location operator_loc, Location location) -> void # # @return [MatchRequiredNode] a new instance of MatchRequiredNode # # source://prism//lib/prism/node.rb#13053 def initialize(source, value, pattern, operator_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#13063 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#13068 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#13078 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#13073 def compact_child_nodes; end # def copy: (**params) -> MatchRequiredNode # # source://prism//lib/prism/node.rb#13083 sig { params(params: T.untyped).returns(Prism::MatchRequiredNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#13068 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { value: Node, pattern: Node, operator_loc: Location, location: Location } # # source://prism//lib/prism/node.rb#13097 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#13120 def inspect(inspector = T.unsafe(nil)); end # def operator: () -> String # # source://prism//lib/prism/node.rb#13115 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism//lib/prism/node.rb#13108 sig { returns(Prism::Location) } def operator_loc; end # attr_reader pattern: Node # # source://prism//lib/prism/node.rb#13105 sig { returns(Prism::Node) } def pattern; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#13144 def type; end # attr_reader value: Node # # source://prism//lib/prism/node.rb#13102 sig { returns(Prism::Node) } def value; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#13154 def type; end end end # Represents writing local variables using a regular expression match with named capture groups. # # /(?bar)/ =~ baz # ^^^^^^^^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#13164 class Prism::MatchWriteNode < ::Prism::Node # def initialize: (CallNode call, Array[Node] targets, Location location) -> void # # @return [MatchWriteNode] a new instance of MatchWriteNode # # source://prism//lib/prism/node.rb#13165 def initialize(source, call, targets, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#13174 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # attr_reader call: CallNode # # source://prism//lib/prism/node.rb#13212 sig { returns(Prism::CallNode) } def call; end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#13179 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#13189 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#13184 def compact_child_nodes; end # def copy: (**params) -> MatchWriteNode # # source://prism//lib/prism/node.rb#13194 sig { params(params: T.untyped).returns(Prism::MatchWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#13179 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { call: CallNode, targets: Array[Node], location: Location } # # source://prism//lib/prism/node.rb#13207 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#13219 def inspect(inspector = T.unsafe(nil)); end # attr_reader targets: Array[Node] # # source://prism//lib/prism/node.rb#13215 sig { returns(T::Array[Prism::Node]) } def targets; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#13241 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#13251 def type; end end end # Represents a node that is missing from the source and results in a syntax error. # # source://prism//lib/prism/node.rb#13258 class Prism::MissingNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [MissingNode] a new instance of MissingNode # # source://prism//lib/prism/node.rb#13259 def initialize(source, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#13266 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#13271 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#13281 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#13276 def compact_child_nodes; end # def copy: (**params) -> MissingNode # # source://prism//lib/prism/node.rb#13286 sig { params(params: T.untyped).returns(Prism::MissingNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#13271 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } # # source://prism//lib/prism/node.rb#13297 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#13303 def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#13322 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#13332 def type; end end end # Represents a module declaration involving the `module` keyword. # # module Foo end # ^^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#13342 class Prism::ModuleNode < ::Prism::Node # def initialize: (Array[Symbol] locals, Location module_keyword_loc, Node constant_path, Node? body, Location end_keyword_loc, Symbol name, Location location) -> void # # @return [ModuleNode] a new instance of ModuleNode # # source://prism//lib/prism/node.rb#13343 def initialize(source, locals, module_keyword_loc, constant_path, body, end_keyword_loc, name, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#13356 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # attr_reader body: Node? # # source://prism//lib/prism/node.rb#13413 sig { returns(T.nilable(Prism::Node)) } def body; end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#13361 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#13374 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#13366 def compact_child_nodes; end # attr_reader constant_path: Node # # source://prism//lib/prism/node.rb#13410 sig { returns(Prism::Node) } def constant_path; end # def copy: (**params) -> ModuleNode # # source://prism//lib/prism/node.rb#13379 sig { params(params: T.untyped).returns(Prism::ModuleNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#13361 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], module_keyword_loc: Location, constant_path: Node, body: Node?, end_keyword_loc: Location, name: Symbol, location: Location } # # source://prism//lib/prism/node.rb#13396 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def end_keyword: () -> String # # source://prism//lib/prism/node.rb#13431 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # # source://prism//lib/prism/node.rb#13416 sig { returns(Prism::Location) } def end_keyword_loc; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#13436 def inspect(inspector = T.unsafe(nil)); end # attr_reader locals: Array[Symbol] # # source://prism//lib/prism/node.rb#13401 sig { returns(T::Array[Symbol]) } def locals; end # def module_keyword: () -> String # # source://prism//lib/prism/node.rb#13426 sig { returns(String) } def module_keyword; end # attr_reader module_keyword_loc: Location # # source://prism//lib/prism/node.rb#13404 sig { returns(Prism::Location) } def module_keyword_loc; end # attr_reader name: Symbol # # source://prism//lib/prism/node.rb#13422 sig { returns(Symbol) } def name; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#13467 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#13477 def type; end end end # Represents a multi-target expression. # # a, (b, c) = 1, 2, 3 # ^^^^^^ # # source://prism//lib/prism/node.rb#13487 class Prism::MultiTargetNode < ::Prism::Node # def initialize: (Array[Node] lefts, Node? rest, Array[Node] rights, Location? lparen_loc, Location? rparen_loc, Location location) -> void # # @return [MultiTargetNode] a new instance of MultiTargetNode # # source://prism//lib/prism/node.rb#13488 def initialize(source, lefts, rest, rights, lparen_loc, rparen_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#13500 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#13505 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#13519 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#13510 def compact_child_nodes; end # def copy: (**params) -> MultiTargetNode # # source://prism//lib/prism/node.rb#13524 sig { params(params: T.untyped).returns(Prism::MultiTargetNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#13505 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { lefts: Array[Node], rest: Node?, rights: Array[Node], lparen_loc: Location?, rparen_loc: Location?, location: Location } # # source://prism//lib/prism/node.rb#13540 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#13589 def inspect(inspector = T.unsafe(nil)); end # attr_reader lefts: Array[Node] # # source://prism//lib/prism/node.rb#13545 sig { returns(T::Array[Prism::Node]) } def lefts; end # def lparen: () -> String? # # source://prism//lib/prism/node.rb#13579 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # # source://prism//lib/prism/node.rb#13554 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # attr_reader rest: Node? # # source://prism//lib/prism/node.rb#13548 sig { returns(T.nilable(Prism::Node)) } def rest; end # attr_reader rights: Array[Node] # # source://prism//lib/prism/node.rb#13551 sig { returns(T::Array[Prism::Node]) } def rights; end # def rparen: () -> String? # # source://prism//lib/prism/node.rb#13584 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # # source://prism//lib/prism/node.rb#13566 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#13618 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#13628 def type; end end end # Represents a write to a multi-target expression. # # a, b, c = 1, 2, 3 # ^^^^^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#13638 class Prism::MultiWriteNode < ::Prism::Node # def initialize: (Array[Node] lefts, Node? rest, Array[Node] rights, Location? lparen_loc, Location? rparen_loc, Location operator_loc, Node value, Location location) -> void # # @return [MultiWriteNode] a new instance of MultiWriteNode # # source://prism//lib/prism/node.rb#13639 def initialize(source, lefts, rest, rights, lparen_loc, rparen_loc, operator_loc, value, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#13653 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#13658 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#13673 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#13663 def compact_child_nodes; end # def copy: (**params) -> MultiWriteNode # # source://prism//lib/prism/node.rb#13678 sig { params(params: T.untyped).returns(Prism::MultiWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#13658 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { lefts: Array[Node], rest: Node?, rights: Array[Node], lparen_loc: Location?, rparen_loc: Location?, operator_loc: Location, value: Node, location: Location } # # source://prism//lib/prism/node.rb#13696 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#13759 def inspect(inspector = T.unsafe(nil)); end # attr_reader lefts: Array[Node] # # source://prism//lib/prism/node.rb#13701 sig { returns(T::Array[Prism::Node]) } def lefts; end # def lparen: () -> String? # # source://prism//lib/prism/node.rb#13744 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # # source://prism//lib/prism/node.rb#13710 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def operator: () -> String # # source://prism//lib/prism/node.rb#13754 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism//lib/prism/node.rb#13734 sig { returns(Prism::Location) } def operator_loc; end # attr_reader rest: Node? # # source://prism//lib/prism/node.rb#13704 sig { returns(T.nilable(Prism::Node)) } def rest; end # attr_reader rights: Array[Node] # # source://prism//lib/prism/node.rb#13707 sig { returns(T::Array[Prism::Node]) } def rights; end # def rparen: () -> String? # # source://prism//lib/prism/node.rb#13749 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # # source://prism//lib/prism/node.rb#13722 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#13791 def type; end # attr_reader value: Node # # source://prism//lib/prism/node.rb#13740 sig { returns(Prism::Node) } def value; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#13801 def type; end end end # This visitor walks through the tree and copies each node as it is being # visited. This is useful for consumers that want to mutate the tree, as you # can change subtrees in place without effecting the rest of the tree. # # source://prism//lib/prism/mutation_compiler.rb#13 class Prism::MutationCompiler < ::Prism::Compiler # Copy a AliasGlobalVariableNode node # # source://prism//lib/prism/mutation_compiler.rb#14 def visit_alias_global_variable_node(node); end # Copy a AliasMethodNode node # # source://prism//lib/prism/mutation_compiler.rb#19 def visit_alias_method_node(node); end # Copy a AlternationPatternNode node # # source://prism//lib/prism/mutation_compiler.rb#24 def visit_alternation_pattern_node(node); end # Copy a AndNode node # # source://prism//lib/prism/mutation_compiler.rb#29 def visit_and_node(node); end # Copy a ArgumentsNode node # # source://prism//lib/prism/mutation_compiler.rb#34 def visit_arguments_node(node); end # Copy a ArrayNode node # # source://prism//lib/prism/mutation_compiler.rb#39 def visit_array_node(node); end # Copy a ArrayPatternNode node # # source://prism//lib/prism/mutation_compiler.rb#44 def visit_array_pattern_node(node); end # Copy a AssocNode node # # source://prism//lib/prism/mutation_compiler.rb#49 def visit_assoc_node(node); end # Copy a AssocSplatNode node # # source://prism//lib/prism/mutation_compiler.rb#54 def visit_assoc_splat_node(node); end # Copy a BackReferenceReadNode node # # source://prism//lib/prism/mutation_compiler.rb#59 def visit_back_reference_read_node(node); end # Copy a BeginNode node # # source://prism//lib/prism/mutation_compiler.rb#64 def visit_begin_node(node); end # Copy a BlockArgumentNode node # # source://prism//lib/prism/mutation_compiler.rb#69 def visit_block_argument_node(node); end # Copy a BlockLocalVariableNode node # # source://prism//lib/prism/mutation_compiler.rb#74 def visit_block_local_variable_node(node); end # Copy a BlockNode node # # source://prism//lib/prism/mutation_compiler.rb#79 def visit_block_node(node); end # Copy a BlockParameterNode node # # source://prism//lib/prism/mutation_compiler.rb#84 def visit_block_parameter_node(node); end # Copy a BlockParametersNode node # # source://prism//lib/prism/mutation_compiler.rb#89 def visit_block_parameters_node(node); end # Copy a BreakNode node # # source://prism//lib/prism/mutation_compiler.rb#94 def visit_break_node(node); end # Copy a CallAndWriteNode node # # source://prism//lib/prism/mutation_compiler.rb#99 def visit_call_and_write_node(node); end # Copy a CallNode node # # source://prism//lib/prism/mutation_compiler.rb#104 def visit_call_node(node); end # Copy a CallOperatorWriteNode node # # source://prism//lib/prism/mutation_compiler.rb#109 def visit_call_operator_write_node(node); end # Copy a CallOrWriteNode node # # source://prism//lib/prism/mutation_compiler.rb#114 def visit_call_or_write_node(node); end # Copy a CallTargetNode node # # source://prism//lib/prism/mutation_compiler.rb#119 def visit_call_target_node(node); end # Copy a CapturePatternNode node # # source://prism//lib/prism/mutation_compiler.rb#124 def visit_capture_pattern_node(node); end # Copy a CaseMatchNode node # # source://prism//lib/prism/mutation_compiler.rb#129 def visit_case_match_node(node); end # Copy a CaseNode node # # source://prism//lib/prism/mutation_compiler.rb#134 def visit_case_node(node); end # Copy a ClassNode node # # source://prism//lib/prism/mutation_compiler.rb#139 def visit_class_node(node); end # Copy a ClassVariableAndWriteNode node # # source://prism//lib/prism/mutation_compiler.rb#144 def visit_class_variable_and_write_node(node); end # Copy a ClassVariableOperatorWriteNode node # # source://prism//lib/prism/mutation_compiler.rb#149 def visit_class_variable_operator_write_node(node); end # Copy a ClassVariableOrWriteNode node # # source://prism//lib/prism/mutation_compiler.rb#154 def visit_class_variable_or_write_node(node); end # Copy a ClassVariableReadNode node # # source://prism//lib/prism/mutation_compiler.rb#159 def visit_class_variable_read_node(node); end # Copy a ClassVariableTargetNode node # # source://prism//lib/prism/mutation_compiler.rb#164 def visit_class_variable_target_node(node); end # Copy a ClassVariableWriteNode node # # source://prism//lib/prism/mutation_compiler.rb#169 def visit_class_variable_write_node(node); end # Copy a ConstantAndWriteNode node # # source://prism//lib/prism/mutation_compiler.rb#174 def visit_constant_and_write_node(node); end # Copy a ConstantOperatorWriteNode node # # source://prism//lib/prism/mutation_compiler.rb#179 def visit_constant_operator_write_node(node); end # Copy a ConstantOrWriteNode node # # source://prism//lib/prism/mutation_compiler.rb#184 def visit_constant_or_write_node(node); end # Copy a ConstantPathAndWriteNode node # # source://prism//lib/prism/mutation_compiler.rb#189 def visit_constant_path_and_write_node(node); end # Copy a ConstantPathNode node # # source://prism//lib/prism/mutation_compiler.rb#194 def visit_constant_path_node(node); end # Copy a ConstantPathOperatorWriteNode node # # source://prism//lib/prism/mutation_compiler.rb#199 def visit_constant_path_operator_write_node(node); end # Copy a ConstantPathOrWriteNode node # # source://prism//lib/prism/mutation_compiler.rb#204 def visit_constant_path_or_write_node(node); end # Copy a ConstantPathTargetNode node # # source://prism//lib/prism/mutation_compiler.rb#209 def visit_constant_path_target_node(node); end # Copy a ConstantPathWriteNode node # # source://prism//lib/prism/mutation_compiler.rb#214 def visit_constant_path_write_node(node); end # Copy a ConstantReadNode node # # source://prism//lib/prism/mutation_compiler.rb#219 def visit_constant_read_node(node); end # Copy a ConstantTargetNode node # # source://prism//lib/prism/mutation_compiler.rb#224 def visit_constant_target_node(node); end # Copy a ConstantWriteNode node # # source://prism//lib/prism/mutation_compiler.rb#229 def visit_constant_write_node(node); end # Copy a DefNode node # # source://prism//lib/prism/mutation_compiler.rb#234 def visit_def_node(node); end # Copy a DefinedNode node # # source://prism//lib/prism/mutation_compiler.rb#239 def visit_defined_node(node); end # Copy a ElseNode node # # source://prism//lib/prism/mutation_compiler.rb#244 def visit_else_node(node); end # Copy a EmbeddedStatementsNode node # # source://prism//lib/prism/mutation_compiler.rb#249 def visit_embedded_statements_node(node); end # Copy a EmbeddedVariableNode node # # source://prism//lib/prism/mutation_compiler.rb#254 def visit_embedded_variable_node(node); end # Copy a EnsureNode node # # source://prism//lib/prism/mutation_compiler.rb#259 def visit_ensure_node(node); end # Copy a FalseNode node # # source://prism//lib/prism/mutation_compiler.rb#264 def visit_false_node(node); end # Copy a FindPatternNode node # # source://prism//lib/prism/mutation_compiler.rb#269 def visit_find_pattern_node(node); end # Copy a FlipFlopNode node # # source://prism//lib/prism/mutation_compiler.rb#274 def visit_flip_flop_node(node); end # Copy a FloatNode node # # source://prism//lib/prism/mutation_compiler.rb#279 def visit_float_node(node); end # Copy a ForNode node # # source://prism//lib/prism/mutation_compiler.rb#284 def visit_for_node(node); end # Copy a ForwardingArgumentsNode node # # source://prism//lib/prism/mutation_compiler.rb#289 def visit_forwarding_arguments_node(node); end # Copy a ForwardingParameterNode node # # source://prism//lib/prism/mutation_compiler.rb#294 def visit_forwarding_parameter_node(node); end # Copy a ForwardingSuperNode node # # source://prism//lib/prism/mutation_compiler.rb#299 def visit_forwarding_super_node(node); end # Copy a GlobalVariableAndWriteNode node # # source://prism//lib/prism/mutation_compiler.rb#304 def visit_global_variable_and_write_node(node); end # Copy a GlobalVariableOperatorWriteNode node # # source://prism//lib/prism/mutation_compiler.rb#309 def visit_global_variable_operator_write_node(node); end # Copy a GlobalVariableOrWriteNode node # # source://prism//lib/prism/mutation_compiler.rb#314 def visit_global_variable_or_write_node(node); end # Copy a GlobalVariableReadNode node # # source://prism//lib/prism/mutation_compiler.rb#319 def visit_global_variable_read_node(node); end # Copy a GlobalVariableTargetNode node # # source://prism//lib/prism/mutation_compiler.rb#324 def visit_global_variable_target_node(node); end # Copy a GlobalVariableWriteNode node # # source://prism//lib/prism/mutation_compiler.rb#329 def visit_global_variable_write_node(node); end # Copy a HashNode node # # source://prism//lib/prism/mutation_compiler.rb#334 def visit_hash_node(node); end # Copy a HashPatternNode node # # source://prism//lib/prism/mutation_compiler.rb#339 def visit_hash_pattern_node(node); end # Copy a IfNode node # # source://prism//lib/prism/mutation_compiler.rb#344 def visit_if_node(node); end # Copy a ImaginaryNode node # # source://prism//lib/prism/mutation_compiler.rb#349 def visit_imaginary_node(node); end # Copy a ImplicitNode node # # source://prism//lib/prism/mutation_compiler.rb#354 def visit_implicit_node(node); end # Copy a ImplicitRestNode node # # source://prism//lib/prism/mutation_compiler.rb#359 def visit_implicit_rest_node(node); end # Copy a InNode node # # source://prism//lib/prism/mutation_compiler.rb#364 def visit_in_node(node); end # Copy a IndexAndWriteNode node # # source://prism//lib/prism/mutation_compiler.rb#369 def visit_index_and_write_node(node); end # Copy a IndexOperatorWriteNode node # # source://prism//lib/prism/mutation_compiler.rb#374 def visit_index_operator_write_node(node); end # Copy a IndexOrWriteNode node # # source://prism//lib/prism/mutation_compiler.rb#379 def visit_index_or_write_node(node); end # Copy a IndexTargetNode node # # source://prism//lib/prism/mutation_compiler.rb#384 def visit_index_target_node(node); end # Copy a InstanceVariableAndWriteNode node # # source://prism//lib/prism/mutation_compiler.rb#389 def visit_instance_variable_and_write_node(node); end # Copy a InstanceVariableOperatorWriteNode node # # source://prism//lib/prism/mutation_compiler.rb#394 def visit_instance_variable_operator_write_node(node); end # Copy a InstanceVariableOrWriteNode node # # source://prism//lib/prism/mutation_compiler.rb#399 def visit_instance_variable_or_write_node(node); end # Copy a InstanceVariableReadNode node # # source://prism//lib/prism/mutation_compiler.rb#404 def visit_instance_variable_read_node(node); end # Copy a InstanceVariableTargetNode node # # source://prism//lib/prism/mutation_compiler.rb#409 def visit_instance_variable_target_node(node); end # Copy a InstanceVariableWriteNode node # # source://prism//lib/prism/mutation_compiler.rb#414 def visit_instance_variable_write_node(node); end # Copy a IntegerNode node # # source://prism//lib/prism/mutation_compiler.rb#419 def visit_integer_node(node); end # Copy a InterpolatedMatchLastLineNode node # # source://prism//lib/prism/mutation_compiler.rb#424 def visit_interpolated_match_last_line_node(node); end # Copy a InterpolatedRegularExpressionNode node # # source://prism//lib/prism/mutation_compiler.rb#429 def visit_interpolated_regular_expression_node(node); end # Copy a InterpolatedStringNode node # # source://prism//lib/prism/mutation_compiler.rb#434 def visit_interpolated_string_node(node); end # Copy a InterpolatedSymbolNode node # # source://prism//lib/prism/mutation_compiler.rb#439 def visit_interpolated_symbol_node(node); end # Copy a InterpolatedXStringNode node # # source://prism//lib/prism/mutation_compiler.rb#444 def visit_interpolated_x_string_node(node); end # Copy a KeywordHashNode node # # source://prism//lib/prism/mutation_compiler.rb#449 def visit_keyword_hash_node(node); end # Copy a KeywordRestParameterNode node # # source://prism//lib/prism/mutation_compiler.rb#454 def visit_keyword_rest_parameter_node(node); end # Copy a LambdaNode node # # source://prism//lib/prism/mutation_compiler.rb#459 def visit_lambda_node(node); end # Copy a LocalVariableAndWriteNode node # # source://prism//lib/prism/mutation_compiler.rb#464 def visit_local_variable_and_write_node(node); end # Copy a LocalVariableOperatorWriteNode node # # source://prism//lib/prism/mutation_compiler.rb#469 def visit_local_variable_operator_write_node(node); end # Copy a LocalVariableOrWriteNode node # # source://prism//lib/prism/mutation_compiler.rb#474 def visit_local_variable_or_write_node(node); end # Copy a LocalVariableReadNode node # # source://prism//lib/prism/mutation_compiler.rb#479 def visit_local_variable_read_node(node); end # Copy a LocalVariableTargetNode node # # source://prism//lib/prism/mutation_compiler.rb#484 def visit_local_variable_target_node(node); end # Copy a LocalVariableWriteNode node # # source://prism//lib/prism/mutation_compiler.rb#489 def visit_local_variable_write_node(node); end # Copy a MatchLastLineNode node # # source://prism//lib/prism/mutation_compiler.rb#494 def visit_match_last_line_node(node); end # Copy a MatchPredicateNode node # # source://prism//lib/prism/mutation_compiler.rb#499 def visit_match_predicate_node(node); end # Copy a MatchRequiredNode node # # source://prism//lib/prism/mutation_compiler.rb#504 def visit_match_required_node(node); end # Copy a MatchWriteNode node # # source://prism//lib/prism/mutation_compiler.rb#509 def visit_match_write_node(node); end # Copy a MissingNode node # # source://prism//lib/prism/mutation_compiler.rb#514 def visit_missing_node(node); end # Copy a ModuleNode node # # source://prism//lib/prism/mutation_compiler.rb#519 def visit_module_node(node); end # Copy a MultiTargetNode node # # source://prism//lib/prism/mutation_compiler.rb#524 def visit_multi_target_node(node); end # Copy a MultiWriteNode node # # source://prism//lib/prism/mutation_compiler.rb#529 def visit_multi_write_node(node); end # Copy a NextNode node # # source://prism//lib/prism/mutation_compiler.rb#534 def visit_next_node(node); end # Copy a NilNode node # # source://prism//lib/prism/mutation_compiler.rb#539 def visit_nil_node(node); end # Copy a NoKeywordsParameterNode node # # source://prism//lib/prism/mutation_compiler.rb#544 def visit_no_keywords_parameter_node(node); end # Copy a NumberedParametersNode node # # source://prism//lib/prism/mutation_compiler.rb#549 def visit_numbered_parameters_node(node); end # Copy a NumberedReferenceReadNode node # # source://prism//lib/prism/mutation_compiler.rb#554 def visit_numbered_reference_read_node(node); end # Copy a OptionalKeywordParameterNode node # # source://prism//lib/prism/mutation_compiler.rb#559 def visit_optional_keyword_parameter_node(node); end # Copy a OptionalParameterNode node # # source://prism//lib/prism/mutation_compiler.rb#564 def visit_optional_parameter_node(node); end # Copy a OrNode node # # source://prism//lib/prism/mutation_compiler.rb#569 def visit_or_node(node); end # Copy a ParametersNode node # # source://prism//lib/prism/mutation_compiler.rb#574 def visit_parameters_node(node); end # Copy a ParenthesesNode node # # source://prism//lib/prism/mutation_compiler.rb#579 def visit_parentheses_node(node); end # Copy a PinnedExpressionNode node # # source://prism//lib/prism/mutation_compiler.rb#584 def visit_pinned_expression_node(node); end # Copy a PinnedVariableNode node # # source://prism//lib/prism/mutation_compiler.rb#589 def visit_pinned_variable_node(node); end # Copy a PostExecutionNode node # # source://prism//lib/prism/mutation_compiler.rb#594 def visit_post_execution_node(node); end # Copy a PreExecutionNode node # # source://prism//lib/prism/mutation_compiler.rb#599 def visit_pre_execution_node(node); end # Copy a ProgramNode node # # source://prism//lib/prism/mutation_compiler.rb#604 def visit_program_node(node); end # Copy a RangeNode node # # source://prism//lib/prism/mutation_compiler.rb#609 def visit_range_node(node); end # Copy a RationalNode node # # source://prism//lib/prism/mutation_compiler.rb#614 def visit_rational_node(node); end # Copy a RedoNode node # # source://prism//lib/prism/mutation_compiler.rb#619 def visit_redo_node(node); end # Copy a RegularExpressionNode node # # source://prism//lib/prism/mutation_compiler.rb#624 def visit_regular_expression_node(node); end # Copy a RequiredKeywordParameterNode node # # source://prism//lib/prism/mutation_compiler.rb#629 def visit_required_keyword_parameter_node(node); end # Copy a RequiredParameterNode node # # source://prism//lib/prism/mutation_compiler.rb#634 def visit_required_parameter_node(node); end # Copy a RescueModifierNode node # # source://prism//lib/prism/mutation_compiler.rb#639 def visit_rescue_modifier_node(node); end # Copy a RescueNode node # # source://prism//lib/prism/mutation_compiler.rb#644 def visit_rescue_node(node); end # Copy a RestParameterNode node # # source://prism//lib/prism/mutation_compiler.rb#649 def visit_rest_parameter_node(node); end # Copy a RetryNode node # # source://prism//lib/prism/mutation_compiler.rb#654 def visit_retry_node(node); end # Copy a ReturnNode node # # source://prism//lib/prism/mutation_compiler.rb#659 def visit_return_node(node); end # Copy a SelfNode node # # source://prism//lib/prism/mutation_compiler.rb#664 def visit_self_node(node); end # Copy a SingletonClassNode node # # source://prism//lib/prism/mutation_compiler.rb#669 def visit_singleton_class_node(node); end # Copy a SourceEncodingNode node # # source://prism//lib/prism/mutation_compiler.rb#674 def visit_source_encoding_node(node); end # Copy a SourceFileNode node # # source://prism//lib/prism/mutation_compiler.rb#679 def visit_source_file_node(node); end # Copy a SourceLineNode node # # source://prism//lib/prism/mutation_compiler.rb#684 def visit_source_line_node(node); end # Copy a SplatNode node # # source://prism//lib/prism/mutation_compiler.rb#689 def visit_splat_node(node); end # Copy a StatementsNode node # # source://prism//lib/prism/mutation_compiler.rb#694 def visit_statements_node(node); end # Copy a StringNode node # # source://prism//lib/prism/mutation_compiler.rb#699 def visit_string_node(node); end # Copy a SuperNode node # # source://prism//lib/prism/mutation_compiler.rb#704 def visit_super_node(node); end # Copy a SymbolNode node # # source://prism//lib/prism/mutation_compiler.rb#709 def visit_symbol_node(node); end # Copy a TrueNode node # # source://prism//lib/prism/mutation_compiler.rb#714 def visit_true_node(node); end # Copy a UndefNode node # # source://prism//lib/prism/mutation_compiler.rb#719 def visit_undef_node(node); end # Copy a UnlessNode node # # source://prism//lib/prism/mutation_compiler.rb#724 def visit_unless_node(node); end # Copy a UntilNode node # # source://prism//lib/prism/mutation_compiler.rb#729 def visit_until_node(node); end # Copy a WhenNode node # # source://prism//lib/prism/mutation_compiler.rb#734 def visit_when_node(node); end # Copy a WhileNode node # # source://prism//lib/prism/mutation_compiler.rb#739 def visit_while_node(node); end # Copy a XStringNode node # # source://prism//lib/prism/mutation_compiler.rb#744 def visit_x_string_node(node); end # Copy a YieldNode node # # source://prism//lib/prism/mutation_compiler.rb#749 def visit_yield_node(node); end end # Represents the use of the `next` keyword. # # next 1 # ^^^^^^ # # source://prism//lib/prism/node.rb#13811 class Prism::NextNode < ::Prism::Node # def initialize: (ArgumentsNode? arguments, Location keyword_loc, Location location) -> void # # @return [NextNode] a new instance of NextNode # # source://prism//lib/prism/node.rb#13812 def initialize(source, arguments, keyword_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#13821 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # # source://prism//lib/prism/node.rb#13861 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#13826 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#13838 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#13831 def compact_child_nodes; end # def copy: (**params) -> NextNode # # source://prism//lib/prism/node.rb#13843 sig { params(params: T.untyped).returns(Prism::NextNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#13826 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { arguments: ArgumentsNode?, keyword_loc: Location, location: Location } # # source://prism//lib/prism/node.rb#13856 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#13876 def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # # source://prism//lib/prism/node.rb#13871 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # # source://prism//lib/prism/node.rb#13864 sig { returns(Prism::Location) } def keyword_loc; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#13902 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#13912 def type; end end end # Represents the use of the `nil` keyword. # # nil # ^^^ # # source://prism//lib/prism/node.rb#13922 class Prism::NilNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [NilNode] a new instance of NilNode # # source://prism//lib/prism/node.rb#13923 def initialize(source, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#13930 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#13935 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#13945 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#13940 def compact_child_nodes; end # def copy: (**params) -> NilNode # # source://prism//lib/prism/node.rb#13950 sig { params(params: T.untyped).returns(Prism::NilNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#13935 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } # # source://prism//lib/prism/node.rb#13961 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#13967 def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#13986 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#13996 def type; end end end # Represents the use of `**nil` inside method arguments. # # def a(**nil) # ^^^^^ # end # # source://prism//lib/prism/node.rb#14007 class Prism::NoKeywordsParameterNode < ::Prism::Node # def initialize: (Location operator_loc, Location keyword_loc, Location location) -> void # # @return [NoKeywordsParameterNode] a new instance of NoKeywordsParameterNode # # source://prism//lib/prism/node.rb#14008 def initialize(source, operator_loc, keyword_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#14017 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#14022 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#14032 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#14027 def compact_child_nodes; end # def copy: (**params) -> NoKeywordsParameterNode # # source://prism//lib/prism/node.rb#14037 sig { params(params: T.untyped).returns(Prism::NoKeywordsParameterNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#14022 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { operator_loc: Location, keyword_loc: Location, location: Location } # # source://prism//lib/prism/node.rb#14050 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#14078 def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # # source://prism//lib/prism/node.rb#14073 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # # source://prism//lib/prism/node.rb#14061 sig { returns(Prism::Location) } def keyword_loc; end # def operator: () -> String # # source://prism//lib/prism/node.rb#14068 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism//lib/prism/node.rb#14055 sig { returns(Prism::Location) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#14099 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#14109 def type; end end end # This represents a node in the tree. It is the parent class of all of the # various node types. # # source://prism//lib/prism/node.rb#11 class Prism::Node # Accepts a visitor and calls back into the specialized visit function. # # @raise [NoMethodError] # # source://prism//lib/prism/node.rb#62 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # Returns an array of child nodes, including `nil`s in the place of optional # nodes that were not present. # # @raise [NoMethodError] # # source://prism//lib/prism/node.rb#68 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # Returns an array of child nodes and locations that could potentially have # comments attached to them. # # @raise [NoMethodError] # # source://prism//lib/prism/node.rb#82 def comment_targets; end # Returns an array of child nodes, excluding any `nil`s in the place of # optional nodes that were not present. # # @raise [NoMethodError] # # source://prism//lib/prism/node.rb#76 sig { returns(T::Array[Prism::Node]) } def compact_child_nodes; end # Returns an array of child nodes, including `nil`s in the place of optional # nodes that were not present. # # @raise [NoMethodError] # # source://prism//lib/prism/node.rb#68 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # A Location instance that represents the location of this node in the # source. # # source://prism//lib/prism/node.rb#18 sig { returns(Prism::Location) } def location; end # @return [Boolean] # # source://prism//lib/prism/node.rb#23 def newline?; end # Similar to inspect, but respects the current level of indentation given by # the pretty print object. # # source://prism//lib/prism/node.rb#42 def pretty_print(q); end # source://prism//lib/prism/node.rb#27 def set_newline_flag(newline_marked); end # Slice the location of the node from the source. # # source://prism//lib/prism/node.rb#36 sig { returns(String) } def slice; end # Convert this node into a graphviz dot graph string. # # source://prism//lib/prism/node.rb#50 sig { returns(String) } def to_dot; end # Returns a symbol symbolizing the type of node that this represents. This # is particularly useful for case statements and array comparisons. # # @raise [NoMethodError] # # source://prism//lib/prism/node.rb#88 sig { returns(Symbol) } def type; end private # A pointer to the source that this node was created from. # # source://prism//lib/prism/node.rb#13 def source; end end # This object is responsible for generating the output for the inspect method # implementations of child nodes. # # source://prism//lib/prism/node_inspector.rb#6 class Prism::NodeInspector # @return [NodeInspector] a new instance of NodeInspector # # source://prism//lib/prism/node_inspector.rb#9 def initialize(prefix = T.unsafe(nil)); end # Appends a line to the output with the current prefix. # # source://prism//lib/prism/node_inspector.rb#15 sig { params(line: String).void } def <<(line); end # Returns a new inspector that can be used to inspect a child node. # # source://prism//lib/prism/node_inspector.rb#59 sig { params(append: String).returns(Prism::NodeInspector) } def child_inspector(append); end # Generates a string that represents a child node. # # source://prism//lib/prism/node_inspector.rb#54 sig { params(node: Prism::Node, append: String).returns(String) } def child_node(node, append); end # This generates a string that is used as the header of the inspect output # for any given node. # # source://prism//lib/prism/node_inspector.rb#21 # This generates a string that is used as the header of the inspect output sig { params(node: Prism::Node).returns(String) } def header(node); end # Generates a string that represents a list of nodes. It handles properly # using the box drawing characters to make the output look nice. # # source://prism//lib/prism/node_inspector.rb#31 # Generates a string that represents a list of nodes. It handles properly sig { params(prefix: String, nodes: T::Array[Prism::Node]).returns(String) } def list(prefix, nodes); end # Generates a string that represents a location field on a node. # # source://prism//lib/prism/node_inspector.rb#45 sig { params(value: Prism::Location).returns(String) } def location(value); end # source://prism//lib/prism/node_inspector.rb#7 sig { returns(String) } def output; end # source://prism//lib/prism/node_inspector.rb#7 sig { returns(String) } def prefix; end # Returns the output as a string. # # source://prism//lib/prism/node_inspector.rb#64 sig { returns(String) } def to_str; end end # Represents an implicit set of parameters through the use of numbered parameters within a block or lambda. # # -> { _1 + _2 } # ^^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#14119 class Prism::NumberedParametersNode < ::Prism::Node # def initialize: (Integer maximum, Location location) -> void # # @return [NumberedParametersNode] a new instance of NumberedParametersNode # # source://prism//lib/prism/node.rb#14120 def initialize(source, maximum, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#14128 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#14133 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#14143 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#14138 def compact_child_nodes; end # def copy: (**params) -> NumberedParametersNode # # source://prism//lib/prism/node.rb#14148 sig { params(params: T.untyped).returns(Prism::NumberedParametersNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#14133 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { maximum: Integer, location: Location } # # source://prism//lib/prism/node.rb#14160 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#14169 def inspect(inspector = T.unsafe(nil)); end # attr_reader maximum: Integer # # source://prism//lib/prism/node.rb#14165 sig { returns(Integer) } def maximum; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#14189 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#14199 def type; end end end # Represents reading a numbered reference to a capture in the previous match. # # $1 # ^^ # # source://prism//lib/prism/node.rb#14209 class Prism::NumberedReferenceReadNode < ::Prism::Node # def initialize: (Integer number, Location location) -> void # # @return [NumberedReferenceReadNode] a new instance of NumberedReferenceReadNode # # source://prism//lib/prism/node.rb#14210 def initialize(source, number, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#14218 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#14223 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#14233 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#14228 def compact_child_nodes; end # def copy: (**params) -> NumberedReferenceReadNode # # source://prism//lib/prism/node.rb#14238 sig { params(params: T.untyped).returns(Prism::NumberedReferenceReadNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#14223 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { number: Integer, location: Location } # # source://prism//lib/prism/node.rb#14250 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#14265 def inspect(inspector = T.unsafe(nil)); end # The (1-indexed, from the left) number of the capture group. Numbered references that would overflow a `uint32` result in a `number` of exactly `2**32 - 1`. # # $1 # number `1` # # $5432 # number `5432` # # $4294967296 # number `4294967295` # # source://prism//lib/prism/node.rb#14261 sig { returns(Integer) } def number; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#14285 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#14295 def type; end end end # Represents an optional keyword parameter to a method, block, or lambda definition. # # def a(b: 1) # ^^^^ # end # # source://prism//lib/prism/node.rb#14306 class Prism::OptionalKeywordParameterNode < ::Prism::Node # def initialize: (Integer flags, Symbol name, Location name_loc, Node value, Location location) -> void # # @return [OptionalKeywordParameterNode] a new instance of OptionalKeywordParameterNode # # source://prism//lib/prism/node.rb#14307 def initialize(source, flags, name, name_loc, value, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#14318 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#14323 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#14333 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#14328 def compact_child_nodes; end # def copy: (**params) -> OptionalKeywordParameterNode # # source://prism//lib/prism/node.rb#14338 sig { params(params: T.untyped).returns(Prism::OptionalKeywordParameterNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#14323 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, name_loc: Location, value: Node, location: Location } # # source://prism//lib/prism/node.rb#14353 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#14380 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # # source://prism//lib/prism/node.rb#14362 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # # source://prism//lib/prism/node.rb#14365 sig { returns(Prism::Location) } def name_loc; end # def repeated_parameter?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#14375 sig { returns(T::Boolean) } def repeated_parameter?; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#14405 def type; end # attr_reader value: Node # # source://prism//lib/prism/node.rb#14371 sig { returns(Prism::Node) } def value; end private # private attr_reader flags: Integer # # source://prism//lib/prism/node.rb#14358 sig { returns(Integer) } def flags; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#14415 def type; end end end # Represents an optional parameter to a method, block, or lambda definition. # # def a(b = 1) # ^^^^^ # end # # source://prism//lib/prism/node.rb#14426 class Prism::OptionalParameterNode < ::Prism::Node # def initialize: (Integer flags, Symbol name, Location name_loc, Location operator_loc, Node value, Location location) -> void # # @return [OptionalParameterNode] a new instance of OptionalParameterNode # # source://prism//lib/prism/node.rb#14427 def initialize(source, flags, name, name_loc, operator_loc, value, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#14439 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#14444 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#14454 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#14449 def compact_child_nodes; end # def copy: (**params) -> OptionalParameterNode # # source://prism//lib/prism/node.rb#14459 sig { params(params: T.untyped).returns(Prism::OptionalParameterNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#14444 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location } # # source://prism//lib/prism/node.rb#14475 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#14513 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # # source://prism//lib/prism/node.rb#14484 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # # source://prism//lib/prism/node.rb#14487 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # # source://prism//lib/prism/node.rb#14508 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism//lib/prism/node.rb#14493 sig { returns(Prism::Location) } def operator_loc; end # def repeated_parameter?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#14503 sig { returns(T::Boolean) } def repeated_parameter?; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#14539 def type; end # attr_reader value: Node # # source://prism//lib/prism/node.rb#14499 sig { returns(Prism::Node) } def value; end private # private attr_reader flags: Integer # # source://prism//lib/prism/node.rb#14480 sig { returns(Integer) } def flags; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#14549 def type; end end end # Represents the use of the `||` operator or the `or` keyword. # # left or right # ^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#14559 class Prism::OrNode < ::Prism::Node # def initialize: (Node left, Node right, Location operator_loc, Location location) -> void # # @return [OrNode] a new instance of OrNode # # source://prism//lib/prism/node.rb#14560 def initialize(source, left, right, operator_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#14570 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#14575 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#14585 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#14580 def compact_child_nodes; end # def copy: (**params) -> OrNode # # source://prism//lib/prism/node.rb#14590 sig { params(params: T.untyped).returns(Prism::OrNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#14575 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { left: Node, right: Node, operator_loc: Location, location: Location } # # source://prism//lib/prism/node.rb#14604 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#14642 def inspect(inspector = T.unsafe(nil)); end # Represents the left side of the expression. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). # # left or right # ^^^^ # # 1 || 2 # ^ # # source://prism//lib/prism/node.rb#14615 sig { returns(Prism::Node) } def left; end # def operator: () -> String # # source://prism//lib/prism/node.rb#14637 sig { returns(String) } def operator; end # The location of the `or` keyword or the `||` operator. # # left or right # ^^ # # source://prism//lib/prism/node.rb#14630 sig { returns(Prism::Location) } def operator_loc; end # Represents the right side of the expression. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). # # left || right # ^^^^^ # # 1 or 2 # ^ # # source://prism//lib/prism/node.rb#14624 sig { returns(Prism::Node) } def right; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#14666 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#14676 def type; end end end # A parser for the pack template language. # # source://prism//lib/prism/pack.rb#5 module Prism::Pack class << self def parse(_arg0, _arg1, _arg2); end end end # source://prism//lib/prism/pack.rb#55 Prism::Pack::AGNOSTIC_ENDIAN = T.let(T.unsafe(nil), Symbol) # source://prism//lib/prism/pack.rb#55 Prism::Pack::BACK = T.let(T.unsafe(nil), Symbol) # source://prism//lib/prism/pack.rb#55 Prism::Pack::BER = T.let(T.unsafe(nil), Symbol) # source://prism//lib/prism/pack.rb#55 Prism::Pack::BIG_ENDIAN = T.let(T.unsafe(nil), Symbol) # source://prism//lib/prism/pack.rb#55 Prism::Pack::COMMENT = T.let(T.unsafe(nil), Symbol) # A directive in the pack template language. # # source://prism//lib/prism/pack.rb#59 class Prism::Pack::Directive # Initialize a new directive with the given values. # # @return [Directive] a new instance of Directive # # source://prism//lib/prism/pack.rb#88 def initialize(version, variant, source, type, signed, endian, size, length_type, length); end # Provide a human-readable description of the directive. # # source://prism//lib/prism/pack.rb#130 def describe; end # The type of endianness of the directive. # # source://prism//lib/prism/pack.rb#76 def endian; end # The length of this directive (used for integers). # # source://prism//lib/prism/pack.rb#85 def length; end # The length type of this directive (used for integers). # # source://prism//lib/prism/pack.rb#82 def length_type; end # The type of signedness of the directive. # # source://prism//lib/prism/pack.rb#73 def signed; end # The size of the directive. # # source://prism//lib/prism/pack.rb#79 def size; end # A byteslice of the source string that this directive represents. # # source://prism//lib/prism/pack.rb#67 def source; end # The type of the directive. # # source://prism//lib/prism/pack.rb#70 def type; end # A symbol representing whether or not we are packing or unpacking. # # source://prism//lib/prism/pack.rb#64 def variant; end # A symbol representing the version of Ruby. # # source://prism//lib/prism/pack.rb#61 def version; end end # The descriptions of the various types of endianness. # # source://prism//lib/prism/pack.rb#101 Prism::Pack::Directive::ENDIAN_DESCRIPTIONS = T.let(T.unsafe(nil), Hash) # The descriptions of the various types of signedness. # # source://prism//lib/prism/pack.rb#110 Prism::Pack::Directive::SIGNED_DESCRIPTIONS = T.let(T.unsafe(nil), Hash) # The descriptions of the various types of sizes. # # source://prism//lib/prism/pack.rb#117 Prism::Pack::Directive::SIZE_DESCRIPTIONS = T.let(T.unsafe(nil), Hash) # source://prism//lib/prism/pack.rb#55 Prism::Pack::ENDIAN_NA = T.let(T.unsafe(nil), Symbol) # source://prism//lib/prism/pack.rb#55 Prism::Pack::FLOAT = T.let(T.unsafe(nil), Symbol) # The result of parsing a pack template. # # source://prism//lib/prism/pack.rb#195 class Prism::Pack::Format # Create a new Format with the given directives and encoding. # # @return [Format] a new instance of Format # # source://prism//lib/prism/pack.rb#203 def initialize(directives, encoding); end # Provide a human-readable description of the format. # # source://prism//lib/prism/pack.rb#209 def describe; end # A list of the directives in the template. # # source://prism//lib/prism/pack.rb#197 def directives; end # The encoding of the template. # # source://prism//lib/prism/pack.rb#200 def encoding; end end # source://prism//lib/prism/pack.rb#55 Prism::Pack::INTEGER = T.let(T.unsafe(nil), Symbol) # source://prism//lib/prism/pack.rb#55 Prism::Pack::LENGTH_FIXED = T.let(T.unsafe(nil), Symbol) # source://prism//lib/prism/pack.rb#55 Prism::Pack::LENGTH_MAX = T.let(T.unsafe(nil), Symbol) # source://prism//lib/prism/pack.rb#55 Prism::Pack::LENGTH_NA = T.let(T.unsafe(nil), Symbol) # source://prism//lib/prism/pack.rb#55 Prism::Pack::LENGTH_RELATIVE = T.let(T.unsafe(nil), Symbol) # source://prism//lib/prism/pack.rb#55 Prism::Pack::LITTLE_ENDIAN = T.let(T.unsafe(nil), Symbol) # source://prism//lib/prism/pack.rb#55 Prism::Pack::MOVE = T.let(T.unsafe(nil), Symbol) # source://prism//lib/prism/pack.rb#55 Prism::Pack::NATIVE_ENDIAN = T.let(T.unsafe(nil), Symbol) # source://prism//lib/prism/pack.rb#55 Prism::Pack::NULL = T.let(T.unsafe(nil), Symbol) # source://prism//lib/prism/pack.rb#55 Prism::Pack::SIGNED = T.let(T.unsafe(nil), Symbol) # source://prism//lib/prism/pack.rb#55 Prism::Pack::SIGNED_NA = T.let(T.unsafe(nil), Symbol) # source://prism//lib/prism/pack.rb#55 Prism::Pack::SIZE_16 = T.let(T.unsafe(nil), Symbol) # source://prism//lib/prism/pack.rb#55 Prism::Pack::SIZE_32 = T.let(T.unsafe(nil), Symbol) # source://prism//lib/prism/pack.rb#55 Prism::Pack::SIZE_64 = T.let(T.unsafe(nil), Symbol) # source://prism//lib/prism/pack.rb#55 Prism::Pack::SIZE_8 = T.let(T.unsafe(nil), Symbol) # source://prism//lib/prism/pack.rb#55 Prism::Pack::SIZE_INT = T.let(T.unsafe(nil), Symbol) # source://prism//lib/prism/pack.rb#55 Prism::Pack::SIZE_LONG = T.let(T.unsafe(nil), Symbol) # source://prism//lib/prism/pack.rb#55 Prism::Pack::SIZE_LONG_LONG = T.let(T.unsafe(nil), Symbol) # source://prism//lib/prism/pack.rb#55 Prism::Pack::SIZE_NA = T.let(T.unsafe(nil), Symbol) # source://prism//lib/prism/pack.rb#55 Prism::Pack::SIZE_P = T.let(T.unsafe(nil), Symbol) # source://prism//lib/prism/pack.rb#55 Prism::Pack::SIZE_SHORT = T.let(T.unsafe(nil), Symbol) # source://prism//lib/prism/pack.rb#55 Prism::Pack::SPACE = T.let(T.unsafe(nil), Symbol) # source://prism//lib/prism/pack.rb#55 Prism::Pack::STRING_BASE64 = T.let(T.unsafe(nil), Symbol) # source://prism//lib/prism/pack.rb#55 Prism::Pack::STRING_FIXED = T.let(T.unsafe(nil), Symbol) # source://prism//lib/prism/pack.rb#55 Prism::Pack::STRING_HEX_HIGH = T.let(T.unsafe(nil), Symbol) # source://prism//lib/prism/pack.rb#55 Prism::Pack::STRING_HEX_LOW = T.let(T.unsafe(nil), Symbol) # source://prism//lib/prism/pack.rb#55 Prism::Pack::STRING_LSB = T.let(T.unsafe(nil), Symbol) # source://prism//lib/prism/pack.rb#55 Prism::Pack::STRING_MIME = T.let(T.unsafe(nil), Symbol) # source://prism//lib/prism/pack.rb#55 Prism::Pack::STRING_MSB = T.let(T.unsafe(nil), Symbol) # source://prism//lib/prism/pack.rb#55 Prism::Pack::STRING_NULL_PADDED = T.let(T.unsafe(nil), Symbol) # source://prism//lib/prism/pack.rb#55 Prism::Pack::STRING_NULL_TERMINATED = T.let(T.unsafe(nil), Symbol) # source://prism//lib/prism/pack.rb#55 Prism::Pack::STRING_POINTER = T.let(T.unsafe(nil), Symbol) # source://prism//lib/prism/pack.rb#55 Prism::Pack::STRING_SPACE_PADDED = T.let(T.unsafe(nil), Symbol) # source://prism//lib/prism/pack.rb#55 Prism::Pack::STRING_UU = T.let(T.unsafe(nil), Symbol) # source://prism//lib/prism/pack.rb#55 Prism::Pack::UNSIGNED = T.let(T.unsafe(nil), Symbol) # source://prism//lib/prism/pack.rb#55 Prism::Pack::UTF8 = T.let(T.unsafe(nil), Symbol) # Flags for parameter nodes. # # source://prism//lib/prism/node.rb#19304 module Prism::ParameterFlags; end # a parameter name that has been repeated in the method signature # # source://prism//lib/prism/node.rb#19306 Prism::ParameterFlags::REPEATED_PARAMETER = T.let(T.unsafe(nil), Integer) # Represents the list of parameters on a method, block, or lambda definition. # # def a(b, c, d) # ^^^^^^^ # end # # source://prism//lib/prism/node.rb#14687 class Prism::ParametersNode < ::Prism::Node # def initialize: (Array[Node] requireds, Array[Node] optionals, Node? rest, Array[Node] posts, Array[Node] keywords, Node? keyword_rest, BlockParameterNode? block, Location location) -> void # # @return [ParametersNode] a new instance of ParametersNode # # source://prism//lib/prism/node.rb#14688 def initialize(source, requireds, optionals, rest, posts, keywords, keyword_rest, block, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#14702 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # attr_reader block: BlockParameterNode? # # source://prism//lib/prism/node.rb#14771 sig { returns(T.nilable(Prism::BlockParameterNode)) } def block; end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#14707 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#14725 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#14712 def compact_child_nodes; end # def copy: (**params) -> ParametersNode # # source://prism//lib/prism/node.rb#14730 sig { params(params: T.untyped).returns(Prism::ParametersNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#14707 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { requireds: Array[Node], optionals: Array[Node], rest: Node?, posts: Array[Node], keywords: Array[Node], keyword_rest: Node?, block: BlockParameterNode?, location: Location } # # source://prism//lib/prism/node.rb#14748 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#14775 def inspect(inspector = T.unsafe(nil)); end # attr_reader keyword_rest: Node? # # source://prism//lib/prism/node.rb#14768 sig { returns(T.nilable(Prism::Node)) } def keyword_rest; end # attr_reader keywords: Array[Node] # # source://prism//lib/prism/node.rb#14765 sig { returns(T::Array[Prism::Node]) } def keywords; end # attr_reader optionals: Array[Node] # # source://prism//lib/prism/node.rb#14756 sig { returns(T::Array[Prism::Node]) } def optionals; end # attr_reader posts: Array[Node] # # source://prism//lib/prism/node.rb#14762 sig { returns(T::Array[Prism::Node]) } def posts; end # attr_reader requireds: Array[Node] # # source://prism//lib/prism/node.rb#14753 sig { returns(T::Array[Prism::Node]) } def requireds; end # attr_reader rest: Node? # # source://prism//lib/prism/node.rb#14759 sig { returns(T.nilable(Prism::Node)) } def rest; end # Mirrors the Method#parameters method. # # source://prism//lib/prism/node_ext.rb#172 def signature; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#14816 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#14826 def type; end end end # Represents a parenthesized expression # # (10 + 34) # ^^^^^^^^^ # # source://prism//lib/prism/node.rb#14836 class Prism::ParenthesesNode < ::Prism::Node # def initialize: (Node? body, Location opening_loc, Location closing_loc, Location location) -> void # # @return [ParenthesesNode] a new instance of ParenthesesNode # # source://prism//lib/prism/node.rb#14837 def initialize(source, body, opening_loc, closing_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#14847 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # attr_reader body: Node? # # source://prism//lib/prism/node.rb#14892 sig { returns(T.nilable(Prism::Node)) } def body; end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#14856 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # # source://prism//lib/prism/node.rb#14913 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # # source://prism//lib/prism/node.rb#14901 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#14868 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#14861 def compact_child_nodes; end # def copy: (**params) -> ParenthesesNode # # source://prism//lib/prism/node.rb#14873 sig { params(params: T.untyped).returns(Prism::ParenthesesNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#14856 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { body: Node?, opening_loc: Location, closing_loc: Location, location: Location } # # source://prism//lib/prism/node.rb#14887 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#14918 def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String # # source://prism//lib/prism/node.rb#14908 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # # source://prism//lib/prism/node.rb#14895 sig { returns(Prism::Location) } def opening_loc; end # source://prism//lib/prism/node.rb#14851 def set_newline_flag(newline_marked); end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#14945 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#14955 def type; end end end # This represents an error that was encountered during parsing. # # source://prism//lib/prism/parse_result.rb#338 class Prism::ParseError # Create a new error object with the given message and location. # # @return [ParseError] a new instance of ParseError # # source://prism//lib/prism/parse_result.rb#349 def initialize(message, location, level); end # Implement the hash pattern matching interface for ParseError. # # source://prism//lib/prism/parse_result.rb#356 def deconstruct_keys(keys); end # Returns a string representation of this error. # # source://prism//lib/prism/parse_result.rb#361 def inspect; end # The level of this error. # # source://prism//lib/prism/parse_result.rb#346 def level; end # A Location object representing the location of this error in the source. # # source://prism//lib/prism/parse_result.rb#343 sig { returns(Prism::Location) } def location; end # The message associated with this error. # # source://prism//lib/prism/parse_result.rb#340 sig { returns(String) } def message; end end # This represents the result of a call to ::parse or ::parse_file. It contains # the AST, any comments that were encounters, and any errors that were # encountered. # # source://prism//lib/prism/parse_result.rb#398 class Prism::ParseResult # Create a new parse result object with the given values. # # @return [ParseResult] a new instance of ParseResult # # source://prism//lib/prism/parse_result.rb#425 def initialize(value, comments, magic_comments, data_loc, errors, warnings, source); end # Attach the list of comments to their respective locations in the tree. # # source://prism//lib/prism/parse_result/comments.rb#173 def attach_comments!; end # The list of comments that were encountered during parsing. # # source://prism//lib/prism/parse_result.rb#405 sig { returns(T::Array[Prism::Comment]) } def comments; end # An optional location that represents the location of the __END__ marker # and the rest of the content of the file. This content is loaded into the # DATA constant when the file being parsed is the main file being executed. # # source://prism//lib/prism/parse_result.rb#413 def data_loc; end # Implement the hash pattern matching interface for ParseResult. # # source://prism//lib/prism/parse_result.rb#436 def deconstruct_keys(keys); end # The list of errors that were generated during parsing. # # source://prism//lib/prism/parse_result.rb#416 sig { returns(T::Array[Prism::ParseError]) } def errors; end # Returns true if there were errors during parsing and false if there were # not. # # @return [Boolean] # # source://prism//lib/prism/parse_result.rb#448 def failure?; end # The list of magic comments that were encountered during parsing. # # source://prism//lib/prism/parse_result.rb#408 def magic_comments; end # Walk the tree and mark nodes that are on a new line. # # source://prism//lib/prism/parse_result/newlines.rb#60 def mark_newlines!; end # A Source instance that represents the source code that was parsed. # # source://prism//lib/prism/parse_result.rb#422 sig { returns(Prism::Source) } def source; end # Returns true if there were no errors during parsing and false if there # were. # # @return [Boolean] # # source://prism//lib/prism/parse_result.rb#442 def success?; end # The value that was generated by parsing. Normally this holds the AST, but # it can sometimes how a list of tokens or other results passed back from # the parser. # # source://prism//lib/prism/parse_result.rb#402 sig { returns(Prism::ProgramNode) } def value; end # The list of warnings that were generated during parsing. # # source://prism//lib/prism/parse_result.rb#419 sig { returns(T::Array[Prism::ParseWarning]) } def warnings; end end # When we've parsed the source, we have both the syntax tree and the list of # comments that we found in the source. This class is responsible for # walking the tree and finding the nearest location to attach each comment. # # It does this by first finding the nearest locations to each comment. # Locations can either come from nodes directly or from location fields on # nodes. For example, a `ClassNode` has an overall location encompassing the # entire class, but it also has a location for the `class` keyword. # # Once the nearest locations are found, it determines which one to attach # to. If it's a trailing comment (a comment on the same line as other source # code), it will favor attaching to the nearest location that occurs before # the comment. Otherwise it will favor attaching to the nearest location # that is after the comment. # # source://prism//lib/prism/parse_result/comments.rb#19 class Prism::ParseResult::Comments # Create a new Comments object that will attach comments to the given # parse result. # # @return [Comments] a new instance of Comments # # source://prism//lib/prism/parse_result/comments.rb#78 def initialize(parse_result); end # Attach the comments to their respective locations in the tree by # mutating the parse result. # # source://prism//lib/prism/parse_result/comments.rb#84 def attach!; end # The parse result that we are attaching comments to. # # source://prism//lib/prism/parse_result/comments.rb#74 def parse_result; end private # Responsible for finding the nearest targets to the given comment within # the context of the given encapsulating node. # # source://prism//lib/prism/parse_result/comments.rb#103 def nearest_targets(node, comment); end end # A target for attaching comments that is based on a location field on a # node. For example, the `end` token of a ClassNode. # # source://prism//lib/prism/parse_result/comments.rb#49 class Prism::ParseResult::Comments::LocationTarget # @return [LocationTarget] a new instance of LocationTarget # # source://prism//lib/prism/parse_result/comments.rb#52 def initialize(location); end # source://prism//lib/prism/parse_result/comments.rb#68 def <<(comment); end # @return [Boolean] # # source://prism//lib/prism/parse_result/comments.rb#64 def encloses?(comment); end # source://prism//lib/prism/parse_result/comments.rb#60 def end_offset; end # source://prism//lib/prism/parse_result/comments.rb#50 def location; end # source://prism//lib/prism/parse_result/comments.rb#56 def start_offset; end end # A target for attaching comments that is based on a specific node's # location. # # source://prism//lib/prism/parse_result/comments.rb#22 class Prism::ParseResult::Comments::NodeTarget # @return [NodeTarget] a new instance of NodeTarget # # source://prism//lib/prism/parse_result/comments.rb#25 def initialize(node); end # source://prism//lib/prism/parse_result/comments.rb#42 def <<(comment); end # @return [Boolean] # # source://prism//lib/prism/parse_result/comments.rb#37 def encloses?(comment); end # source://prism//lib/prism/parse_result/comments.rb#33 def end_offset; end # source://prism//lib/prism/parse_result/comments.rb#23 def node; end # source://prism//lib/prism/parse_result/comments.rb#29 def start_offset; end end # The :line tracepoint event gets fired whenever the Ruby VM encounters an # expression on a new line. The types of expressions that can trigger this # event are: # # * if statements # * unless statements # * nodes that are children of statements lists # # In order to keep track of the newlines, we have a list of offsets that # come back from the parser. We assign these offsets to the first nodes that # we find in the tree that are on those lines. # # Note that the logic in this file should be kept in sync with the Java # MarkNewlinesVisitor, since that visitor is responsible for marking the # newlines for JRuby/TruffleRuby. # # source://prism//lib/prism/parse_result/newlines.rb#21 class Prism::ParseResult::Newlines < ::Prism::Visitor # Create a new Newlines visitor with the given newline offsets. # # @return [Newlines] a new instance of Newlines # # source://prism//lib/prism/parse_result/newlines.rb#22 def initialize(newline_marked); end # Permit block/lambda nodes to mark newlines within themselves. # # source://prism//lib/prism/parse_result/newlines.rb#27 def visit_block_node(node); end # Mark if/unless nodes as newlines. # # source://prism//lib/prism/parse_result/newlines.rb#41 def visit_if_node(node); end # Permit block/lambda nodes to mark newlines within themselves. # # source://prism//lib/prism/parse_result/newlines.rb#27 def visit_lambda_node(node); end # Permit statements lists to mark newlines within themselves. # # source://prism//lib/prism/parse_result/newlines.rb#49 def visit_statements_node(node); end # Mark if/unless nodes as newlines. # # source://prism//lib/prism/parse_result/newlines.rb#41 def visit_unless_node(node); end end # This represents a warning that was encountered during parsing. # # source://prism//lib/prism/parse_result.rb#367 class Prism::ParseWarning # Create a new warning object with the given message and location. # # @return [ParseWarning] a new instance of ParseWarning # # source://prism//lib/prism/parse_result.rb#378 def initialize(message, location, level); end # Implement the hash pattern matching interface for ParseWarning. # # source://prism//lib/prism/parse_result.rb#385 def deconstruct_keys(keys); end # Returns a string representation of this warning. # # source://prism//lib/prism/parse_result.rb#390 def inspect; end # The level of this warning. # # source://prism//lib/prism/parse_result.rb#375 def level; end # A Location object representing the location of this warning in the source. # # source://prism//lib/prism/parse_result.rb#372 sig { returns(Prism::Location) } def location; end # The message associated with this warning. # # source://prism//lib/prism/parse_result.rb#369 sig { returns(String) } def message; end end # A pattern is an object that wraps a Ruby pattern matching expression. The # expression would normally be passed to an `in` clause within a `case` # expression or a rightward assignment expression. For example, in the # following snippet: # # case node # in ConstantPathNode[ConstantReadNode[name: :Prism], ConstantReadNode[name: :Pattern]] # end # # the pattern is the ConstantPathNode[...] expression. # # The pattern gets compiled into an object that responds to #call by running # the #compile method. This method itself will run back through Prism to # parse the expression into a tree, then walk the tree to generate the # necessary callable objects. For example, if you wanted to compile the # expression above into a callable, you would: # # callable = Prism::Pattern.new("ConstantPathNode[ConstantReadNode[name: :Prism], ConstantReadNode[name: :Pattern]]").compile # callable.call(node) # # The callable object returned by #compile is guaranteed to respond to #call # with a single argument, which is the node to match against. It also is # guaranteed to respond to #===, which means it itself can be used in a `case` # expression, as in: # # case node # when callable # end # # If the query given to the initializer cannot be compiled into a valid # matcher (either because of a syntax error or because it is using syntax we # do not yet support) then a Prism::Pattern::CompilationError will be # raised. # # source://prism//lib/prism/pattern.rb#37 class Prism::Pattern # Create a new pattern with the given query. The query should be a string # containing a Ruby pattern matching expression. # # @return [Pattern] a new instance of Pattern # # source://prism//lib/prism/pattern.rb#63 def initialize(query); end # Compile the query into a callable object that can be used to match against # nodes. # # source://prism//lib/prism/pattern.rb#70 def compile; end # The query that this pattern was initialized with. # # source://prism//lib/prism/pattern.rb#59 def query; end # Scan the given node and all of its children for nodes that match the # pattern. If a block is given, it will be called with each node that # matches the pattern. If no block is given, an enumerator will be returned # that will yield each node that matches the pattern. # # source://prism//lib/prism/pattern.rb#79 def scan(root); end private # Shortcut for combining two procs into one that returns true if both return # true. # # source://prism//lib/prism/pattern.rb#95 def combine_and(left, right); end # Shortcut for combining two procs into one that returns true if either # returns true. # # source://prism//lib/prism/pattern.rb#101 def combine_or(left, right); end # in foo | bar # # source://prism//lib/prism/pattern.rb#136 def compile_alternation_pattern_node(node); end # in [foo, bar, baz] # # source://prism//lib/prism/pattern.rb#111 def compile_array_pattern_node(node); end # in Prism::ConstantReadNode # # source://prism//lib/prism/pattern.rb#141 def compile_constant_path_node(node); end # in ConstantReadNode # in String # # source://prism//lib/prism/pattern.rb#153 def compile_constant_read_node(node); end # Raise an error because the given node is not supported. # # @raise [CompilationError] # # source://prism//lib/prism/pattern.rb#106 def compile_error(node); end # in InstanceVariableReadNode[name: Symbol] # in { name: Symbol } # # source://prism//lib/prism/pattern.rb#171 def compile_hash_pattern_node(node); end # in nil # # source://prism//lib/prism/pattern.rb#196 def compile_nil_node(node); end # Compile any kind of node. Dispatch out to the individual compilation # methods based on the type of node. # # source://prism//lib/prism/pattern.rb#225 def compile_node(node); end # in /foo/ # # source://prism//lib/prism/pattern.rb#201 def compile_regular_expression_node(node); end # in "" # in "foo" # # source://prism//lib/prism/pattern.rb#209 def compile_string_node(node); end # in :+ # in :foo # # source://prism//lib/prism/pattern.rb#217 def compile_symbol_node(node); end end # Raised when the query given to a pattern is either invalid Ruby syntax or # is using syntax that we don't yet support. # # source://prism//lib/prism/pattern.rb#42 class Prism::Pattern::CompilationError < ::StandardError # Create a new CompilationError with the given representation of the node # that caused the error. # # @return [CompilationError] a new instance of CompilationError # # source://prism//lib/prism/pattern.rb#43 def initialize(repr); end end # Represents the use of the `^` operator for pinning an expression in a pattern matching expression. # # foo in ^(bar) # ^^^^^^ # # source://prism//lib/prism/node.rb#14965 class Prism::PinnedExpressionNode < ::Prism::Node # def initialize: (Node expression, Location operator_loc, Location lparen_loc, Location rparen_loc, Location location) -> void # # @return [PinnedExpressionNode] a new instance of PinnedExpressionNode # # source://prism//lib/prism/node.rb#14966 def initialize(source, expression, operator_loc, lparen_loc, rparen_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#14977 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#14982 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#14992 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#14987 def compact_child_nodes; end # def copy: (**params) -> PinnedExpressionNode # # source://prism//lib/prism/node.rb#14997 sig { params(params: T.untyped).returns(Prism::PinnedExpressionNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#14982 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { expression: Node, operator_loc: Location, lparen_loc: Location, rparen_loc: Location, location: Location } # # source://prism//lib/prism/node.rb#15012 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # attr_reader expression: Node # # source://prism//lib/prism/node.rb#15017 sig { returns(Prism::Node) } def expression; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#15054 def inspect(inspector = T.unsafe(nil)); end # def lparen: () -> String # # source://prism//lib/prism/node.rb#15044 sig { returns(String) } def lparen; end # attr_reader lparen_loc: Location # # source://prism//lib/prism/node.rb#15026 sig { returns(Prism::Location) } def lparen_loc; end # def operator: () -> String # # source://prism//lib/prism/node.rb#15039 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism//lib/prism/node.rb#15020 sig { returns(Prism::Location) } def operator_loc; end # def rparen: () -> String # # source://prism//lib/prism/node.rb#15049 sig { returns(String) } def rparen; end # attr_reader rparen_loc: Location # # source://prism//lib/prism/node.rb#15032 sig { returns(Prism::Location) } def rparen_loc; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#15078 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#15088 def type; end end end # Represents the use of the `^` operator for pinning a variable in a pattern matching expression. # # foo in ^bar # ^^^^ # # source://prism//lib/prism/node.rb#15098 class Prism::PinnedVariableNode < ::Prism::Node # def initialize: (Node variable, Location operator_loc, Location location) -> void # # @return [PinnedVariableNode] a new instance of PinnedVariableNode # # source://prism//lib/prism/node.rb#15099 def initialize(source, variable, operator_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#15108 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#15113 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#15123 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#15118 def compact_child_nodes; end # def copy: (**params) -> PinnedVariableNode # # source://prism//lib/prism/node.rb#15128 sig { params(params: T.untyped).returns(Prism::PinnedVariableNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#15113 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { variable: Node, operator_loc: Location, location: Location } # # source://prism//lib/prism/node.rb#15141 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#15161 def inspect(inspector = T.unsafe(nil)); end # def operator: () -> String # # source://prism//lib/prism/node.rb#15156 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism//lib/prism/node.rb#15149 sig { returns(Prism::Location) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#15183 def type; end # attr_reader variable: Node # # source://prism//lib/prism/node.rb#15146 sig { returns(Prism::Node) } def variable; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#15193 def type; end end end # Represents the use of the `END` keyword. # # END { foo } # ^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#15203 class Prism::PostExecutionNode < ::Prism::Node # def initialize: (StatementsNode? statements, Location keyword_loc, Location opening_loc, Location closing_loc, Location location) -> void # # @return [PostExecutionNode] a new instance of PostExecutionNode # # source://prism//lib/prism/node.rb#15204 def initialize(source, statements, keyword_loc, opening_loc, closing_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#15215 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#15220 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # # source://prism//lib/prism/node.rb#15289 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # # source://prism//lib/prism/node.rb#15272 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#15232 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#15225 def compact_child_nodes; end # def copy: (**params) -> PostExecutionNode # # source://prism//lib/prism/node.rb#15237 sig { params(params: T.untyped).returns(Prism::PostExecutionNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#15220 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location, location: Location } # # source://prism//lib/prism/node.rb#15252 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#15294 def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # # source://prism//lib/prism/node.rb#15279 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # # source://prism//lib/prism/node.rb#15260 sig { returns(Prism::Location) } def keyword_loc; end # def opening: () -> String # # source://prism//lib/prism/node.rb#15284 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # # source://prism//lib/prism/node.rb#15266 sig { returns(Prism::Location) } def opening_loc; end # attr_reader statements: StatementsNode? # # source://prism//lib/prism/node.rb#15257 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#15322 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#15332 def type; end end end # Represents the use of the `BEGIN` keyword. # # BEGIN { foo } # ^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#15342 class Prism::PreExecutionNode < ::Prism::Node # def initialize: (StatementsNode? statements, Location keyword_loc, Location opening_loc, Location closing_loc, Location location) -> void # # @return [PreExecutionNode] a new instance of PreExecutionNode # # source://prism//lib/prism/node.rb#15343 def initialize(source, statements, keyword_loc, opening_loc, closing_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#15354 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#15359 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # # source://prism//lib/prism/node.rb#15428 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # # source://prism//lib/prism/node.rb#15411 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#15371 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#15364 def compact_child_nodes; end # def copy: (**params) -> PreExecutionNode # # source://prism//lib/prism/node.rb#15376 sig { params(params: T.untyped).returns(Prism::PreExecutionNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#15359 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location, location: Location } # # source://prism//lib/prism/node.rb#15391 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#15433 def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # # source://prism//lib/prism/node.rb#15418 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # # source://prism//lib/prism/node.rb#15399 sig { returns(Prism::Location) } def keyword_loc; end # def opening: () -> String # # source://prism//lib/prism/node.rb#15423 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # # source://prism//lib/prism/node.rb#15405 sig { returns(Prism::Location) } def opening_loc; end # attr_reader statements: StatementsNode? # # source://prism//lib/prism/node.rb#15396 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#15461 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#15471 def type; end end end # The top level node of any parse tree. # # source://prism//lib/prism/node.rb#15478 class Prism::ProgramNode < ::Prism::Node # def initialize: (Array[Symbol] locals, StatementsNode statements, Location location) -> void # # @return [ProgramNode] a new instance of ProgramNode # # source://prism//lib/prism/node.rb#15479 def initialize(source, locals, statements, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#15488 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#15493 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#15503 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#15498 def compact_child_nodes; end # def copy: (**params) -> ProgramNode # # source://prism//lib/prism/node.rb#15508 sig { params(params: T.untyped).returns(Prism::ProgramNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#15493 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], statements: StatementsNode, location: Location } # # source://prism//lib/prism/node.rb#15521 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#15533 def inspect(inspector = T.unsafe(nil)); end # attr_reader locals: Array[Symbol] # # source://prism//lib/prism/node.rb#15526 sig { returns(T::Array[Symbol]) } def locals; end # attr_reader statements: StatementsNode # # source://prism//lib/prism/node.rb#15529 sig { returns(Prism::StatementsNode) } def statements; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#15555 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#15565 def type; end end end # Flags for range and flip-flop nodes. # # source://prism//lib/prism/node.rb#19310 module Prism::RangeFlags; end # ... operator # # source://prism//lib/prism/node.rb#19312 Prism::RangeFlags::EXCLUDE_END = T.let(T.unsafe(nil), Integer) # Represents the use of the `..` or `...` operators. # # 1..2 # ^^^^ # # c if a =~ /left/ ... b =~ /right/ # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#15578 class Prism::RangeNode < ::Prism::Node # def initialize: (Integer flags, Node? left, Node? right, Location operator_loc, Location location) -> void # # @return [RangeNode] a new instance of RangeNode # # source://prism//lib/prism/node.rb#15579 def initialize(source, flags, left, right, operator_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#15590 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#15595 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#15608 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#15600 def compact_child_nodes; end # def copy: (**params) -> RangeNode # # source://prism//lib/prism/node.rb#15613 sig { params(params: T.untyped).returns(Prism::RangeNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#15595 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, left: Node?, right: Node?, operator_loc: Location, location: Location } # # source://prism//lib/prism/node.rb#15628 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def exclude_end?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#15663 sig { returns(T::Boolean) } def exclude_end?; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#15673 def inspect(inspector = T.unsafe(nil)); end # The left-hand side of the range, if present. It can be either `nil` or any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). # # 1... # ^ # # hello...goodbye # ^^^^^ # # source://prism//lib/prism/node.rb#15643 sig { returns(T.nilable(Prism::Node)) } def left; end # def operator: () -> String # # source://prism//lib/prism/node.rb#15668 sig { returns(String) } def operator; end # The location of the `..` or `...` operator. # # source://prism//lib/prism/node.rb#15656 sig { returns(Prism::Location) } def operator_loc; end # The right-hand side of the range, if present. It can be either `nil` or any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). # # ..5 # ^ # # 1...foo # ^^^ # If neither right-hand or left-hand side was included, this will be a MissingNode. # # source://prism//lib/prism/node.rb#15653 sig { returns(T.nilable(Prism::Node)) } def right; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#15707 def type; end private # private attr_reader flags: Integer # # source://prism//lib/prism/node.rb#15633 sig { returns(Integer) } def flags; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#15717 def type; end end end # Represents a rational number literal. # # 1.0r # ^^^^ # # source://prism//lib/prism/node.rb#15727 class Prism::RationalNode < ::Prism::Node # def initialize: (Node numeric, Location location) -> void # # @return [RationalNode] a new instance of RationalNode # # source://prism//lib/prism/node.rb#15728 def initialize(source, numeric, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#15736 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#15741 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#15751 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#15746 def compact_child_nodes; end # def copy: (**params) -> RationalNode # # source://prism//lib/prism/node.rb#15756 sig { params(params: T.untyped).returns(Prism::RationalNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#15741 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { numeric: Node, location: Location } # # source://prism//lib/prism/node.rb#15768 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#15777 def inspect(inspector = T.unsafe(nil)); end # attr_reader numeric: Node # # source://prism//lib/prism/node.rb#15773 sig { returns(Prism::Node) } def numeric; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#15798 def type; end # Returns the value of the node as a Ruby Rational. # # source://prism//lib/prism/node_ext.rb#83 def value; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#15808 def type; end end end # Represents the use of the `redo` keyword. # # redo # ^^^^ # # source://prism//lib/prism/node.rb#15818 class Prism::RedoNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [RedoNode] a new instance of RedoNode # # source://prism//lib/prism/node.rb#15819 def initialize(source, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#15826 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#15831 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#15841 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#15836 def compact_child_nodes; end # def copy: (**params) -> RedoNode # # source://prism//lib/prism/node.rb#15846 sig { params(params: T.untyped).returns(Prism::RedoNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#15831 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } # # source://prism//lib/prism/node.rb#15857 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#15863 def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#15882 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#15892 def type; end end end # Flags for regular expression and match last line nodes. # # source://prism//lib/prism/node.rb#19316 module Prism::RegularExpressionFlags; end # n - forces the ASCII-8BIT encoding # # source://prism//lib/prism/node.rb#19333 Prism::RegularExpressionFlags::ASCII_8BIT = T.let(T.unsafe(nil), Integer) # e - forces the EUC-JP encoding # # source://prism//lib/prism/node.rb#19330 Prism::RegularExpressionFlags::EUC_JP = T.let(T.unsafe(nil), Integer) # x - ignores whitespace and allows comments in regular expressions # # source://prism//lib/prism/node.rb#19321 Prism::RegularExpressionFlags::EXTENDED = T.let(T.unsafe(nil), Integer) # internal bytes forced the encoding to binary # # source://prism//lib/prism/node.rb#19345 Prism::RegularExpressionFlags::FORCED_BINARY_ENCODING = T.let(T.unsafe(nil), Integer) # internal bytes forced the encoding to US-ASCII # # source://prism//lib/prism/node.rb#19348 Prism::RegularExpressionFlags::FORCED_US_ASCII_ENCODING = T.let(T.unsafe(nil), Integer) # internal bytes forced the encoding to UTF-8 # # source://prism//lib/prism/node.rb#19342 Prism::RegularExpressionFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) # i - ignores the case of characters when matching # # source://prism//lib/prism/node.rb#19318 Prism::RegularExpressionFlags::IGNORE_CASE = T.let(T.unsafe(nil), Integer) # m - allows $ to match the end of lines within strings # # source://prism//lib/prism/node.rb#19324 Prism::RegularExpressionFlags::MULTI_LINE = T.let(T.unsafe(nil), Integer) # o - only interpolates values into the regular expression once # # source://prism//lib/prism/node.rb#19327 Prism::RegularExpressionFlags::ONCE = T.let(T.unsafe(nil), Integer) # u - forces the UTF-8 encoding # # source://prism//lib/prism/node.rb#19339 Prism::RegularExpressionFlags::UTF_8 = T.let(T.unsafe(nil), Integer) # s - forces the Windows-31J encoding # # source://prism//lib/prism/node.rb#19336 Prism::RegularExpressionFlags::WINDOWS_31J = T.let(T.unsafe(nil), Integer) # Represents a regular expression literal with no interpolation. # # /foo/i # ^^^^^^ # # source://prism//lib/prism/node.rb#15902 class Prism::RegularExpressionNode < ::Prism::Node include ::Prism::RegularExpressionOptions # def initialize: (Integer flags, Location opening_loc, Location content_loc, Location closing_loc, String unescaped, Location location) -> void # # @return [RegularExpressionNode] a new instance of RegularExpressionNode # # source://prism//lib/prism/node.rb#15903 def initialize(source, flags, opening_loc, content_loc, closing_loc, unescaped, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#15915 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def ascii_8bit?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#16007 sig { returns(T::Boolean) } def ascii_8bit?; end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#15920 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # # source://prism//lib/prism/node.rb#16047 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # # source://prism//lib/prism/node.rb#15972 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#15930 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#15925 def compact_child_nodes; end # def content: () -> String # # source://prism//lib/prism/node.rb#16042 sig { returns(String) } def content; end # attr_reader content_loc: Location # # source://prism//lib/prism/node.rb#15966 sig { returns(Prism::Location) } def content_loc; end # def copy: (**params) -> RegularExpressionNode # # source://prism//lib/prism/node.rb#15935 sig { params(params: T.untyped).returns(Prism::RegularExpressionNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#15920 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location } # # source://prism//lib/prism/node.rb#15951 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def euc_jp?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#16002 sig { returns(T::Boolean) } def euc_jp?; end # def extended?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#15987 sig { returns(T::Boolean) } def extended?; end # def forced_binary_encoding?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#16027 sig { returns(T::Boolean) } def forced_binary_encoding?; end # def forced_us_ascii_encoding?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#16032 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end # def forced_utf8_encoding?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#16022 sig { returns(T::Boolean) } def forced_utf8_encoding?; end # def ignore_case?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#15982 sig { returns(T::Boolean) } def ignore_case?; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#16052 def inspect(inspector = T.unsafe(nil)); end # def multi_line?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#15992 sig { returns(T::Boolean) } def multi_line?; end # def once?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#15997 sig { returns(T::Boolean) } def once?; end # def opening: () -> String # # source://prism//lib/prism/node.rb#16037 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # # source://prism//lib/prism/node.rb#15960 sig { returns(Prism::Location) } def opening_loc; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#16077 def type; end # attr_reader unescaped: String # # source://prism//lib/prism/node.rb#15978 sig { returns(String) } def unescaped; end # def utf_8?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#16017 sig { returns(T::Boolean) } def utf_8?; end # def windows_31j?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#16012 sig { returns(T::Boolean) } def windows_31j?; end private # private attr_reader flags: Integer # # source://prism//lib/prism/node.rb#15956 sig { returns(Integer) } def flags; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#16087 def type; end end end # source://prism//lib/prism/node_ext.rb#6 module Prism::RegularExpressionOptions # Returns a numeric value that represents the flags that were used to create # the regular expression. # # source://prism//lib/prism/node_ext.rb#9 def options; end end # Represents a required keyword parameter to a method, block, or lambda definition. # # def a(b: ) # ^^ # end # # source://prism//lib/prism/node.rb#16098 class Prism::RequiredKeywordParameterNode < ::Prism::Node # def initialize: (Integer flags, Symbol name, Location name_loc, Location location) -> void # # @return [RequiredKeywordParameterNode] a new instance of RequiredKeywordParameterNode # # source://prism//lib/prism/node.rb#16099 def initialize(source, flags, name, name_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#16109 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#16114 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#16124 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#16119 def compact_child_nodes; end # def copy: (**params) -> RequiredKeywordParameterNode # # source://prism//lib/prism/node.rb#16129 sig { params(params: T.untyped).returns(Prism::RequiredKeywordParameterNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#16114 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, name_loc: Location, location: Location } # # source://prism//lib/prism/node.rb#16143 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#16167 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # # source://prism//lib/prism/node.rb#16152 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # # source://prism//lib/prism/node.rb#16155 sig { returns(Prism::Location) } def name_loc; end # def repeated_parameter?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#16162 sig { returns(T::Boolean) } def repeated_parameter?; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#16190 def type; end private # private attr_reader flags: Integer # # source://prism//lib/prism/node.rb#16148 sig { returns(Integer) } def flags; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#16200 def type; end end end # Represents a required parameter to a method, block, or lambda definition. # # def a(b) # ^ # end # # source://prism//lib/prism/node.rb#16211 class Prism::RequiredParameterNode < ::Prism::Node # def initialize: (Integer flags, Symbol name, Location location) -> void # # @return [RequiredParameterNode] a new instance of RequiredParameterNode # # source://prism//lib/prism/node.rb#16212 def initialize(source, flags, name, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#16221 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#16226 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#16236 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#16231 def compact_child_nodes; end # def copy: (**params) -> RequiredParameterNode # # source://prism//lib/prism/node.rb#16241 sig { params(params: T.untyped).returns(Prism::RequiredParameterNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#16226 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, location: Location } # # source://prism//lib/prism/node.rb#16254 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#16272 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # # source://prism//lib/prism/node.rb#16263 sig { returns(Symbol) } def name; end # def repeated_parameter?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#16267 sig { returns(T::Boolean) } def repeated_parameter?; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#16294 def type; end private # private attr_reader flags: Integer # # source://prism//lib/prism/node.rb#16259 sig { returns(Integer) } def flags; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#16304 def type; end end end # Represents an expression modified with a rescue. # # foo rescue nil # ^^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#16314 class Prism::RescueModifierNode < ::Prism::Node # def initialize: (Node expression, Location keyword_loc, Node rescue_expression, Location location) -> void # # @return [RescueModifierNode] a new instance of RescueModifierNode # # source://prism//lib/prism/node.rb#16315 def initialize(source, expression, keyword_loc, rescue_expression, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#16325 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#16334 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#16344 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#16339 def compact_child_nodes; end # def copy: (**params) -> RescueModifierNode # # source://prism//lib/prism/node.rb#16349 sig { params(params: T.untyped).returns(Prism::RescueModifierNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#16334 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { expression: Node, keyword_loc: Location, rescue_expression: Node, location: Location } # # source://prism//lib/prism/node.rb#16363 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # attr_reader expression: Node # # source://prism//lib/prism/node.rb#16368 sig { returns(Prism::Node) } def expression; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#16386 def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # # source://prism//lib/prism/node.rb#16381 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # # source://prism//lib/prism/node.rb#16371 sig { returns(Prism::Location) } def keyword_loc; end # attr_reader rescue_expression: Node # # source://prism//lib/prism/node.rb#16377 sig { returns(Prism::Node) } def rescue_expression; end # source://prism//lib/prism/node.rb#16329 def set_newline_flag(newline_marked); end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#16410 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#16420 def type; end end end # Represents a rescue statement. # # begin # rescue Foo, *splat, Bar => ex # foo # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ # end # # `Foo, *splat, Bar` are in the `exceptions` field. `ex` is in the `exception` field. # # source://prism//lib/prism/node.rb#16435 class Prism::RescueNode < ::Prism::Node # def initialize: (Location keyword_loc, Array[Node] exceptions, Location? operator_loc, Node? reference, StatementsNode? statements, RescueNode? consequent, Location location) -> void # # @return [RescueNode] a new instance of RescueNode # # source://prism//lib/prism/node.rb#16436 def initialize(source, keyword_loc, exceptions, operator_loc, reference, statements, consequent, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#16449 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#16454 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#16469 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#16459 def compact_child_nodes; end # attr_reader consequent: RescueNode? # # source://prism//lib/prism/node.rb#16523 sig { returns(T.nilable(Prism::RescueNode)) } def consequent; end # def copy: (**params) -> RescueNode # # source://prism//lib/prism/node.rb#16474 sig { params(params: T.untyped).returns(Prism::RescueNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#16454 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, exceptions: Array[Node], operator_loc: Location?, reference: Node?, statements: StatementsNode?, consequent: RescueNode?, location: Location } # # source://prism//lib/prism/node.rb#16491 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # attr_reader exceptions: Array[Node] # # source://prism//lib/prism/node.rb#16502 sig { returns(T::Array[Prism::Node]) } def exceptions; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#16537 def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # # source://prism//lib/prism/node.rb#16527 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # # source://prism//lib/prism/node.rb#16496 sig { returns(Prism::Location) } def keyword_loc; end # def operator: () -> String? # # source://prism//lib/prism/node.rb#16532 sig { returns(T.nilable(String)) } def operator; end # attr_reader operator_loc: Location? # # source://prism//lib/prism/node.rb#16505 sig { returns(T.nilable(Prism::Location)) } def operator_loc; end # attr_reader reference: Node? # # source://prism//lib/prism/node.rb#16517 sig { returns(T.nilable(Prism::Node)) } def reference; end # attr_reader statements: StatementsNode? # # source://prism//lib/prism/node.rb#16520 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#16577 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#16587 def type; end end end # Represents a rest parameter to a method, block, or lambda definition. # # def a(*b) # ^^ # end # # source://prism//lib/prism/node.rb#16598 class Prism::RestParameterNode < ::Prism::Node # def initialize: (Integer flags, Symbol? name, Location? name_loc, Location operator_loc, Location location) -> void # # @return [RestParameterNode] a new instance of RestParameterNode # # source://prism//lib/prism/node.rb#16599 def initialize(source, flags, name, name_loc, operator_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#16610 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#16615 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#16625 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#16620 def compact_child_nodes; end # def copy: (**params) -> RestParameterNode # # source://prism//lib/prism/node.rb#16630 sig { params(params: T.untyped).returns(Prism::RestParameterNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#16615 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location } # # source://prism//lib/prism/node.rb#16645 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#16686 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol? # # source://prism//lib/prism/node.rb#16654 sig { returns(T.nilable(Symbol)) } def name; end # attr_reader name_loc: Location? # # source://prism//lib/prism/node.rb#16657 sig { returns(T.nilable(Prism::Location)) } def name_loc; end # def operator: () -> String # # source://prism//lib/prism/node.rb#16681 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism//lib/prism/node.rb#16669 sig { returns(Prism::Location) } def operator_loc; end # def repeated_parameter?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#16676 sig { returns(T::Boolean) } def repeated_parameter?; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#16714 def type; end private # private attr_reader flags: Integer # # source://prism//lib/prism/node.rb#16650 sig { returns(Integer) } def flags; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#16724 def type; end end end # Represents the use of the `retry` keyword. # # retry # ^^^^^ # # source://prism//lib/prism/node.rb#16734 class Prism::RetryNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [RetryNode] a new instance of RetryNode # # source://prism//lib/prism/node.rb#16735 def initialize(source, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#16742 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#16747 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#16757 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#16752 def compact_child_nodes; end # def copy: (**params) -> RetryNode # # source://prism//lib/prism/node.rb#16762 sig { params(params: T.untyped).returns(Prism::RetryNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#16747 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } # # source://prism//lib/prism/node.rb#16773 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#16779 def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#16798 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#16808 def type; end end end # Represents the use of the `return` keyword. # # return 1 # ^^^^^^^^ # # source://prism//lib/prism/node.rb#16818 class Prism::ReturnNode < ::Prism::Node # def initialize: (Location keyword_loc, ArgumentsNode? arguments, Location location) -> void # # @return [ReturnNode] a new instance of ReturnNode # # source://prism//lib/prism/node.rb#16819 def initialize(source, keyword_loc, arguments, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#16828 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # # source://prism//lib/prism/node.rb#16874 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#16833 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#16845 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#16838 def compact_child_nodes; end # def copy: (**params) -> ReturnNode # # source://prism//lib/prism/node.rb#16850 sig { params(params: T.untyped).returns(Prism::ReturnNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#16833 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, arguments: ArgumentsNode?, location: Location } # # source://prism//lib/prism/node.rb#16863 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#16883 def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # # source://prism//lib/prism/node.rb#16878 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # # source://prism//lib/prism/node.rb#16868 sig { returns(Prism::Location) } def keyword_loc; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#16909 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#16919 def type; end end end # Represents the `self` keyword. # # self # ^^^^ # # source://prism//lib/prism/node.rb#16929 class Prism::SelfNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [SelfNode] a new instance of SelfNode # # source://prism//lib/prism/node.rb#16930 def initialize(source, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#16937 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#16942 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#16952 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#16947 def compact_child_nodes; end # def copy: (**params) -> SelfNode # # source://prism//lib/prism/node.rb#16957 sig { params(params: T.untyped).returns(Prism::SelfNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#16942 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } # # source://prism//lib/prism/node.rb#16968 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#16974 def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#16993 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#17003 def type; end end end # A module responsible for deserializing parse results. # # source://prism//lib/prism/serialize.rb#23 module Prism::Serialize class << self # Deserialize the AST represented by the given string into a parse result. # # source://prism//lib/prism/serialize.rb#37 def load(input, serialized); end # Deserialize the tokens represented by the given string into a parse # result. # # source://prism//lib/prism/serialize.rb#49 def load_tokens(source, serialized); end end end # source://prism//lib/prism/serialize.rb#53 class Prism::Serialize::Loader # @return [Loader] a new instance of Loader # # source://prism//lib/prism/serialize.rb#58 def initialize(source, serialized); end # Returns the value of attribute constant_pool. # # source://prism//lib/prism/serialize.rb#55 def constant_pool; end # Returns the value of attribute constant_pool_offset. # # source://prism//lib/prism/serialize.rb#55 def constant_pool_offset; end # Returns the value of attribute encoding. # # source://prism//lib/prism/serialize.rb#54 def encoding; end # Returns the value of attribute input. # # source://prism//lib/prism/serialize.rb#54 def input; end # Returns the value of attribute io. # # source://prism//lib/prism/serialize.rb#54 def io; end # source://prism//lib/prism/serialize.rb#96 def load_comments; end # source://prism//lib/prism/serialize.rb#82 def load_encoding; end # source://prism//lib/prism/serialize.rb#73 def load_header; end # source://prism//lib/prism/serialize.rb#92 def load_line_offsets; end # source://prism//lib/prism/serialize.rb#106 def load_metadata; end # source://prism//lib/prism/serialize.rb#140 def load_nodes; end # source://prism//lib/prism/serialize.rb#154 def load_result; end # source://prism//lib/prism/serialize.rb#88 def load_start_line; end # source://prism//lib/prism/serialize.rb#115 def load_tokens; end # source://prism//lib/prism/serialize.rb#128 def load_tokens_result; end # Returns the value of attribute serialized. # # source://prism//lib/prism/serialize.rb#54 def serialized; end # Returns the value of attribute source. # # source://prism//lib/prism/serialize.rb#55 def source; end # Returns the value of attribute start_line. # # source://prism//lib/prism/serialize.rb#56 def start_line; end private # source://prism//lib/prism/serialize.rb#217 def load_constant(index); end # source://prism//lib/prism/serialize.rb#193 def load_embedded_string; end # source://prism//lib/prism/serialize.rb#247 def load_error_level; end # source://prism//lib/prism/serialize.rb#209 def load_location; end # source://prism//lib/prism/serialize.rb#274 def load_node; end # source://prism//lib/prism/serialize.rb#242 def load_optional_constant; end # source://prism//lib/prism/serialize.rb#213 def load_optional_location; end # source://prism//lib/prism/serialize.rb#186 def load_optional_node; end # source://prism//lib/prism/serialize.rb#238 def load_required_constant; end # source://prism//lib/prism/serialize.rb#182 def load_serialized_length; end # source://prism//lib/prism/serialize.rb#197 def load_string; end # source://prism//lib/prism/serialize.rb#177 def load_varsint; end # variable-length integer using https://en.wikipedia.org/wiki/LEB128 # This is also what protobuf uses: https://protobuf.dev/programming-guides/encoding/#varints # # source://prism//lib/prism/serialize.rb#163 def load_varuint; end # source://prism//lib/prism/serialize.rb#260 def load_warning_level; end end # The major version of prism that we are expecting to find in the serialized # strings. # # source://prism//lib/prism/serialize.rb#26 Prism::Serialize::MAJOR_VERSION = T.let(T.unsafe(nil), Integer) # The minor version of prism that we are expecting to find in the serialized # strings. # # source://prism//lib/prism/serialize.rb#30 Prism::Serialize::MINOR_VERSION = T.let(T.unsafe(nil), Integer) # The patch version of prism that we are expecting to find in the serialized # strings. # # source://prism//lib/prism/serialize.rb#34 Prism::Serialize::PATCH_VERSION = T.let(T.unsafe(nil), Integer) # The token types that can be indexed by their enum values. # # source://prism//lib/prism/serialize.rb#1482 Prism::Serialize::TOKEN_TYPES = T.let(T.unsafe(nil), Array) # Represents a singleton class declaration involving the `class` keyword. # # class << self end # ^^^^^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#17013 class Prism::SingletonClassNode < ::Prism::Node # def initialize: (Array[Symbol] locals, Location class_keyword_loc, Location operator_loc, Node expression, Node? body, Location end_keyword_loc, Location location) -> void # # @return [SingletonClassNode] a new instance of SingletonClassNode # # source://prism//lib/prism/node.rb#17014 def initialize(source, locals, class_keyword_loc, operator_loc, expression, body, end_keyword_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#17027 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # attr_reader body: Node? # # source://prism//lib/prism/node.rb#17090 sig { returns(T.nilable(Prism::Node)) } def body; end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#17032 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def class_keyword: () -> String # # source://prism//lib/prism/node.rb#17100 sig { returns(String) } def class_keyword; end # attr_reader class_keyword_loc: Location # # source://prism//lib/prism/node.rb#17075 sig { returns(Prism::Location) } def class_keyword_loc; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#17045 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#17037 def compact_child_nodes; end # def copy: (**params) -> SingletonClassNode # # source://prism//lib/prism/node.rb#17050 sig { params(params: T.untyped).returns(Prism::SingletonClassNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#17032 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], class_keyword_loc: Location, operator_loc: Location, expression: Node, body: Node?, end_keyword_loc: Location, location: Location } # # source://prism//lib/prism/node.rb#17067 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def end_keyword: () -> String # # source://prism//lib/prism/node.rb#17110 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # # source://prism//lib/prism/node.rb#17093 sig { returns(Prism::Location) } def end_keyword_loc; end # attr_reader expression: Node # # source://prism//lib/prism/node.rb#17087 sig { returns(Prism::Node) } def expression; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#17115 def inspect(inspector = T.unsafe(nil)); end # attr_reader locals: Array[Symbol] # # source://prism//lib/prism/node.rb#17072 sig { returns(T::Array[Symbol]) } def locals; end # def operator: () -> String # # source://prism//lib/prism/node.rb#17105 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism//lib/prism/node.rb#17081 sig { returns(Prism::Location) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#17146 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#17156 def type; end end end # This represents a source of Ruby code that has been parsed. It is used in # conjunction with locations to allow them to resolve line numbers and source # ranges. # # source://prism//lib/prism/parse_result.rb#7 class Prism::Source # Create a new source object with the given source code. # # @return [Source] a new instance of Source # # source://prism//lib/prism/parse_result.rb#18 def initialize(source, start_line = T.unsafe(nil), offsets = T.unsafe(nil)); end # Return the column number in characters for the given byte offset. # # source://prism//lib/prism/parse_result.rb#53 def character_column(byte_offset); end # Return the character offset for the given byte offset. # # source://prism//lib/prism/parse_result.rb#48 def character_offset(byte_offset); end # Returns the column number in code units for the given encoding for the # given byte offset. # # source://prism//lib/prism/parse_result.rb#70 def code_units_column(byte_offset, encoding); end # Returns the offset from the start of the file for the given byte offset # counting in code units for the given encoding. # # This method is tested with UTF-8, UTF-16, and UTF-32. If there is the # concept of code units that differs from the number of characters in other # encodings, it is not captured here. # # source://prism//lib/prism/parse_result.rb#63 def code_units_offset(byte_offset, encoding); end # Return the column number for the given byte offset. # # source://prism//lib/prism/parse_result.rb#43 def column(byte_offset); end # Binary search through the offsets to find the line number for the given # byte offset. # # source://prism//lib/prism/parse_result.rb#32 def line(byte_offset); end sig { params(value: Integer).returns(Integer) } def line_offset(value); end # Return the byte offset of the start of the line corresponding to the given # byte offset. # # source://prism//lib/prism/parse_result.rb#38 def line_start(byte_offset); end # The list of newline byte offsets in the source code. # # source://prism//lib/prism/parse_result.rb#15 sig { returns(T::Array[Integer]) } def offsets; end # Perform a byteslice on the source code using the given byte offset and # byte length. # # source://prism//lib/prism/parse_result.rb#26 def slice(byte_offset, length); end # The source code that this source object represents. # # source://prism//lib/prism/parse_result.rb#9 sig { returns(String) } def source; end # The line number where this source starts. # # source://prism//lib/prism/parse_result.rb#12 def start_line; end private # Binary search through the offsets to find the line number for the given # byte offset. # # source://prism//lib/prism/parse_result.rb#78 def find_line(byte_offset); end end # Represents the use of the `__ENCODING__` keyword. # # __ENCODING__ # ^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#17166 class Prism::SourceEncodingNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [SourceEncodingNode] a new instance of SourceEncodingNode # # source://prism//lib/prism/node.rb#17167 def initialize(source, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#17174 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#17179 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#17189 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#17184 def compact_child_nodes; end # def copy: (**params) -> SourceEncodingNode # # source://prism//lib/prism/node.rb#17194 sig { params(params: T.untyped).returns(Prism::SourceEncodingNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#17179 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } # # source://prism//lib/prism/node.rb#17205 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#17211 def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#17230 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#17240 def type; end end end # Represents the use of the `__FILE__` keyword. # # __FILE__ # ^^^^^^^^ # # source://prism//lib/prism/node.rb#17250 class Prism::SourceFileNode < ::Prism::Node # def initialize: (String filepath, Location location) -> void # # @return [SourceFileNode] a new instance of SourceFileNode # # source://prism//lib/prism/node.rb#17251 def initialize(source, filepath, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#17259 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#17264 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#17274 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#17269 def compact_child_nodes; end # def copy: (**params) -> SourceFileNode # # source://prism//lib/prism/node.rb#17279 sig { params(params: T.untyped).returns(Prism::SourceFileNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#17264 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { filepath: String, location: Location } # # source://prism//lib/prism/node.rb#17291 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # attr_reader filepath: String # # source://prism//lib/prism/node.rb#17296 sig { returns(String) } def filepath; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#17300 def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#17320 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#17330 def type; end end end # Represents the use of the `__LINE__` keyword. # # __LINE__ # ^^^^^^^^ # # source://prism//lib/prism/node.rb#17340 class Prism::SourceLineNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [SourceLineNode] a new instance of SourceLineNode # # source://prism//lib/prism/node.rb#17341 def initialize(source, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#17348 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#17353 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#17363 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#17358 def compact_child_nodes; end # def copy: (**params) -> SourceLineNode # # source://prism//lib/prism/node.rb#17368 sig { params(params: T.untyped).returns(Prism::SourceLineNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#17353 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } # # source://prism//lib/prism/node.rb#17379 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#17385 def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#17404 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#17414 def type; end end end # Represents the use of the splat operator. # # [*a] # ^^ # # source://prism//lib/prism/node.rb#17424 class Prism::SplatNode < ::Prism::Node # def initialize: (Location operator_loc, Node? expression, Location location) -> void # # @return [SplatNode] a new instance of SplatNode # # source://prism//lib/prism/node.rb#17425 def initialize(source, operator_loc, expression, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#17434 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#17439 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#17451 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#17444 def compact_child_nodes; end # def copy: (**params) -> SplatNode # # source://prism//lib/prism/node.rb#17456 sig { params(params: T.untyped).returns(Prism::SplatNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#17439 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { operator_loc: Location, expression: Node?, location: Location } # # source://prism//lib/prism/node.rb#17469 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # attr_reader expression: Node? # # source://prism//lib/prism/node.rb#17480 sig { returns(T.nilable(Prism::Node)) } def expression; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#17489 def inspect(inspector = T.unsafe(nil)); end # def operator: () -> String # # source://prism//lib/prism/node.rb#17484 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism//lib/prism/node.rb#17474 sig { returns(Prism::Location) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#17515 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#17525 def type; end end end # Represents a set of statements contained within some scope. # # foo; bar; baz # ^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#17535 class Prism::StatementsNode < ::Prism::Node # def initialize: (Array[Node] body, Location location) -> void # # @return [StatementsNode] a new instance of StatementsNode # # source://prism//lib/prism/node.rb#17536 def initialize(source, body, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#17544 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # attr_reader body: Array[Node] # # source://prism//lib/prism/node.rb#17581 sig { returns(T::Array[Prism::Node]) } def body; end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#17549 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#17559 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#17554 def compact_child_nodes; end # def copy: (**params) -> StatementsNode # # source://prism//lib/prism/node.rb#17564 sig { params(params: T.untyped).returns(Prism::StatementsNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#17549 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { body: Array[Node], location: Location } # # source://prism//lib/prism/node.rb#17576 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#17585 def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#17605 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#17615 def type; end end end # Flags for string nodes. # # source://prism//lib/prism/node.rb#19352 module Prism::StringFlags; end # internal bytes forced the encoding to binary # # source://prism//lib/prism/node.rb#19357 Prism::StringFlags::FORCED_BINARY_ENCODING = T.let(T.unsafe(nil), Integer) # internal bytes forced the encoding to UTF-8 # # source://prism//lib/prism/node.rb#19354 Prism::StringFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) # frozen by virtue of a `frozen_string_literal` comment # # source://prism//lib/prism/node.rb#19360 Prism::StringFlags::FROZEN = T.let(T.unsafe(nil), Integer) # Represents a string literal, a string contained within a `%w` list, or plain string content within an interpolated string. # # "foo" # ^^^^^ # # %w[foo] # ^^^ # # "foo #{bar} baz" # ^^^^ ^^^^ # # source://prism//lib/prism/node.rb#17631 class Prism::StringNode < ::Prism::Node include ::Prism::HeredocQuery # def initialize: (Integer flags, Location? opening_loc, Location content_loc, Location? closing_loc, String unescaped, Location location) -> void # # @return [StringNode] a new instance of StringNode # # source://prism//lib/prism/node.rb#17632 def initialize(source, flags, opening_loc, content_loc, closing_loc, unescaped, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#17644 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#17649 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # # source://prism//lib/prism/node.rb#17748 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # # source://prism//lib/prism/node.rb#17707 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#17659 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#17654 def compact_child_nodes; end # def content: () -> String # # source://prism//lib/prism/node.rb#17743 sig { returns(String) } def content; end # attr_reader content_loc: Location # # source://prism//lib/prism/node.rb#17701 sig { returns(Prism::Location) } def content_loc; end # def copy: (**params) -> StringNode # # source://prism//lib/prism/node.rb#17664 sig { params(params: T.untyped).returns(Prism::StringNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#17649 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location?, content_loc: Location, closing_loc: Location?, unescaped: String, location: Location } # # source://prism//lib/prism/node.rb#17680 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def forced_binary_encoding?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#17728 sig { returns(T::Boolean) } def forced_binary_encoding?; end # def forced_utf8_encoding?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#17723 sig { returns(T::Boolean) } def forced_utf8_encoding?; end # def frozen?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#17733 sig { returns(T::Boolean) } def frozen?; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#17753 def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String? # # source://prism//lib/prism/node.rb#17738 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # # source://prism//lib/prism/node.rb#17689 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#17778 def type; end # attr_reader unescaped: String # # source://prism//lib/prism/node.rb#17719 sig { returns(String) } def unescaped; end private # private attr_reader flags: Integer # # source://prism//lib/prism/node.rb#17685 sig { returns(Integer) } def flags; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#17788 def type; end end end # Represents the use of the `super` keyword with parentheses or arguments. # # super() # ^^^^^^^ # # super foo, bar # ^^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#17801 class Prism::SuperNode < ::Prism::Node # def initialize: (Location keyword_loc, Location? lparen_loc, ArgumentsNode? arguments, Location? rparen_loc, Node? block, Location location) -> void # # @return [SuperNode] a new instance of SuperNode # # source://prism//lib/prism/node.rb#17802 def initialize(source, keyword_loc, lparen_loc, arguments, rparen_loc, block, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#17814 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # # source://prism//lib/prism/node.rb#17876 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # attr_reader block: Node? # # source://prism//lib/prism/node.rb#17891 sig { returns(T.nilable(Prism::Node)) } def block; end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#17819 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#17832 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#17824 def compact_child_nodes; end # def copy: (**params) -> SuperNode # # source://prism//lib/prism/node.rb#17837 sig { params(params: T.untyped).returns(Prism::SuperNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#17819 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, block: Node?, location: Location } # # source://prism//lib/prism/node.rb#17853 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#17910 def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # # source://prism//lib/prism/node.rb#17895 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # # source://prism//lib/prism/node.rb#17858 sig { returns(Prism::Location) } def keyword_loc; end # def lparen: () -> String? # # source://prism//lib/prism/node.rb#17900 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # # source://prism//lib/prism/node.rb#17864 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def rparen: () -> String? # # source://prism//lib/prism/node.rb#17905 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # # source://prism//lib/prism/node.rb#17879 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#17944 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#17954 def type; end end end # Flags for symbol nodes. # # source://prism//lib/prism/node.rb#19364 module Prism::SymbolFlags; end # internal bytes forced the encoding to binary # # source://prism//lib/prism/node.rb#19369 Prism::SymbolFlags::FORCED_BINARY_ENCODING = T.let(T.unsafe(nil), Integer) # internal bytes forced the encoding to US-ASCII # # source://prism//lib/prism/node.rb#19372 Prism::SymbolFlags::FORCED_US_ASCII_ENCODING = T.let(T.unsafe(nil), Integer) # internal bytes forced the encoding to UTF-8 # # source://prism//lib/prism/node.rb#19366 Prism::SymbolFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) # Represents a symbol literal or a symbol contained within a `%i` list. # # :foo # ^^^^ # # %i[foo] # ^^^ # # source://prism//lib/prism/node.rb#17967 class Prism::SymbolNode < ::Prism::Node # def initialize: (Integer flags, Location? opening_loc, Location? value_loc, Location? closing_loc, String unescaped, Location location) -> void # # @return [SymbolNode] a new instance of SymbolNode # # source://prism//lib/prism/node.rb#17968 def initialize(source, flags, opening_loc, value_loc, closing_loc, unescaped, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#17980 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#17985 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # # source://prism//lib/prism/node.rb#18090 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # # source://prism//lib/prism/node.rb#18049 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#17995 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#17990 def compact_child_nodes; end # def copy: (**params) -> SymbolNode # # source://prism//lib/prism/node.rb#18000 sig { params(params: T.untyped).returns(Prism::SymbolNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#17985 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location?, value_loc: Location?, closing_loc: Location?, unescaped: String, location: Location } # # source://prism//lib/prism/node.rb#18016 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def forced_binary_encoding?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#18070 sig { returns(T::Boolean) } def forced_binary_encoding?; end # def forced_us_ascii_encoding?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#18075 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end # def forced_utf8_encoding?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#18065 sig { returns(T::Boolean) } def forced_utf8_encoding?; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#18095 def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String? # # source://prism//lib/prism/node.rb#18080 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # # source://prism//lib/prism/node.rb#18025 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#18120 def type; end # attr_reader unescaped: String # # source://prism//lib/prism/node.rb#18061 sig { returns(String) } def unescaped; end # def value: () -> String? # # source://prism//lib/prism/node.rb#18085 sig { returns(T.nilable(String)) } def value; end # attr_reader value_loc: Location? # # source://prism//lib/prism/node.rb#18037 sig { returns(T.nilable(Prism::Location)) } def value_loc; end private # private attr_reader flags: Integer # # source://prism//lib/prism/node.rb#18021 sig { returns(Integer) } def flags; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#18130 def type; end end end # This represents a token from the Ruby source. # # source://prism//lib/prism/parse_result.rb#454 class Prism::Token # Create a new token object with the given type, value, and location. # # @return [Token] a new instance of Token # # source://prism//lib/prism/parse_result.rb#466 def initialize(source, type, value, location); end # Returns true if the given other token is equal to this token. # # source://prism//lib/prism/parse_result.rb#500 sig { params(other: T.untyped).returns(T::Boolean) } def ==(other); end # Implement the hash pattern matching interface for Token. # # source://prism//lib/prism/parse_result.rb#474 sig { params(keys: T.untyped).returns(T.untyped) } def deconstruct_keys(keys); end # A Location object representing the location of this token in the source. # # source://prism//lib/prism/parse_result.rb#479 sig { returns(Prism::Location) } def location; end # Implement the pretty print interface for Token. # # source://prism//lib/prism/parse_result.rb#485 sig { params(q: T.untyped).returns(T.untyped) } def pretty_print(q); end # The type of token that this token is. # # source://prism//lib/prism/parse_result.rb#460 sig { returns(T.untyped) } def type; end # A byteslice of the source that this token represents. # # source://prism//lib/prism/parse_result.rb#463 sig { returns(String) } def value; end private # The Source object that represents the source this token came from. # # source://prism//lib/prism/parse_result.rb#456 def source; end end # This module is responsible for converting the prism syntax tree into other # syntax trees. # # source://prism//lib/prism/translation.rb#6 module Prism::Translation; end # Note: This integration is not finished, and therefore still has many # inconsistencies with Ripper. If you'd like to help out, pull requests would # be greatly appreciated! # # This class is meant to provide a compatibility layer between prism and # Ripper. It functions by parsing the entire tree first and then walking it # and executing each of the Ripper callbacks as it goes. # # This class is going to necessarily be slower than the native Ripper API. It # is meant as a stopgap until developers migrate to using prism. It is also # meant as a test harness for the prism parser. # # To use this class, you treat `Prism::Translation::Ripper` effectively as you would # treat the `Ripper` class. # # source://prism//lib/prism/translation/ripper.rb#23 class Prism::Translation::Ripper < ::Prism::Compiler # Create a new Translation::Ripper object with the given source. # # @return [Ripper] a new instance of Ripper # # source://prism//lib/prism/translation/ripper.rb#75 def initialize(source); end # The current column number of the parser. # # source://prism//lib/prism/translation/ripper.rb#72 def column; end # True if the parser encountered an error during parsing. # # @return [Boolean] # # source://prism//lib/prism/translation/ripper.rb#87 def error?; end # The current line number of the parser. # # source://prism//lib/prism/translation/ripper.rb#69 def lineno; end # Parse the source and return the result. # # source://prism//lib/prism/translation/ripper.rb#92 def parse; end # The source that is being parsed. # # source://prism//lib/prism/translation/ripper.rb#66 def source; end # Visit an AliasGlobalVariableNode. # # source://prism//lib/prism/translation/ripper.rb#247 def visit_alias_global_variable_node(node); end # Visit an AliasMethodNode. # # source://prism//lib/prism/translation/ripper.rb#226 def visit_alias_method_node(node); end # Visit an AndNode. # # source://prism//lib/prism/translation/ripper.rb#264 def visit_and_node(node); end # Visit an ArrayNode node. # # source://prism//lib/prism/translation/ripper.rb#113 def visit_array_node(node); end # Visit a BackReferenceReadNode. # # source://prism//lib/prism/translation/ripper.rb#258 def visit_back_reference_read_node(node); end # Visit a BeginNode node. # This is not at all bulletproof against different structures of begin/rescue/else/ensure/end. # # source://prism//lib/prism/translation/ripper.rb#315 def visit_begin_node(node); end # Visit a BlockNode. # # source://prism//lib/prism/translation/ripper.rb#191 def visit_block_node(node); end # Visit a BlockParametersNode. # # source://prism//lib/prism/translation/ripper.rb#200 def visit_block_parameters_node(node); end # Visit a BreakNode. # # source://prism//lib/prism/translation/ripper.rb#218 def visit_break_node(node); end # Visit a CallNode node. # Ripper distinguishes between many different method-call # nodes -- unary and binary operators, "command" calls with # no parentheses, and call/fcall/vcall. # # source://prism//lib/prism/translation/ripper.rb#123 def visit_call_node(node); end # Visit an EmbeddedStatementsNode node. # # source://prism//lib/prism/translation/ripper.rb#371 def visit_embedded_statements_node(node); end # Visit a FalseNode. # # source://prism//lib/prism/translation/ripper.rb#280 def visit_false_node(node); end # Visit a FloatNode node. # # source://prism//lib/prism/translation/ripper.rb#286 def visit_float_node(node); end # Visit a GlobalVariableReadNode. # # source://prism//lib/prism/translation/ripper.rb#252 def visit_global_variable_read_node(node); end # Visit a ImaginaryNode node. # # source://prism//lib/prism/translation/ripper.rb#291 def visit_imaginary_node(node); end # Visit an IntegerNode node. # # source://prism//lib/prism/translation/ripper.rb#296 def visit_integer_node(node); end # Visit an InterpolatedStringNode node. # # source://prism//lib/prism/translation/ripper.rb#366 def visit_interpolated_string_node(node); end # Visit an InterpolatedSymbolNode node. # # source://prism//lib/prism/translation/ripper.rb#381 def visit_interpolated_symbol_node(node); end # Visit a LocalVariableAndWriteNode. # # source://prism//lib/prism/translation/ripper.rb#168 def visit_local_variable_and_write_node(node); end # Visit nodes for +=, *=, -=, etc., called LocalVariableOperatorWriteNodes. # # source://prism//lib/prism/translation/ripper.rb#178 def visit_local_variable_operator_write_node(node); end # Visit a LocalVariableOrWriteNode. # # source://prism//lib/prism/translation/ripper.rb#173 def visit_local_variable_or_write_node(node); end # Visit a LocalVariableReadNode. # # source://prism//lib/prism/translation/ripper.rb#183 def visit_local_variable_read_node(node); end # Visit a LocalVariableWriteNode. # # source://prism//lib/prism/translation/ripper.rb#161 def visit_local_variable_write_node(node); end # Visit an OrNode. # # source://prism//lib/prism/translation/ripper.rb#269 def visit_or_node(node); end # Visit a ParametersNode. # This will require expanding as we support more kinds of parameters. # # source://prism//lib/prism/translation/ripper.rb#206 def visit_parameters_node(node); end # Visit a ParenthesesNode node. # # source://prism//lib/prism/translation/ripper.rb#301 def visit_parentheses_node(node); end # Visit a ProgramNode node. # # source://prism//lib/prism/translation/ripper.rb#327 def visit_program_node(node); end # Visit a RangeNode node. # # source://prism//lib/prism/translation/ripper.rb#334 def visit_range_node(node); end # Visit a RationalNode node. # # source://prism//lib/prism/translation/ripper.rb#347 def visit_rational_node(node); end # Visit a RequiredParameterNode. # # source://prism//lib/prism/translation/ripper.rb#212 def visit_required_parameter_node(node); end # Visit a RescueNode node. # # source://prism//lib/prism/translation/ripper.rb#322 def visit_rescue_node(node); end # Visit a StatementsNode node. # # source://prism//lib/prism/translation/ripper.rb#386 def visit_statements_node(node); end # Visit a StringNode node. # # source://prism//lib/prism/translation/ripper.rb#352 def visit_string_node(node); end # Visit a SymbolNode node. # # source://prism//lib/prism/translation/ripper.rb#376 def visit_symbol_node(node); end # Visit a TrueNode. # # source://prism//lib/prism/translation/ripper.rb#274 def visit_true_node(node); end # Visit an XStringNode node. # # source://prism//lib/prism/translation/ripper.rb#359 def visit_x_string_node(node); end private # source://prism//lib/prism/translation/ripper.rb#680 def _dispatch0; end # source://prism//lib/prism/translation/ripper.rb#681 def _dispatch1(_); end # source://prism//lib/prism/translation/ripper.rb#682 def _dispatch2(_, _); end # source://prism//lib/prism/translation/ripper.rb#683 def _dispatch3(_, _, _); end # source://prism//lib/prism/translation/ripper.rb#684 def _dispatch4(_, _, _, _); end # source://prism//lib/prism/translation/ripper.rb#685 def _dispatch5(_, _, _, _, _); end # source://prism//lib/prism/translation/ripper.rb#686 def _dispatch7(_, _, _, _, _, _, _); end # This method is responsible for updating lineno and column information # to reflect the current node. # # This method could be drastically improved with some caching on the start # of every line, but for now it's good enough. # # source://prism//lib/prism/translation/ripper.rb#663 def bounds(location); end # If we need to do something unusual, we can directly update the line number # and column to reflect the current node. # # source://prism//lib/prism/translation/ripper.rb#670 def bounds_values(lineno, column); end # For CRuby et al, "no block" in an on_block_var is false # # source://prism//lib/prism/translation/ripper.rb#646 def no_block_value; end # source://prism//lib/prism/translation/ripper.rb#681 def on_BEGIN(_); end # source://prism//lib/prism/translation/ripper.rb#681 def on_CHAR(_); end # source://prism//lib/prism/translation/ripper.rb#681 def on_END(_); end # source://prism//lib/prism/translation/ripper.rb#681 def on___end__(_); end # source://prism//lib/prism/translation/ripper.rb#682 def on_alias(_, _); end # source://prism//lib/prism/translation/ripper.rb#682 def on_alias_error(_, _); end # source://prism//lib/prism/translation/ripper.rb#682 def on_aref(_, _); end # source://prism//lib/prism/translation/ripper.rb#682 def on_aref_field(_, _); end # source://prism//lib/prism/translation/ripper.rb#681 def on_arg_ambiguous(_); end # source://prism//lib/prism/translation/ripper.rb#681 def on_arg_paren(_); end # source://prism//lib/prism/translation/ripper.rb#682 def on_args_add(_, _); end # source://prism//lib/prism/translation/ripper.rb#682 def on_args_add_block(_, _); end # source://prism//lib/prism/translation/ripper.rb#682 def on_args_add_star(_, _); end # source://prism//lib/prism/translation/ripper.rb#680 def on_args_forward; end # source://prism//lib/prism/translation/ripper.rb#680 def on_args_new; end # source://prism//lib/prism/translation/ripper.rb#681 def on_array(_); end # source://prism//lib/prism/translation/ripper.rb#684 def on_aryptn(_, _, _, _); end # source://prism//lib/prism/translation/ripper.rb#682 def on_assign(_, _); end # source://prism//lib/prism/translation/ripper.rb#682 def on_assign_error(_, _); end # source://prism//lib/prism/translation/ripper.rb#682 def on_assoc_new(_, _); end # source://prism//lib/prism/translation/ripper.rb#681 def on_assoc_splat(_); end # source://prism//lib/prism/translation/ripper.rb#681 def on_assoclist_from_args(_); end # source://prism//lib/prism/translation/ripper.rb#681 def on_backref(_); end # source://prism//lib/prism/translation/ripper.rb#681 def on_backtick(_); end # source://prism//lib/prism/translation/ripper.rb#681 def on_bare_assoc_hash(_); end # source://prism//lib/prism/translation/ripper.rb#681 def on_begin(_); end # source://prism//lib/prism/translation/ripper.rb#683 def on_binary(_, _, _); end # source://prism//lib/prism/translation/ripper.rb#682 def on_block_var(_, _); end # source://prism//lib/prism/translation/ripper.rb#681 def on_blockarg(_); end # source://prism//lib/prism/translation/ripper.rb#684 def on_bodystmt(_, _, _, _); end # source://prism//lib/prism/translation/ripper.rb#682 def on_brace_block(_, _); end # source://prism//lib/prism/translation/ripper.rb#681 def on_break(_); end # source://prism//lib/prism/translation/ripper.rb#683 def on_call(_, _, _); end # source://prism//lib/prism/translation/ripper.rb#682 def on_case(_, _); end # source://prism//lib/prism/translation/ripper.rb#683 def on_class(_, _, _); end # source://prism//lib/prism/translation/ripper.rb#682 def on_class_name_error(_, _); end # source://prism//lib/prism/translation/ripper.rb#681 def on_comma(_); end # source://prism//lib/prism/translation/ripper.rb#682 def on_command(_, _); end # source://prism//lib/prism/translation/ripper.rb#684 def on_command_call(_, _, _, _); end # source://prism//lib/prism/translation/ripper.rb#681 def on_comment(_); end # source://prism//lib/prism/translation/ripper.rb#681 def on_const(_); end # source://prism//lib/prism/translation/ripper.rb#682 def on_const_path_field(_, _); end # source://prism//lib/prism/translation/ripper.rb#682 def on_const_path_ref(_, _); end # source://prism//lib/prism/translation/ripper.rb#681 def on_const_ref(_); end # source://prism//lib/prism/translation/ripper.rb#681 def on_cvar(_); end # source://prism//lib/prism/translation/ripper.rb#683 def on_def(_, _, _); end # source://prism//lib/prism/translation/ripper.rb#681 def on_defined(_); end # source://prism//lib/prism/translation/ripper.rb#685 def on_defs(_, _, _, _, _); end # source://prism//lib/prism/translation/ripper.rb#682 def on_do_block(_, _); end # source://prism//lib/prism/translation/ripper.rb#682 def on_dot2(_, _); end # source://prism//lib/prism/translation/ripper.rb#682 def on_dot3(_, _); end # source://prism//lib/prism/translation/ripper.rb#681 def on_dyna_symbol(_); end # source://prism//lib/prism/translation/ripper.rb#681 def on_else(_); end # source://prism//lib/prism/translation/ripper.rb#683 def on_elsif(_, _, _); end # source://prism//lib/prism/translation/ripper.rb#681 def on_embdoc(_); end # source://prism//lib/prism/translation/ripper.rb#681 def on_embdoc_beg(_); end # source://prism//lib/prism/translation/ripper.rb#681 def on_embdoc_end(_); end # source://prism//lib/prism/translation/ripper.rb#681 def on_embexpr_beg(_); end # source://prism//lib/prism/translation/ripper.rb#681 def on_embexpr_end(_); end # source://prism//lib/prism/translation/ripper.rb#681 def on_embvar(_); end # source://prism//lib/prism/translation/ripper.rb#681 def on_ensure(_); end # source://prism//lib/prism/translation/ripper.rb#680 def on_excessed_comma; end # source://prism//lib/prism/translation/ripper.rb#681 def on_fcall(_); end # source://prism//lib/prism/translation/ripper.rb#683 def on_field(_, _, _); end # source://prism//lib/prism/translation/ripper.rb#681 def on_float(_); end # source://prism//lib/prism/translation/ripper.rb#684 def on_fndptn(_, _, _, _); end # source://prism//lib/prism/translation/ripper.rb#683 def on_for(_, _, _); end # source://prism//lib/prism/translation/ripper.rb#681 def on_gvar(_); end # source://prism//lib/prism/translation/ripper.rb#681 def on_hash(_); end # source://prism//lib/prism/translation/ripper.rb#681 def on_heredoc_beg(_); end # source://prism//lib/prism/translation/ripper.rb#682 def on_heredoc_dedent(_, _); end # source://prism//lib/prism/translation/ripper.rb#681 def on_heredoc_end(_); end # source://prism//lib/prism/translation/ripper.rb#683 def on_hshptn(_, _, _); end # source://prism//lib/prism/translation/ripper.rb#681 def on_ident(_); end # source://prism//lib/prism/translation/ripper.rb#683 def on_if(_, _, _); end # source://prism//lib/prism/translation/ripper.rb#682 def on_if_mod(_, _); end # source://prism//lib/prism/translation/ripper.rb#683 def on_ifop(_, _, _); end # source://prism//lib/prism/translation/ripper.rb#681 def on_ignored_nl(_); end # source://prism//lib/prism/translation/ripper.rb#681 def on_ignored_sp(_); end # source://prism//lib/prism/translation/ripper.rb#681 def on_imaginary(_); end # source://prism//lib/prism/translation/ripper.rb#683 def on_in(_, _, _); end # source://prism//lib/prism/translation/ripper.rb#681 def on_int(_); end # source://prism//lib/prism/translation/ripper.rb#681 def on_ivar(_); end # source://prism//lib/prism/translation/ripper.rb#681 def on_kw(_); end # source://prism//lib/prism/translation/ripper.rb#681 def on_kwrest_param(_); end # source://prism//lib/prism/translation/ripper.rb#681 def on_label(_); end # source://prism//lib/prism/translation/ripper.rb#681 def on_label_end(_); end # source://prism//lib/prism/translation/ripper.rb#682 def on_lambda(_, _); end # source://prism//lib/prism/translation/ripper.rb#681 def on_lbrace(_); end # source://prism//lib/prism/translation/ripper.rb#681 def on_lbracket(_); end # source://prism//lib/prism/translation/ripper.rb#681 def on_lparen(_); end # source://prism//lib/prism/translation/ripper.rb#682 def on_magic_comment(_, _); end # source://prism//lib/prism/translation/ripper.rb#682 def on_massign(_, _); end # source://prism//lib/prism/translation/ripper.rb#682 def on_method_add_arg(_, _); end # source://prism//lib/prism/translation/ripper.rb#682 def on_method_add_block(_, _); end # source://prism//lib/prism/translation/ripper.rb#682 def on_mlhs_add(_, _); end # source://prism//lib/prism/translation/ripper.rb#682 def on_mlhs_add_post(_, _); end # source://prism//lib/prism/translation/ripper.rb#682 def on_mlhs_add_star(_, _); end # source://prism//lib/prism/translation/ripper.rb#680 def on_mlhs_new; end # source://prism//lib/prism/translation/ripper.rb#681 def on_mlhs_paren(_); end # source://prism//lib/prism/translation/ripper.rb#682 def on_module(_, _); end # source://prism//lib/prism/translation/ripper.rb#682 def on_mrhs_add(_, _); end # source://prism//lib/prism/translation/ripper.rb#682 def on_mrhs_add_star(_, _); end # source://prism//lib/prism/translation/ripper.rb#680 def on_mrhs_new; end # source://prism//lib/prism/translation/ripper.rb#681 def on_mrhs_new_from_args(_); end # source://prism//lib/prism/translation/ripper.rb#681 def on_next(_); end # source://prism//lib/prism/translation/ripper.rb#681 def on_nl(_); end # source://prism//lib/prism/translation/ripper.rb#681 def on_nokw_param(_); end # source://prism//lib/prism/translation/ripper.rb#681 def on_op(_); end # source://prism//lib/prism/translation/ripper.rb#683 def on_opassign(_, _, _); end # source://prism//lib/prism/translation/ripper.rb#682 def on_operator_ambiguous(_, _); end # source://prism//lib/prism/translation/ripper.rb#682 def on_param_error(_, _); end # source://prism//lib/prism/translation/ripper.rb#686 def on_params(_, _, _, _, _, _, _); end # source://prism//lib/prism/translation/ripper.rb#681 def on_paren(_); end # source://prism//lib/prism/translation/ripper.rb#681 def on_parse_error(_); end # source://prism//lib/prism/translation/ripper.rb#681 def on_period(_); end # source://prism//lib/prism/translation/ripper.rb#681 def on_program(_); end # source://prism//lib/prism/translation/ripper.rb#682 def on_qsymbols_add(_, _); end # source://prism//lib/prism/translation/ripper.rb#681 def on_qsymbols_beg(_); end # source://prism//lib/prism/translation/ripper.rb#680 def on_qsymbols_new; end # source://prism//lib/prism/translation/ripper.rb#682 def on_qwords_add(_, _); end # source://prism//lib/prism/translation/ripper.rb#681 def on_qwords_beg(_); end # source://prism//lib/prism/translation/ripper.rb#680 def on_qwords_new; end # source://prism//lib/prism/translation/ripper.rb#681 def on_rational(_); end # source://prism//lib/prism/translation/ripper.rb#681 def on_rbrace(_); end # source://prism//lib/prism/translation/ripper.rb#681 def on_rbracket(_); end # source://prism//lib/prism/translation/ripper.rb#680 def on_redo; end # source://prism//lib/prism/translation/ripper.rb#682 def on_regexp_add(_, _); end # source://prism//lib/prism/translation/ripper.rb#681 def on_regexp_beg(_); end # source://prism//lib/prism/translation/ripper.rb#681 def on_regexp_end(_); end # source://prism//lib/prism/translation/ripper.rb#682 def on_regexp_literal(_, _); end # source://prism//lib/prism/translation/ripper.rb#680 def on_regexp_new; end # source://prism//lib/prism/translation/ripper.rb#684 def on_rescue(_, _, _, _); end # source://prism//lib/prism/translation/ripper.rb#682 def on_rescue_mod(_, _); end # source://prism//lib/prism/translation/ripper.rb#681 def on_rest_param(_); end # source://prism//lib/prism/translation/ripper.rb#680 def on_retry; end # source://prism//lib/prism/translation/ripper.rb#681 def on_return(_); end # source://prism//lib/prism/translation/ripper.rb#680 def on_return0; end # source://prism//lib/prism/translation/ripper.rb#681 def on_rparen(_); end # source://prism//lib/prism/translation/ripper.rb#682 def on_sclass(_, _); end # source://prism//lib/prism/translation/ripper.rb#681 def on_semicolon(_); end # source://prism//lib/prism/translation/ripper.rb#681 def on_sp(_); end # source://prism//lib/prism/translation/ripper.rb#682 def on_stmts_add(_, _); end # source://prism//lib/prism/translation/ripper.rb#680 def on_stmts_new; end # source://prism//lib/prism/translation/ripper.rb#682 def on_string_add(_, _); end # source://prism//lib/prism/translation/ripper.rb#682 def on_string_concat(_, _); end # source://prism//lib/prism/translation/ripper.rb#680 def on_string_content; end # source://prism//lib/prism/translation/ripper.rb#681 def on_string_dvar(_); end # source://prism//lib/prism/translation/ripper.rb#681 def on_string_embexpr(_); end # source://prism//lib/prism/translation/ripper.rb#681 def on_string_literal(_); end # source://prism//lib/prism/translation/ripper.rb#681 def on_super(_); end # source://prism//lib/prism/translation/ripper.rb#681 def on_symbeg(_); end # source://prism//lib/prism/translation/ripper.rb#681 def on_symbol(_); end # source://prism//lib/prism/translation/ripper.rb#681 def on_symbol_literal(_); end # source://prism//lib/prism/translation/ripper.rb#682 def on_symbols_add(_, _); end # source://prism//lib/prism/translation/ripper.rb#681 def on_symbols_beg(_); end # source://prism//lib/prism/translation/ripper.rb#680 def on_symbols_new; end # source://prism//lib/prism/translation/ripper.rb#681 def on_tlambda(_); end # source://prism//lib/prism/translation/ripper.rb#681 def on_tlambeg(_); end # source://prism//lib/prism/translation/ripper.rb#681 def on_top_const_field(_); end # source://prism//lib/prism/translation/ripper.rb#681 def on_top_const_ref(_); end # source://prism//lib/prism/translation/ripper.rb#681 def on_tstring_beg(_); end # source://prism//lib/prism/translation/ripper.rb#681 def on_tstring_content(_); end # source://prism//lib/prism/translation/ripper.rb#681 def on_tstring_end(_); end # source://prism//lib/prism/translation/ripper.rb#682 def on_unary(_, _); end # source://prism//lib/prism/translation/ripper.rb#681 def on_undef(_); end # source://prism//lib/prism/translation/ripper.rb#683 def on_unless(_, _, _); end # source://prism//lib/prism/translation/ripper.rb#682 def on_unless_mod(_, _); end # source://prism//lib/prism/translation/ripper.rb#682 def on_until(_, _); end # source://prism//lib/prism/translation/ripper.rb#682 def on_until_mod(_, _); end # source://prism//lib/prism/translation/ripper.rb#682 def on_var_alias(_, _); end # source://prism//lib/prism/translation/ripper.rb#681 def on_var_field(_); end # source://prism//lib/prism/translation/ripper.rb#681 def on_var_ref(_); end # source://prism//lib/prism/translation/ripper.rb#681 def on_vcall(_); end # source://prism//lib/prism/translation/ripper.rb#680 def on_void_stmt; end # source://prism//lib/prism/translation/ripper.rb#683 def on_when(_, _, _); end # source://prism//lib/prism/translation/ripper.rb#682 def on_while(_, _); end # source://prism//lib/prism/translation/ripper.rb#682 def on_while_mod(_, _); end # source://prism//lib/prism/translation/ripper.rb#682 def on_word_add(_, _); end # source://prism//lib/prism/translation/ripper.rb#680 def on_word_new; end # source://prism//lib/prism/translation/ripper.rb#682 def on_words_add(_, _); end # source://prism//lib/prism/translation/ripper.rb#681 def on_words_beg(_); end # source://prism//lib/prism/translation/ripper.rb#680 def on_words_new; end # source://prism//lib/prism/translation/ripper.rb#681 def on_words_sep(_); end # source://prism//lib/prism/translation/ripper.rb#682 def on_xstring_add(_, _); end # source://prism//lib/prism/translation/ripper.rb#681 def on_xstring_literal(_); end # source://prism//lib/prism/translation/ripper.rb#680 def on_xstring_new; end # source://prism//lib/prism/translation/ripper.rb#681 def on_yield(_); end # source://prism//lib/prism/translation/ripper.rb#680 def on_yield0; end # source://prism//lib/prism/translation/ripper.rb#680 def on_zsuper; end # Lazily initialize the parse result. # # source://prism//lib/prism/translation/ripper.rb#676 def result; end # In Prism this is a CallNode with :[]= as the operator. # In Ripper it's an :aref_field. # # source://prism//lib/prism/translation/ripper.rb#521 def visit_aref_field_node(node); end # In Prism this is a CallNode with :[] as the operator. # In Ripper it's an :aref. # # source://prism//lib/prism/translation/ripper.rb#513 def visit_aref_node(node); end # Visit an operation-and-assign node, such as +=. # # source://prism//lib/prism/translation/ripper.rb#501 def visit_binary_op_assign(node, operator: T.unsafe(nil)); end # Visit a binary operator node like an AndNode or OrNode # # source://prism//lib/prism/translation/ripper.rb#652 def visit_binary_operator(node); end # Visit a list of elements, like the elements of an array or arguments. # # source://prism//lib/prism/translation/ripper.rb#474 def visit_elements(elements); end # Visit an InterpolatedStringNode or an InterpolatedSymbolNode node. # # source://prism//lib/prism/translation/ripper.rb#482 def visit_enumerated_node(node); end # Generate Ripper events for a CallNode with no opening_loc # # source://prism//lib/prism/translation/ripper.rb#410 def visit_no_paren_call(node); end # Visit a node that represents a number. We need to explicitly handle the # unary - operator. # # source://prism//lib/prism/translation/ripper.rb#611 def visit_number(node); end # Ripper has several methods of emitting a symbol literal. Inside an alias # sometimes it suppresses the [:symbol] wrapper around ident. If the symbol # is also the name of a keyword (e.g. :if) it will emit a :@kw wrapper, not # an :@ident wrapper, with similar treatment for constants and operators. # # source://prism//lib/prism/translation/ripper.rb#580 def visit_symbol_literal_node(node, no_symbol_wrapper: T.unsafe(nil)); end # For most Rubies and JRuby after 9.4.6.0 this is a no-op. # # source://prism//lib/prism/translation/ripper.rb#634 def visit_unary_operator(value); end class << self # This is a convenience method that runs the SexpBuilderPP subclass parser. # # source://prism//lib/prism/translation/ripper.rb#403 def sexp(source); end # This is a convenience method that runs the SexpBuilder subclass parser. # # source://prism//lib/prism/translation/ripper.rb#398 def sexp_raw(source); end end end # In an alias statement Ripper will emit @kw instead of @ident if the object # being aliased is a Ruby keyword. For instance, in the line "alias :foo :if", # the :if is treated as a lexer keyword. So we need to know what symbols are # also keywords. # # source://prism//lib/prism/translation/ripper.rb#532 Prism::Translation::Ripper::RUBY_KEYWORDS = T.let(T.unsafe(nil), Array) # This class mirrors the ::Ripper::SexpBuilder subclass of ::Ripper that # returns the arrays of [type, *children]. # # source://prism//lib/prism/translation/ripper.rb#24 class Prism::Translation::Ripper::SexpBuilder < ::Prism::Translation::Ripper private # source://prism//lib/prism/translation/ripper.rb#28 def on_BEGIN(*args); end # source://prism//lib/prism/translation/ripper.rb#34 def on_CHAR(value); end # source://prism//lib/prism/translation/ripper.rb#28 def on_END(*args); end # source://prism//lib/prism/translation/ripper.rb#34 def on___end__(value); end # source://prism//lib/prism/translation/ripper.rb#28 def on_alias(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_alias_error(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_aref(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_aref_field(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_arg_ambiguous(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_arg_paren(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_args_add(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_args_add_block(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_args_add_star(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_args_forward(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_args_new(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_array(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_aryptn(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_assign(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_assign_error(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_assoc_new(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_assoc_splat(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_assoclist_from_args(*args); end # source://prism//lib/prism/translation/ripper.rb#34 def on_backref(value); end # source://prism//lib/prism/translation/ripper.rb#34 def on_backtick(value); end # source://prism//lib/prism/translation/ripper.rb#28 def on_bare_assoc_hash(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_begin(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_binary(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_block_var(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_blockarg(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_bodystmt(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_brace_block(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_break(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_call(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_case(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_class(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_class_name_error(*args); end # source://prism//lib/prism/translation/ripper.rb#34 def on_comma(value); end # source://prism//lib/prism/translation/ripper.rb#28 def on_command(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_command_call(*args); end # source://prism//lib/prism/translation/ripper.rb#34 def on_comment(value); end # source://prism//lib/prism/translation/ripper.rb#34 def on_const(value); end # source://prism//lib/prism/translation/ripper.rb#28 def on_const_path_field(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_const_path_ref(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_const_ref(*args); end # source://prism//lib/prism/translation/ripper.rb#34 def on_cvar(value); end # source://prism//lib/prism/translation/ripper.rb#28 def on_def(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_defined(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_defs(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_do_block(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_dot2(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_dot3(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_dyna_symbol(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_else(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_elsif(*args); end # source://prism//lib/prism/translation/ripper.rb#34 def on_embdoc(value); end # source://prism//lib/prism/translation/ripper.rb#34 def on_embdoc_beg(value); end # source://prism//lib/prism/translation/ripper.rb#34 def on_embdoc_end(value); end # source://prism//lib/prism/translation/ripper.rb#34 def on_embexpr_beg(value); end # source://prism//lib/prism/translation/ripper.rb#34 def on_embexpr_end(value); end # source://prism//lib/prism/translation/ripper.rb#34 def on_embvar(value); end # source://prism//lib/prism/translation/ripper.rb#28 def on_ensure(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_excessed_comma(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_fcall(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_field(*args); end # source://prism//lib/prism/translation/ripper.rb#34 def on_float(value); end # source://prism//lib/prism/translation/ripper.rb#28 def on_fndptn(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_for(*args); end # source://prism//lib/prism/translation/ripper.rb#34 def on_gvar(value); end # source://prism//lib/prism/translation/ripper.rb#28 def on_hash(*args); end # source://prism//lib/prism/translation/ripper.rb#34 def on_heredoc_beg(value); end # source://prism//lib/prism/translation/ripper.rb#28 def on_heredoc_dedent(*args); end # source://prism//lib/prism/translation/ripper.rb#34 def on_heredoc_end(value); end # source://prism//lib/prism/translation/ripper.rb#28 def on_hshptn(*args); end # source://prism//lib/prism/translation/ripper.rb#34 def on_ident(value); end # source://prism//lib/prism/translation/ripper.rb#28 def on_if(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_if_mod(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_ifop(*args); end # source://prism//lib/prism/translation/ripper.rb#34 def on_ignored_nl(value); end # source://prism//lib/prism/translation/ripper.rb#34 def on_ignored_sp(value); end # source://prism//lib/prism/translation/ripper.rb#34 def on_imaginary(value); end # source://prism//lib/prism/translation/ripper.rb#28 def on_in(*args); end # source://prism//lib/prism/translation/ripper.rb#34 def on_int(value); end # source://prism//lib/prism/translation/ripper.rb#34 def on_ivar(value); end # source://prism//lib/prism/translation/ripper.rb#34 def on_kw(value); end # source://prism//lib/prism/translation/ripper.rb#28 def on_kwrest_param(*args); end # source://prism//lib/prism/translation/ripper.rb#34 def on_label(value); end # source://prism//lib/prism/translation/ripper.rb#34 def on_label_end(value); end # source://prism//lib/prism/translation/ripper.rb#28 def on_lambda(*args); end # source://prism//lib/prism/translation/ripper.rb#34 def on_lbrace(value); end # source://prism//lib/prism/translation/ripper.rb#34 def on_lbracket(value); end # source://prism//lib/prism/translation/ripper.rb#34 def on_lparen(value); end # source://prism//lib/prism/translation/ripper.rb#28 def on_magic_comment(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_massign(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_method_add_arg(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_method_add_block(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_mlhs_add(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_mlhs_add_post(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_mlhs_add_star(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_mlhs_new(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_mlhs_paren(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_module(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_mrhs_add(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_mrhs_add_star(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_mrhs_new(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_mrhs_new_from_args(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_next(*args); end # source://prism//lib/prism/translation/ripper.rb#34 def on_nl(value); end # source://prism//lib/prism/translation/ripper.rb#28 def on_nokw_param(*args); end # source://prism//lib/prism/translation/ripper.rb#34 def on_op(value); end # source://prism//lib/prism/translation/ripper.rb#28 def on_opassign(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_operator_ambiguous(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_param_error(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_params(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_paren(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_parse_error(*args); end # source://prism//lib/prism/translation/ripper.rb#34 def on_period(value); end # source://prism//lib/prism/translation/ripper.rb#28 def on_program(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_qsymbols_add(*args); end # source://prism//lib/prism/translation/ripper.rb#34 def on_qsymbols_beg(value); end # source://prism//lib/prism/translation/ripper.rb#28 def on_qsymbols_new(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_qwords_add(*args); end # source://prism//lib/prism/translation/ripper.rb#34 def on_qwords_beg(value); end # source://prism//lib/prism/translation/ripper.rb#28 def on_qwords_new(*args); end # source://prism//lib/prism/translation/ripper.rb#34 def on_rational(value); end # source://prism//lib/prism/translation/ripper.rb#34 def on_rbrace(value); end # source://prism//lib/prism/translation/ripper.rb#34 def on_rbracket(value); end # source://prism//lib/prism/translation/ripper.rb#28 def on_redo(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_regexp_add(*args); end # source://prism//lib/prism/translation/ripper.rb#34 def on_regexp_beg(value); end # source://prism//lib/prism/translation/ripper.rb#34 def on_regexp_end(value); end # source://prism//lib/prism/translation/ripper.rb#28 def on_regexp_literal(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_regexp_new(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_rescue(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_rescue_mod(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_rest_param(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_retry(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_return(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_return0(*args); end # source://prism//lib/prism/translation/ripper.rb#34 def on_rparen(value); end # source://prism//lib/prism/translation/ripper.rb#28 def on_sclass(*args); end # source://prism//lib/prism/translation/ripper.rb#34 def on_semicolon(value); end # source://prism//lib/prism/translation/ripper.rb#34 def on_sp(value); end # source://prism//lib/prism/translation/ripper.rb#28 def on_stmts_add(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_stmts_new(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_string_add(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_string_concat(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_string_content(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_string_dvar(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_string_embexpr(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_string_literal(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_super(*args); end # source://prism//lib/prism/translation/ripper.rb#34 def on_symbeg(value); end # source://prism//lib/prism/translation/ripper.rb#28 def on_symbol(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_symbol_literal(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_symbols_add(*args); end # source://prism//lib/prism/translation/ripper.rb#34 def on_symbols_beg(value); end # source://prism//lib/prism/translation/ripper.rb#28 def on_symbols_new(*args); end # source://prism//lib/prism/translation/ripper.rb#34 def on_tlambda(value); end # source://prism//lib/prism/translation/ripper.rb#34 def on_tlambeg(value); end # source://prism//lib/prism/translation/ripper.rb#28 def on_top_const_field(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_top_const_ref(*args); end # source://prism//lib/prism/translation/ripper.rb#34 def on_tstring_beg(value); end # source://prism//lib/prism/translation/ripper.rb#34 def on_tstring_content(value); end # source://prism//lib/prism/translation/ripper.rb#34 def on_tstring_end(value); end # source://prism//lib/prism/translation/ripper.rb#28 def on_unary(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_undef(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_unless(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_unless_mod(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_until(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_until_mod(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_var_alias(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_var_field(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_var_ref(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_vcall(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_void_stmt(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_when(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_while(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_while_mod(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_word_add(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_word_new(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_words_add(*args); end # source://prism//lib/prism/translation/ripper.rb#34 def on_words_beg(value); end # source://prism//lib/prism/translation/ripper.rb#28 def on_words_new(*args); end # source://prism//lib/prism/translation/ripper.rb#34 def on_words_sep(value); end # source://prism//lib/prism/translation/ripper.rb#28 def on_xstring_add(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_xstring_literal(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_xstring_new(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_yield(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_yield0(*args); end # source://prism//lib/prism/translation/ripper.rb#28 def on_zsuper(*args); end end # This class mirrors the ::Ripper::SexpBuilderPP subclass of ::Ripper that # returns the same values as ::Ripper::SexpBuilder except with a couple of # niceties that flatten linked lists into arrays. # # source://prism//lib/prism/translation/ripper.rb#43 class Prism::Translation::Ripper::SexpBuilderPP < ::Prism::Translation::Ripper::SexpBuilder private # source://prism//lib/prism/translation/ripper.rb#46 def _dispatch_event_new; end # source://prism//lib/prism/translation/ripper.rb#50 def _dispatch_event_push(list, item); end # source://prism//lib/prism/translation/ripper.rb#50 def on_args_add(list, item); end # source://prism//lib/prism/translation/ripper.rb#46 def on_args_new; end # source://prism//lib/prism/translation/ripper.rb#50 def on_mlhs_add(list, item); end # source://prism//lib/prism/translation/ripper.rb#46 def on_mlhs_new; end # source://prism//lib/prism/translation/ripper.rb#50 def on_mrhs_add(list, item); end # source://prism//lib/prism/translation/ripper.rb#46 def on_mrhs_new; end # source://prism//lib/prism/translation/ripper.rb#50 def on_qsymbols_add(list, item); end # source://prism//lib/prism/translation/ripper.rb#46 def on_qsymbols_new; end # source://prism//lib/prism/translation/ripper.rb#50 def on_qwords_add(list, item); end # source://prism//lib/prism/translation/ripper.rb#46 def on_qwords_new; end # source://prism//lib/prism/translation/ripper.rb#50 def on_regexp_add(list, item); end # source://prism//lib/prism/translation/ripper.rb#46 def on_regexp_new; end # source://prism//lib/prism/translation/ripper.rb#50 def on_stmts_add(list, item); end # source://prism//lib/prism/translation/ripper.rb#46 def on_stmts_new; end # source://prism//lib/prism/translation/ripper.rb#50 def on_string_add(list, item); end # source://prism//lib/prism/translation/ripper.rb#50 def on_symbols_add(list, item); end # source://prism//lib/prism/translation/ripper.rb#46 def on_symbols_new; end # source://prism//lib/prism/translation/ripper.rb#50 def on_word_add(list, item); end # source://prism//lib/prism/translation/ripper.rb#46 def on_word_new; end # source://prism//lib/prism/translation/ripper.rb#50 def on_words_add(list, item); end # source://prism//lib/prism/translation/ripper.rb#46 def on_words_new; end # source://prism//lib/prism/translation/ripper.rb#50 def on_xstring_add(list, item); end # source://prism//lib/prism/translation/ripper.rb#46 def on_xstring_new; end end # Represents the use of the literal `true` keyword. # # true # ^^^^ # # source://prism//lib/prism/node.rb#18140 class Prism::TrueNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [TrueNode] a new instance of TrueNode # # source://prism//lib/prism/node.rb#18141 def initialize(source, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#18148 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#18153 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#18163 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#18158 def compact_child_nodes; end # def copy: (**params) -> TrueNode # # source://prism//lib/prism/node.rb#18168 sig { params(params: T.untyped).returns(Prism::TrueNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#18153 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } # # source://prism//lib/prism/node.rb#18179 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#18185 def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#18204 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#18214 def type; end end end # Represents the use of the `undef` keyword. # # undef :foo, :bar, :baz # ^^^^^^^^^^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#18224 class Prism::UndefNode < ::Prism::Node # def initialize: (Array[Node] names, Location keyword_loc, Location location) -> void # # @return [UndefNode] a new instance of UndefNode # # source://prism//lib/prism/node.rb#18225 def initialize(source, names, keyword_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#18234 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#18239 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#18249 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#18244 def compact_child_nodes; end # def copy: (**params) -> UndefNode # # source://prism//lib/prism/node.rb#18254 sig { params(params: T.untyped).returns(Prism::UndefNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#18239 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { names: Array[Node], keyword_loc: Location, location: Location } # # source://prism//lib/prism/node.rb#18267 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#18287 def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # # source://prism//lib/prism/node.rb#18282 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # # source://prism//lib/prism/node.rb#18275 sig { returns(Prism::Location) } def keyword_loc; end # attr_reader names: Array[Node] # # source://prism//lib/prism/node.rb#18272 sig { returns(T::Array[Prism::Node]) } def names; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#18308 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#18318 def type; end end end # Represents the use of the `unless` keyword, either in the block form or the modifier form. # # bar unless foo # ^^^^^^^^^^^^^^ # # unless foo then bar end # ^^^^^^^^^^^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#18331 class Prism::UnlessNode < ::Prism::Node # def initialize: (Location keyword_loc, Node predicate, Location? then_keyword_loc, StatementsNode? statements, ElseNode? consequent, Location? end_keyword_loc, Location location) -> void # # @return [UnlessNode] a new instance of UnlessNode # # source://prism//lib/prism/node.rb#18332 def initialize(source, keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#18345 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#18354 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#18368 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#18359 def compact_child_nodes; end # attr_reader consequent: ElseNode? # # source://prism//lib/prism/node.rb#18419 sig { returns(T.nilable(Prism::ElseNode)) } def consequent; end # def copy: (**params) -> UnlessNode # # source://prism//lib/prism/node.rb#18373 sig { params(params: T.untyped).returns(Prism::UnlessNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#18354 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, predicate: Node, then_keyword_loc: Location?, statements: StatementsNode?, consequent: ElseNode?, end_keyword_loc: Location?, location: Location } # # source://prism//lib/prism/node.rb#18390 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def end_keyword: () -> String? # # source://prism//lib/prism/node.rb#18445 sig { returns(T.nilable(String)) } def end_keyword; end # attr_reader end_keyword_loc: Location? # # source://prism//lib/prism/node.rb#18422 sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#18450 def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # # source://prism//lib/prism/node.rb#18435 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # # source://prism//lib/prism/node.rb#18395 sig { returns(Prism::Location) } def keyword_loc; end # attr_reader predicate: Node # # source://prism//lib/prism/node.rb#18401 sig { returns(Prism::Node) } def predicate; end # source://prism//lib/prism/node.rb#18349 def set_newline_flag(newline_marked); end # attr_reader statements: StatementsNode? # # source://prism//lib/prism/node.rb#18416 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # def then_keyword: () -> String? # # source://prism//lib/prism/node.rb#18440 sig { returns(T.nilable(String)) } def then_keyword; end # attr_reader then_keyword_loc: Location? # # source://prism//lib/prism/node.rb#18404 sig { returns(T.nilable(Prism::Location)) } def then_keyword_loc; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#18486 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#18496 def type; end end end # Represents the use of the `until` keyword, either in the block form or the modifier form. # # bar until foo # ^^^^^^^^^^^^^ # # until foo do bar end # ^^^^^^^^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#18509 class Prism::UntilNode < ::Prism::Node # def initialize: (Integer flags, Location keyword_loc, Location? closing_loc, Node predicate, StatementsNode? statements, Location location) -> void # # @return [UntilNode] a new instance of UntilNode # # source://prism//lib/prism/node.rb#18510 def initialize(source, flags, keyword_loc, closing_loc, predicate, statements, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#18522 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def begin_modifier?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#18599 sig { returns(T::Boolean) } def begin_modifier?; end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#18531 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # # source://prism//lib/prism/node.rb#18609 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # # source://prism//lib/prism/node.rb#18580 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#18544 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#18536 def compact_child_nodes; end # def copy: (**params) -> UntilNode # # source://prism//lib/prism/node.rb#18549 sig { params(params: T.untyped).returns(Prism::UntilNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#18531 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, keyword_loc: Location, closing_loc: Location?, predicate: Node, statements: StatementsNode?, location: Location } # # source://prism//lib/prism/node.rb#18565 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#18614 def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # # source://prism//lib/prism/node.rb#18604 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # # source://prism//lib/prism/node.rb#18574 sig { returns(Prism::Location) } def keyword_loc; end # attr_reader predicate: Node # # source://prism//lib/prism/node.rb#18592 sig { returns(Prism::Node) } def predicate; end # source://prism//lib/prism/node.rb#18526 def set_newline_flag(newline_marked); end # attr_reader statements: StatementsNode? # # source://prism//lib/prism/node.rb#18595 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#18645 def type; end private # private attr_reader flags: Integer # # source://prism//lib/prism/node.rb#18570 sig { returns(Integer) } def flags; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#18655 def type; end end end # The version constant is set by reading the result of calling pm_version. Prism::VERSION = T.let(T.unsafe(nil), String) # A visitor is a class that provides a default implementation for every accept # method defined on the nodes. This means it can walk a tree without the # caller needing to define any special handling. This allows you to handle a # subset of the tree, while still walking the whole tree. # # For example, to find all of the method calls that call the `foo` method, you # could write: # # class FooCalls < Prism::Visitor # def visit_call_node(node) # if node.name == "foo" # # Do something with the node # end # # # Call super so that the visitor continues walking the tree # super # end # end # # source://prism//lib/prism/visitor.rb#51 class Prism::Visitor < ::Prism::BasicVisitor # Visit a AliasGlobalVariableNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::AliasGlobalVariableNode).void } def visit_alias_global_variable_node(node); end # Visit a AliasMethodNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::AliasMethodNode).void } def visit_alias_method_node(node); end # Visit a AlternationPatternNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::AlternationPatternNode).void } def visit_alternation_pattern_node(node); end # Visit a AndNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::AndNode).void } def visit_and_node(node); end # Visit a ArgumentsNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::ArgumentsNode).void } def visit_arguments_node(node); end # Visit a ArrayNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::ArrayNode).void } def visit_array_node(node); end # Visit a ArrayPatternNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::ArrayPatternNode).void } def visit_array_pattern_node(node); end # Visit a AssocNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::AssocNode).void } def visit_assoc_node(node); end # Visit a AssocSplatNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::AssocSplatNode).void } def visit_assoc_splat_node(node); end # Visit a BackReferenceReadNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::BackReferenceReadNode).void } def visit_back_reference_read_node(node); end # Visit a BeginNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::BeginNode).void } def visit_begin_node(node); end # Visit a BlockArgumentNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::BlockArgumentNode).void } def visit_block_argument_node(node); end # Visit a BlockLocalVariableNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::BlockLocalVariableNode).void } def visit_block_local_variable_node(node); end # Visit a BlockNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::BlockNode).void } def visit_block_node(node); end # Visit a BlockParameterNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::BlockParameterNode).void } def visit_block_parameter_node(node); end # Visit a BlockParametersNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::BlockParametersNode).void } def visit_block_parameters_node(node); end # Visit a BreakNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::BreakNode).void } def visit_break_node(node); end # Visit a CallAndWriteNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::CallAndWriteNode).void } def visit_call_and_write_node(node); end # Visit a CallNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::CallNode).void } def visit_call_node(node); end # Visit a CallOperatorWriteNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::CallOperatorWriteNode).void } def visit_call_operator_write_node(node); end # Visit a CallOrWriteNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::CallOrWriteNode).void } def visit_call_or_write_node(node); end # Visit a CallTargetNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::CallTargetNode).void } def visit_call_target_node(node); end # Visit a CapturePatternNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::CapturePatternNode).void } def visit_capture_pattern_node(node); end # Visit a CaseMatchNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::CaseMatchNode).void } def visit_case_match_node(node); end # Visit a CaseNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::CaseNode).void } def visit_case_node(node); end # Visit a ClassNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::ClassNode).void } def visit_class_node(node); end # Visit a ClassVariableAndWriteNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::ClassVariableAndWriteNode).void } def visit_class_variable_and_write_node(node); end # Visit a ClassVariableOperatorWriteNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::ClassVariableOperatorWriteNode).void } def visit_class_variable_operator_write_node(node); end # Visit a ClassVariableOrWriteNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::ClassVariableOrWriteNode).void } def visit_class_variable_or_write_node(node); end # Visit a ClassVariableReadNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::ClassVariableReadNode).void } def visit_class_variable_read_node(node); end # Visit a ClassVariableTargetNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::ClassVariableTargetNode).void } def visit_class_variable_target_node(node); end # Visit a ClassVariableWriteNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::ClassVariableWriteNode).void } def visit_class_variable_write_node(node); end # Visit a ConstantAndWriteNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::ConstantAndWriteNode).void } def visit_constant_and_write_node(node); end # Visit a ConstantOperatorWriteNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::ConstantOperatorWriteNode).void } def visit_constant_operator_write_node(node); end # Visit a ConstantOrWriteNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::ConstantOrWriteNode).void } def visit_constant_or_write_node(node); end # Visit a ConstantPathAndWriteNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::ConstantPathAndWriteNode).void } def visit_constant_path_and_write_node(node); end # Visit a ConstantPathNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::ConstantPathNode).void } def visit_constant_path_node(node); end # Visit a ConstantPathOperatorWriteNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::ConstantPathOperatorWriteNode).void } def visit_constant_path_operator_write_node(node); end # Visit a ConstantPathOrWriteNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::ConstantPathOrWriteNode).void } def visit_constant_path_or_write_node(node); end # Visit a ConstantPathTargetNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::ConstantPathTargetNode).void } def visit_constant_path_target_node(node); end # Visit a ConstantPathWriteNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::ConstantPathWriteNode).void } def visit_constant_path_write_node(node); end # Visit a ConstantReadNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::ConstantReadNode).void } def visit_constant_read_node(node); end # Visit a ConstantTargetNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::ConstantTargetNode).void } def visit_constant_target_node(node); end # Visit a ConstantWriteNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::ConstantWriteNode).void } def visit_constant_write_node(node); end # Visit a DefNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::DefNode).void } def visit_def_node(node); end # Visit a DefinedNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::DefinedNode).void } def visit_defined_node(node); end # Visit a ElseNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::ElseNode).void } def visit_else_node(node); end # Visit a EmbeddedStatementsNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::EmbeddedStatementsNode).void } def visit_embedded_statements_node(node); end # Visit a EmbeddedVariableNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::EmbeddedVariableNode).void } def visit_embedded_variable_node(node); end # Visit a EnsureNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::EnsureNode).void } def visit_ensure_node(node); end # Visit a FalseNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::FalseNode).void } def visit_false_node(node); end # Visit a FindPatternNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::FindPatternNode).void } def visit_find_pattern_node(node); end # Visit a FlipFlopNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::FlipFlopNode).void } def visit_flip_flop_node(node); end # Visit a FloatNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::FloatNode).void } def visit_float_node(node); end # Visit a ForNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::ForNode).void } def visit_for_node(node); end # Visit a ForwardingArgumentsNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::ForwardingArgumentsNode).void } def visit_forwarding_arguments_node(node); end # Visit a ForwardingParameterNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::ForwardingParameterNode).void } def visit_forwarding_parameter_node(node); end # Visit a ForwardingSuperNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::ForwardingSuperNode).void } def visit_forwarding_super_node(node); end # Visit a GlobalVariableAndWriteNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::GlobalVariableAndWriteNode).void } def visit_global_variable_and_write_node(node); end # Visit a GlobalVariableOperatorWriteNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::GlobalVariableOperatorWriteNode).void } def visit_global_variable_operator_write_node(node); end # Visit a GlobalVariableOrWriteNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::GlobalVariableOrWriteNode).void } def visit_global_variable_or_write_node(node); end # Visit a GlobalVariableReadNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::GlobalVariableReadNode).void } def visit_global_variable_read_node(node); end # Visit a GlobalVariableTargetNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::GlobalVariableTargetNode).void } def visit_global_variable_target_node(node); end # Visit a GlobalVariableWriteNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::GlobalVariableWriteNode).void } def visit_global_variable_write_node(node); end # Visit a HashNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::HashNode).void } def visit_hash_node(node); end # Visit a HashPatternNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::HashPatternNode).void } def visit_hash_pattern_node(node); end # Visit a IfNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::IfNode).void } def visit_if_node(node); end # Visit a ImaginaryNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::ImaginaryNode).void } def visit_imaginary_node(node); end # Visit a ImplicitNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::ImplicitNode).void } def visit_implicit_node(node); end # Visit a ImplicitRestNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::ImplicitRestNode).void } def visit_implicit_rest_node(node); end # Visit a InNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::InNode).void } def visit_in_node(node); end # Visit a IndexAndWriteNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::IndexAndWriteNode).void } def visit_index_and_write_node(node); end # Visit a IndexOperatorWriteNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::IndexOperatorWriteNode).void } def visit_index_operator_write_node(node); end # Visit a IndexOrWriteNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::IndexOrWriteNode).void } def visit_index_or_write_node(node); end # Visit a IndexTargetNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::IndexTargetNode).void } def visit_index_target_node(node); end # Visit a InstanceVariableAndWriteNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::InstanceVariableAndWriteNode).void } def visit_instance_variable_and_write_node(node); end # Visit a InstanceVariableOperatorWriteNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::InstanceVariableOperatorWriteNode).void } def visit_instance_variable_operator_write_node(node); end # Visit a InstanceVariableOrWriteNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::InstanceVariableOrWriteNode).void } def visit_instance_variable_or_write_node(node); end # Visit a InstanceVariableReadNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::InstanceVariableReadNode).void } def visit_instance_variable_read_node(node); end # Visit a InstanceVariableTargetNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::InstanceVariableTargetNode).void } def visit_instance_variable_target_node(node); end # Visit a InstanceVariableWriteNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::InstanceVariableWriteNode).void } def visit_instance_variable_write_node(node); end # Visit a IntegerNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::IntegerNode).void } def visit_integer_node(node); end # Visit a InterpolatedMatchLastLineNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::InterpolatedMatchLastLineNode).void } def visit_interpolated_match_last_line_node(node); end # Visit a InterpolatedRegularExpressionNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::InterpolatedRegularExpressionNode).void } def visit_interpolated_regular_expression_node(node); end # Visit a InterpolatedStringNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::InterpolatedStringNode).void } def visit_interpolated_string_node(node); end # Visit a InterpolatedSymbolNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::InterpolatedSymbolNode).void } def visit_interpolated_symbol_node(node); end # Visit a InterpolatedXStringNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::InterpolatedXStringNode).void } def visit_interpolated_x_string_node(node); end # Visit a KeywordHashNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::KeywordHashNode).void } def visit_keyword_hash_node(node); end # Visit a KeywordRestParameterNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::KeywordRestParameterNode).void } def visit_keyword_rest_parameter_node(node); end # Visit a LambdaNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::LambdaNode).void } def visit_lambda_node(node); end # Visit a LocalVariableAndWriteNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::LocalVariableAndWriteNode).void } def visit_local_variable_and_write_node(node); end # Visit a LocalVariableOperatorWriteNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::LocalVariableOperatorWriteNode).void } def visit_local_variable_operator_write_node(node); end # Visit a LocalVariableOrWriteNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::LocalVariableOrWriteNode).void } def visit_local_variable_or_write_node(node); end # Visit a LocalVariableReadNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::LocalVariableReadNode).void } def visit_local_variable_read_node(node); end # Visit a LocalVariableTargetNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::LocalVariableTargetNode).void } def visit_local_variable_target_node(node); end # Visit a LocalVariableWriteNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::LocalVariableWriteNode).void } def visit_local_variable_write_node(node); end # Visit a MatchLastLineNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::MatchLastLineNode).void } def visit_match_last_line_node(node); end # Visit a MatchPredicateNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::MatchPredicateNode).void } def visit_match_predicate_node(node); end # Visit a MatchRequiredNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::MatchRequiredNode).void } def visit_match_required_node(node); end # Visit a MatchWriteNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::MatchWriteNode).void } def visit_match_write_node(node); end # Visit a MissingNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::MissingNode).void } def visit_missing_node(node); end # Visit a ModuleNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::ModuleNode).void } def visit_module_node(node); end # Visit a MultiTargetNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::MultiTargetNode).void } def visit_multi_target_node(node); end # Visit a MultiWriteNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::MultiWriteNode).void } def visit_multi_write_node(node); end # Visit a NextNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::NextNode).void } def visit_next_node(node); end # Visit a NilNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::NilNode).void } def visit_nil_node(node); end # Visit a NoKeywordsParameterNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::NoKeywordsParameterNode).void } def visit_no_keywords_parameter_node(node); end # Visit a NumberedParametersNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::NumberedParametersNode).void } def visit_numbered_parameters_node(node); end # Visit a NumberedReferenceReadNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::NumberedReferenceReadNode).void } def visit_numbered_reference_read_node(node); end # Visit a OptionalKeywordParameterNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::OptionalKeywordParameterNode).void } def visit_optional_keyword_parameter_node(node); end # Visit a OptionalParameterNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::OptionalParameterNode).void } def visit_optional_parameter_node(node); end # Visit a OrNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::OrNode).void } def visit_or_node(node); end # Visit a ParametersNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::ParametersNode).void } def visit_parameters_node(node); end # Visit a ParenthesesNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::ParenthesesNode).void } def visit_parentheses_node(node); end # Visit a PinnedExpressionNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::PinnedExpressionNode).void } def visit_pinned_expression_node(node); end # Visit a PinnedVariableNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::PinnedVariableNode).void } def visit_pinned_variable_node(node); end # Visit a PostExecutionNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::PostExecutionNode).void } def visit_post_execution_node(node); end # Visit a PreExecutionNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::PreExecutionNode).void } def visit_pre_execution_node(node); end # Visit a ProgramNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::ProgramNode).void } def visit_program_node(node); end # Visit a RangeNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::RangeNode).void } def visit_range_node(node); end # Visit a RationalNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::RationalNode).void } def visit_rational_node(node); end # Visit a RedoNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::RedoNode).void } def visit_redo_node(node); end # Visit a RegularExpressionNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::RegularExpressionNode).void } def visit_regular_expression_node(node); end # Visit a RequiredKeywordParameterNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::RequiredKeywordParameterNode).void } def visit_required_keyword_parameter_node(node); end # Visit a RequiredParameterNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::RequiredParameterNode).void } def visit_required_parameter_node(node); end # Visit a RescueModifierNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::RescueModifierNode).void } def visit_rescue_modifier_node(node); end # Visit a RescueNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::RescueNode).void } def visit_rescue_node(node); end # Visit a RestParameterNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::RestParameterNode).void } def visit_rest_parameter_node(node); end # Visit a RetryNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::RetryNode).void } def visit_retry_node(node); end # Visit a ReturnNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::ReturnNode).void } def visit_return_node(node); end # Visit a SelfNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::SelfNode).void } def visit_self_node(node); end # Visit a SingletonClassNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::SingletonClassNode).void } def visit_singleton_class_node(node); end # Visit a SourceEncodingNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::SourceEncodingNode).void } def visit_source_encoding_node(node); end # Visit a SourceFileNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::SourceFileNode).void } def visit_source_file_node(node); end # Visit a SourceLineNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::SourceLineNode).void } def visit_source_line_node(node); end # Visit a SplatNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::SplatNode).void } def visit_splat_node(node); end # Visit a StatementsNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::StatementsNode).void } def visit_statements_node(node); end # Visit a StringNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::StringNode).void } def visit_string_node(node); end # Visit a SuperNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::SuperNode).void } def visit_super_node(node); end # Visit a SymbolNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::SymbolNode).void } def visit_symbol_node(node); end # Visit a TrueNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::TrueNode).void } def visit_true_node(node); end # Visit a UndefNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::UndefNode).void } def visit_undef_node(node); end # Visit a UnlessNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::UnlessNode).void } def visit_unless_node(node); end # Visit a UntilNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::UntilNode).void } def visit_until_node(node); end # Visit a WhenNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::WhenNode).void } def visit_when_node(node); end # Visit a WhileNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::WhileNode).void } def visit_while_node(node); end # Visit a XStringNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::XStringNode).void } def visit_x_string_node(node); end # Visit a YieldNode node # # source://prism//lib/prism/visitor.rb#26 sig { params(node: Prism::YieldNode).void } def visit_yield_node(node); end end # Represents the use of the `when` keyword within a case statement. # # case true # when true # ^^^^^^^^^ # end # # source://prism//lib/prism/node.rb#18667 class Prism::WhenNode < ::Prism::Node # def initialize: (Location keyword_loc, Array[Node] conditions, StatementsNode? statements, Location location) -> void # # @return [WhenNode] a new instance of WhenNode # # source://prism//lib/prism/node.rb#18668 def initialize(source, keyword_loc, conditions, statements, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#18678 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#18683 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#18696 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#18688 def compact_child_nodes; end # attr_reader conditions: Array[Node] # # source://prism//lib/prism/node.rb#18726 sig { returns(T::Array[Prism::Node]) } def conditions; end # def copy: (**params) -> WhenNode # # source://prism//lib/prism/node.rb#18701 sig { params(params: T.untyped).returns(Prism::WhenNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#18683 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, conditions: Array[Node], statements: StatementsNode?, location: Location } # # source://prism//lib/prism/node.rb#18715 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#18738 def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # # source://prism//lib/prism/node.rb#18733 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # # source://prism//lib/prism/node.rb#18720 sig { returns(Prism::Location) } def keyword_loc; end # attr_reader statements: StatementsNode? # # source://prism//lib/prism/node.rb#18729 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#18765 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#18775 def type; end end end # Represents the use of the `while` keyword, either in the block form or the modifier form. # # bar while foo # ^^^^^^^^^^^^^ # # while foo do bar end # ^^^^^^^^^^^^^^^^^^^^ # # source://prism//lib/prism/node.rb#18788 class Prism::WhileNode < ::Prism::Node # def initialize: (Integer flags, Location keyword_loc, Location? closing_loc, Node predicate, StatementsNode? statements, Location location) -> void # # @return [WhileNode] a new instance of WhileNode # # source://prism//lib/prism/node.rb#18789 def initialize(source, flags, keyword_loc, closing_loc, predicate, statements, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#18801 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def begin_modifier?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#18878 sig { returns(T::Boolean) } def begin_modifier?; end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#18810 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # # source://prism//lib/prism/node.rb#18888 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # # source://prism//lib/prism/node.rb#18859 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#18823 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#18815 def compact_child_nodes; end # def copy: (**params) -> WhileNode # # source://prism//lib/prism/node.rb#18828 sig { params(params: T.untyped).returns(Prism::WhileNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#18810 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, keyword_loc: Location, closing_loc: Location?, predicate: Node, statements: StatementsNode?, location: Location } # # source://prism//lib/prism/node.rb#18844 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#18893 def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # # source://prism//lib/prism/node.rb#18883 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # # source://prism//lib/prism/node.rb#18853 sig { returns(Prism::Location) } def keyword_loc; end # attr_reader predicate: Node # # source://prism//lib/prism/node.rb#18871 sig { returns(Prism::Node) } def predicate; end # source://prism//lib/prism/node.rb#18805 def set_newline_flag(newline_marked); end # attr_reader statements: StatementsNode? # # source://prism//lib/prism/node.rb#18874 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#18924 def type; end private # private attr_reader flags: Integer # # source://prism//lib/prism/node.rb#18849 sig { returns(Integer) } def flags; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#18934 def type; end end end # Represents an xstring literal with no interpolation. # # `foo` # ^^^^^ # # source://prism//lib/prism/node.rb#18944 class Prism::XStringNode < ::Prism::Node include ::Prism::HeredocQuery # def initialize: (Integer flags, Location opening_loc, Location content_loc, Location closing_loc, String unescaped, Location location) -> void # # @return [XStringNode] a new instance of XStringNode # # source://prism//lib/prism/node.rb#18945 def initialize(source, flags, opening_loc, content_loc, closing_loc, unescaped, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#18957 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#18962 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # # source://prism//lib/prism/node.rb#19044 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # # source://prism//lib/prism/node.rb#19014 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#18972 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#18967 def compact_child_nodes; end # def content: () -> String # # source://prism//lib/prism/node.rb#19039 sig { returns(String) } def content; end # attr_reader content_loc: Location # # source://prism//lib/prism/node.rb#19008 sig { returns(Prism::Location) } def content_loc; end # def copy: (**params) -> XStringNode # # source://prism//lib/prism/node.rb#18977 sig { params(params: T.untyped).returns(Prism::XStringNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#18962 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location } # # source://prism//lib/prism/node.rb#18993 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def forced_binary_encoding?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#19029 sig { returns(T::Boolean) } def forced_binary_encoding?; end # def forced_utf8_encoding?: () -> bool # # @return [Boolean] # # source://prism//lib/prism/node.rb#19024 sig { returns(T::Boolean) } def forced_utf8_encoding?; end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#19049 def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String # # source://prism//lib/prism/node.rb#19034 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # # source://prism//lib/prism/node.rb#19002 sig { returns(Prism::Location) } def opening_loc; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#19074 def type; end # attr_reader unescaped: String # # source://prism//lib/prism/node.rb#19020 sig { returns(String) } def unescaped; end private # private attr_reader flags: Integer # # source://prism//lib/prism/node.rb#18998 sig { returns(Integer) } def flags; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#19084 def type; end end end # Represents the use of the `yield` keyword. # # yield 1 # ^^^^^^^ # # source://prism//lib/prism/node.rb#19094 class Prism::YieldNode < ::Prism::Node # def initialize: (Location keyword_loc, Location? lparen_loc, ArgumentsNode? arguments, Location? rparen_loc, Location location) -> void # # @return [YieldNode] a new instance of YieldNode # # source://prism//lib/prism/node.rb#19095 def initialize(source, keyword_loc, lparen_loc, arguments, rparen_loc, location); end # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#19106 sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # # source://prism//lib/prism/node.rb#19166 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#19111 sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism//lib/prism/node.rb#19123 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism//lib/prism/node.rb#19116 def compact_child_nodes; end # def copy: (**params) -> YieldNode # # source://prism//lib/prism/node.rb#19128 sig { params(params: T.untyped).returns(Prism::YieldNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#19111 sig { returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, location: Location } # # source://prism//lib/prism/node.rb#19143 sig do params( keys: T::Array[Symbol] ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) end def deconstruct_keys(keys); end # def inspect(NodeInspector inspector) -> String # # source://prism//lib/prism/node.rb#19197 def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # # source://prism//lib/prism/node.rb#19182 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # # source://prism//lib/prism/node.rb#19148 sig { returns(Prism::Location) } def keyword_loc; end # def lparen: () -> String? # # source://prism//lib/prism/node.rb#19187 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # # source://prism//lib/prism/node.rb#19154 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def rparen: () -> String? # # source://prism//lib/prism/node.rb#19192 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # # source://prism//lib/prism/node.rb#19169 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a # case statement and doing `case node; when cls1; when cls2; end`. Both of # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # # def type: () -> Symbol # # source://prism//lib/prism/node.rb#19225 def type; end class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # # def self.type: () -> Symbol # # source://prism//lib/prism/node.rb#19235 def type; end end end