sig/prism.rbs in prism-0.19.0 vs sig/prism.rbs in prism-0.20.0

- old
+ new

@@ -10,143 +10,142 @@ class AliasGlobalVariableNode < Node attr_reader new_name: Node attr_reader old_name: Node attr_reader keyword_loc: Location - def initialize: (new_name: Node, old_name: Node, keyword_loc: Location, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Node new_name, Node old_name, Location keyword_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> AliasGlobalVariableNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { new_name: Node, old_name: Node, keyword_loc: Location, location: Location } def keyword: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents the use of the `alias` keyword to alias a method. # # alias foo bar # ^^^^^^^^^^^^^ class AliasMethodNode < Node attr_reader new_name: Node attr_reader old_name: Node attr_reader keyword_loc: Location - def initialize: (new_name: Node, old_name: Node, keyword_loc: Location, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Node new_name, Node old_name, Location keyword_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> AliasMethodNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { new_name: Node, old_name: Node, keyword_loc: Location, location: Location } def keyword: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents an alternation pattern in pattern matching. # # foo => bar | baz # ^^^^^^^^^ class AlternationPatternNode < Node attr_reader left: Node attr_reader right: Node attr_reader operator_loc: Location - def initialize: (left: Node, right: Node, operator_loc: Location, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Node left, Node right, Location operator_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> AlternationPatternNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { left: Node, right: Node, operator_loc: Location, location: Location } def operator: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents the use of the `&&` operator or the `and` keyword. # # left and right # ^^^^^^^^^^^^^^ class AndNode < Node attr_reader left: Node attr_reader right: Node attr_reader operator_loc: Location - def initialize: (left: Node, right: Node, operator_loc: Location, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Node left, Node right, Location operator_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> AndNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { left: Node, right: Node, operator_loc: Location, location: Location } def operator: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents a set of arguments to a method or a keyword. # # return foo, bar, baz # ^^^^^^^^^^^^^ class ArgumentsNode < Node - attr_reader flags: Integer + private attr_reader flags: Integer attr_reader arguments: Array[Node] - def initialize: (flags: Integer, arguments: Array[Node], location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Integer flags, Array[Node] arguments, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> ArgumentsNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, arguments: Array[Node], location: Location } def contains_keyword_splat?: () -> bool - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end - # Represents an array literal. This can be a regular array using brackets or - # a special array using % like %w or %i. + # Represents an array literal. This can be a regular array using brackets or a special array using % like %w or %i. # # [1, 2, 3] # ^^^^^^^^^ class ArrayNode < Node - attr_reader flags: Integer + private attr_reader flags: Integer attr_reader elements: Array[Node] attr_reader opening_loc: Location? attr_reader closing_loc: Location? - def initialize: (flags: Integer, elements: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Integer flags, Array[Node] elements, Location? opening_loc, Location? closing_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> ArrayNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, elements: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location } def contains_splat?: () -> bool def opening: () -> String? def closing: () -> String? - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents an array pattern in pattern matching. # # foo in 1, 2 # ^^^^^^^^^^^ @@ -168,89 +167,89 @@ attr_reader rest: Node? attr_reader posts: Array[Node] attr_reader opening_loc: Location? attr_reader closing_loc: Location? - def initialize: (constant: Node?, requireds: Array[Node], rest: Node?, posts: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Node? constant, Array[Node] requireds, Node? rest, Array[Node] posts, Location? opening_loc, Location? closing_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> ArrayPatternNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { constant: Node?, requireds: Array[Node], rest: Node?, posts: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location } def opening: () -> String? def closing: () -> String? - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents a hash key/value pair. # # { a => b } # ^^^^^^ class AssocNode < Node attr_reader key: Node - attr_reader value: Node? + attr_reader value: Node attr_reader operator_loc: Location? - def initialize: (key: Node, value: Node?, operator_loc: Location?, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Node key, Node value, Location? operator_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> AssocNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { key: Node, value: Node, operator_loc: Location?, location: Location } def operator: () -> String? - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents a splat in a hash literal. # # { **foo } # ^^^^^ class AssocSplatNode < Node attr_reader value: Node? attr_reader operator_loc: Location - def initialize: (value: Node?, operator_loc: Location, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Node? value, Location operator_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> AssocSplatNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { value: Node?, operator_loc: Location, location: Location } def operator: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents reading a reference to a field in the previous match. # # $' # ^^ class BackReferenceReadNode < Node attr_reader name: Symbol - def initialize: (name: Symbol, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Symbol name, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> BackReferenceReadNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents a begin statement. # # begin # foo @@ -262,118 +261,123 @@ attr_reader rescue_clause: RescueNode? attr_reader else_clause: ElseNode? attr_reader ensure_clause: EnsureNode? attr_reader end_keyword_loc: Location? - def initialize: (begin_keyword_loc: Location?, statements: StatementsNode?, rescue_clause: RescueNode?, else_clause: ElseNode?, ensure_clause: EnsureNode?, end_keyword_loc: Location?, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Location? begin_keyword_loc, StatementsNode? statements, RescueNode? rescue_clause, ElseNode? else_clause, EnsureNode? ensure_clause, Location? end_keyword_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> BeginNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { begin_keyword_loc: Location?, statements: StatementsNode?, rescue_clause: RescueNode?, else_clause: ElseNode?, ensure_clause: EnsureNode?, end_keyword_loc: Location?, location: Location } def begin_keyword: () -> String? def end_keyword: () -> String? - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents block method arguments. # # bar(&args) # ^^^^^^^^^^ class BlockArgumentNode < Node attr_reader expression: Node? attr_reader operator_loc: Location - def initialize: (expression: Node?, operator_loc: Location, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Node? expression, Location operator_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> BlockArgumentNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { expression: Node?, operator_loc: Location, location: Location } def operator: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents a block local variable. # # a { |; b| } # ^ class BlockLocalVariableNode < Node + private attr_reader flags: Integer attr_reader name: Symbol - def initialize: (name: Symbol, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Integer flags, Symbol name, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> BlockLocalVariableNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, location: Location } - def inspect: (inspector: NodeInspector) -> String + def repeated_parameter?: () -> bool + + def inspect: (?NodeInspector inspector) -> String end # Represents a block of ruby code. # - # [1, 2, 3].each { |i| puts x } - # ^^^^^^^^^^^^^^ + # [1, 2, 3].each { |i| puts x } + # ^^^^^^^^^^^^^^ class BlockNode < Node attr_reader locals: Array[Symbol] - attr_reader locals_body_index: Integer attr_reader parameters: Node? attr_reader body: Node? attr_reader opening_loc: Location attr_reader closing_loc: Location - def initialize: (locals: Array[Symbol], locals_body_index: Integer, parameters: Node?, body: Node?, opening_loc: Location, closing_loc: Location, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Array[Symbol] locals, Node? parameters, Node? body, Location opening_loc, Location closing_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> BlockNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], parameters: Node?, body: Node?, opening_loc: Location, closing_loc: Location, location: Location } def opening: () -> String def closing: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents a block parameter to a method, block, or lambda definition. # # def a(&b) # ^^ # end class BlockParameterNode < Node + private attr_reader flags: Integer attr_reader name: Symbol? attr_reader name_loc: Location? attr_reader operator_loc: Location - def initialize: (name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Integer flags, Symbol? name, Location? name_loc, Location operator_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> BlockParameterNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location } + def repeated_parameter?: () -> bool + def operator: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents a block's parameters declaration. # # -> (a, b = 1; local) { } # ^^^^^^^^^^^^^^^^^ @@ -385,85 +389,87 @@ attr_reader parameters: ParametersNode? attr_reader locals: Array[Node] attr_reader opening_loc: Location? attr_reader closing_loc: Location? - def initialize: (parameters: ParametersNode?, locals: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (ParametersNode? parameters, Array[Node] locals, Location? opening_loc, Location? closing_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> BlockParametersNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { parameters: ParametersNode?, locals: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location } def opening: () -> String? def closing: () -> String? - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents the use of the `break` keyword. # # break foo # ^^^^^^^^^ class BreakNode < Node attr_reader arguments: ArgumentsNode? attr_reader keyword_loc: Location - def initialize: (arguments: ArgumentsNode?, keyword_loc: Location, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (ArgumentsNode? arguments, Location keyword_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> BreakNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { arguments: ArgumentsNode?, keyword_loc: Location, location: Location } def keyword: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents the use of the `&&=` operator on a call. # # foo.bar &&= value # ^^^^^^^^^^^^^^^^^ class CallAndWriteNode < Node - attr_reader flags: Integer + private attr_reader flags: Integer attr_reader receiver: Node? attr_reader call_operator_loc: Location? attr_reader message_loc: Location? attr_reader read_name: Symbol attr_reader write_name: Symbol attr_reader operator_loc: Location attr_reader value: Node - def initialize: (flags: Integer, receiver: Node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Node, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Integer flags, Node? receiver, Location? call_operator_loc, Location? message_loc, Symbol read_name, Symbol write_name, Location operator_loc, Node value, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> CallAndWriteNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Node, location: Location } def safe_navigation?: () -> bool def variable_call?: () -> bool def attribute_write?: () -> bool + def ignore_visibility?: () -> bool + def call_operator: () -> String? def message: () -> String? def operator: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents a method call, in all of the various forms that can take. # # foo # ^^^ @@ -481,120 +487,126 @@ # ^^^^^^^ # # foo&.bar # ^^^^^^^^ class CallNode < Node - attr_reader flags: Integer + private attr_reader flags: Integer attr_reader receiver: Node? attr_reader call_operator_loc: Location? attr_reader name: Symbol attr_reader message_loc: Location? attr_reader opening_loc: Location? attr_reader arguments: ArgumentsNode? attr_reader closing_loc: Location? attr_reader block: Node? - def initialize: (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) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Integer flags, Node? receiver, Location? call_operator_loc, Symbol name, Location? message_loc, Location? opening_loc, ArgumentsNode? arguments, Location? closing_loc, Node? block, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> CallNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Node?, call_operator_loc: Location?, name: Symbol, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, block: Node?, location: Location } def safe_navigation?: () -> bool def variable_call?: () -> bool def attribute_write?: () -> bool + def ignore_visibility?: () -> bool + def call_operator: () -> String? def message: () -> String? def opening: () -> String? def closing: () -> String? - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents the use of an assignment operator on a call. # # foo.bar += baz # ^^^^^^^^^^^^^^ class CallOperatorWriteNode < Node - attr_reader flags: Integer + private attr_reader flags: Integer attr_reader receiver: Node? attr_reader call_operator_loc: Location? attr_reader message_loc: Location? attr_reader read_name: Symbol attr_reader write_name: Symbol attr_reader operator: Symbol attr_reader operator_loc: Location attr_reader value: Node - def initialize: (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) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Integer flags, Node? receiver, Location? call_operator_loc, Location? message_loc, Symbol read_name, Symbol write_name, Symbol operator, Location operator_loc, Node value, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> CallOperatorWriteNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator: Symbol, operator_loc: Location, value: Node, location: Location } def safe_navigation?: () -> bool def variable_call?: () -> bool def attribute_write?: () -> bool + def ignore_visibility?: () -> bool + def call_operator: () -> String? def message: () -> String? - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents the use of the `||=` operator on a call. # # foo.bar ||= value # ^^^^^^^^^^^^^^^^^ class CallOrWriteNode < Node - attr_reader flags: Integer + private attr_reader flags: Integer attr_reader receiver: Node? attr_reader call_operator_loc: Location? attr_reader message_loc: Location? attr_reader read_name: Symbol attr_reader write_name: Symbol attr_reader operator_loc: Location attr_reader value: Node - def initialize: (flags: Integer, receiver: Node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Node, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Integer flags, Node? receiver, Location? call_operator_loc, Location? message_loc, Symbol read_name, Symbol write_name, Location operator_loc, Node value, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> CallOrWriteNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Node, location: Location } def safe_navigation?: () -> bool def variable_call?: () -> bool def attribute_write?: () -> bool + def ignore_visibility?: () -> bool + def call_operator: () -> String? def message: () -> String? def operator: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents assigning to a method call. # # foo.bar, = 1 # ^^^^^^^ @@ -605,60 +617,62 @@ # end # # for foo.bar in baz do end # ^^^^^^^ class CallTargetNode < Node - attr_reader flags: Integer + private attr_reader flags: Integer attr_reader receiver: Node attr_reader call_operator_loc: Location attr_reader name: Symbol attr_reader message_loc: Location - def initialize: (flags: Integer, receiver: Node, call_operator_loc: Location, name: Symbol, message_loc: Location, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Integer flags, Node receiver, Location call_operator_loc, Symbol name, Location message_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> CallTargetNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Node, call_operator_loc: Location, name: Symbol, message_loc: Location, location: Location } def safe_navigation?: () -> bool def variable_call?: () -> bool def attribute_write?: () -> bool + def ignore_visibility?: () -> bool + def call_operator: () -> String def message: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents assigning to a local variable in pattern matching. # # foo => [bar => baz] # ^^^^^^^^^^^^ class CapturePatternNode < Node attr_reader value: Node attr_reader target: Node attr_reader operator_loc: Location - def initialize: (value: Node, target: Node, operator_loc: Location, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Node value, Node target, Location operator_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> CapturePatternNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { value: Node, target: Node, operator_loc: Location, location: Location } def operator: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents the use of a case statement for pattern matching. # # case true # in false @@ -669,25 +683,25 @@ attr_reader conditions: Array[Node] attr_reader consequent: ElseNode? attr_reader case_keyword_loc: Location attr_reader end_keyword_loc: Location - def initialize: (predicate: Node?, conditions: Array[Node], consequent: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Node? predicate, Array[Node] conditions, ElseNode? consequent, Location case_keyword_loc, Location end_keyword_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> CaseMatchNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { predicate: Node?, conditions: Array[Node], consequent: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location, location: Location } def case_keyword: () -> String def end_keyword: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents the use of a case statement. # # case true # when false @@ -698,25 +712,25 @@ attr_reader conditions: Array[Node] attr_reader consequent: ElseNode? attr_reader case_keyword_loc: Location attr_reader end_keyword_loc: Location - def initialize: (predicate: Node?, conditions: Array[Node], consequent: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Node? predicate, Array[Node] conditions, ElseNode? consequent, Location case_keyword_loc, Location end_keyword_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> CaseNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { predicate: Node?, conditions: Array[Node], consequent: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location, location: Location } def case_keyword: () -> String def end_keyword: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents a class declaration involving the `class` keyword. # # class Foo end # ^^^^^^^^^^^^^ @@ -728,27 +742,27 @@ attr_reader superclass: Node? attr_reader body: Node? attr_reader end_keyword_loc: Location attr_reader name: Symbol - def initialize: (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) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Array[Symbol] locals, Location class_keyword_loc, Node constant_path, Location? inheritance_operator_loc, Node? superclass, Node? body, Location end_keyword_loc, Symbol name, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> ClassNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], class_keyword_loc: Location, constant_path: Node, inheritance_operator_loc: Location?, superclass: Node?, body: Node?, end_keyword_loc: Location, name: Symbol, location: Location } def class_keyword: () -> String def inheritance_operator: () -> String? def end_keyword: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents the use of the `&&=` operator for assignment to a class variable. # # @@target &&= value # ^^^^^^^^^^^^^^^^^^ @@ -756,23 +770,23 @@ attr_reader name: Symbol attr_reader name_loc: Location attr_reader operator_loc: Location attr_reader value: Node - def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> ClassVariableAndWriteNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location } def operator: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents assigning to a class variable using an operator that isn't `=`. # # @@target += value # ^^^^^^^^^^^^^^^^^ @@ -781,21 +795,21 @@ attr_reader name_loc: Location attr_reader operator_loc: Location attr_reader value: Node attr_reader operator: Symbol - def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Symbol operator, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> ClassVariableOperatorWriteNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location } - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents the use of the `||=` operator for assignment to a class variable. # # @@target ||= value # ^^^^^^^^^^^^^^^^^^ @@ -803,61 +817,61 @@ attr_reader name: Symbol attr_reader name_loc: Location attr_reader operator_loc: Location attr_reader value: Node - def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> ClassVariableOrWriteNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location } def operator: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents referencing a class variable. # # @@foo # ^^^^^ class ClassVariableReadNode < Node attr_reader name: Symbol - def initialize: (name: Symbol, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Symbol name, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> ClassVariableReadNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents writing to a class variable in a context that doesn't have an explicit value. # # @@foo, @@bar = baz # ^^^^^ ^^^^^ class ClassVariableTargetNode < Node attr_reader name: Symbol - def initialize: (name: Symbol, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Symbol name, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> ClassVariableTargetNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents writing to a class variable. # # @@foo = 1 # ^^^^^^^^^ @@ -865,23 +879,23 @@ attr_reader name: Symbol attr_reader name_loc: Location attr_reader value: Node attr_reader operator_loc: Location? - def initialize: (name: Symbol, name_loc: Location, value: Node, operator_loc: Location?, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Symbol name, Location name_loc, Node value, Location? operator_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> ClassVariableWriteNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, value: Node, operator_loc: Location?, location: Location } def operator: () -> String? - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents the use of the `&&=` operator for assignment to a constant. # # Target &&= value # ^^^^^^^^^^^^^^^^ @@ -889,23 +903,23 @@ attr_reader name: Symbol attr_reader name_loc: Location attr_reader operator_loc: Location attr_reader value: Node - def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> ConstantAndWriteNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location } def operator: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents assigning to a constant using an operator that isn't `=`. # # Target += value # ^^^^^^^^^^^^^^^ @@ -914,21 +928,21 @@ attr_reader name_loc: Location attr_reader operator_loc: Location attr_reader value: Node attr_reader operator: Symbol - def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Symbol operator, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> ConstantOperatorWriteNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location } - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents the use of the `||=` operator for assignment to a constant. # # Target ||= value # ^^^^^^^^^^^^^^^^ @@ -936,69 +950,69 @@ attr_reader name: Symbol attr_reader name_loc: Location attr_reader operator_loc: Location attr_reader value: Node - def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> ConstantOrWriteNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location } def operator: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents the use of the `&&=` operator for assignment to a constant path. # # Parent::Child &&= value # ^^^^^^^^^^^^^^^^^^^^^^^ class ConstantPathAndWriteNode < Node attr_reader target: ConstantPathNode attr_reader operator_loc: Location attr_reader value: Node - def initialize: (target: ConstantPathNode, operator_loc: Location, value: Node, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (ConstantPathNode target, Location operator_loc, Node value, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> ConstantPathAndWriteNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, operator_loc: Location, value: Node, location: Location } def operator: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents accessing a constant through a path of `::` operators. # # Foo::Bar # ^^^^^^^^ class ConstantPathNode < Node attr_reader parent: Node? attr_reader child: Node attr_reader delimiter_loc: Location - def initialize: (parent: Node?, child: Node, delimiter_loc: Location, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Node? parent, Node child, Location delimiter_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> ConstantPathNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { parent: Node?, child: Node, delimiter_loc: Location, location: Location } def delimiter: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents assigning to a constant path using an operator that isn't `=`. # # Parent::Child += value # ^^^^^^^^^^^^^^^^^^^^^^ @@ -1006,67 +1020,67 @@ attr_reader target: ConstantPathNode attr_reader operator_loc: Location attr_reader value: Node attr_reader operator: Symbol - def initialize: (target: ConstantPathNode, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (ConstantPathNode target, Location operator_loc, Node value, Symbol operator, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> ConstantPathOperatorWriteNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, operator_loc: Location, value: Node, operator: Symbol, location: Location } - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents the use of the `||=` operator for assignment to a constant path. # # Parent::Child ||= value # ^^^^^^^^^^^^^^^^^^^^^^^ class ConstantPathOrWriteNode < Node attr_reader target: ConstantPathNode attr_reader operator_loc: Location attr_reader value: Node - def initialize: (target: ConstantPathNode, operator_loc: Location, value: Node, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (ConstantPathNode target, Location operator_loc, Node value, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> ConstantPathOrWriteNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, operator_loc: Location, value: Node, location: Location } def operator: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents writing to a constant path in a context that doesn't have an explicit value. # # Foo::Foo, Bar::Bar = baz # ^^^^^^^^ ^^^^^^^^ class ConstantPathTargetNode < Node attr_reader parent: Node? attr_reader child: Node attr_reader delimiter_loc: Location - def initialize: (parent: Node?, child: Node, delimiter_loc: Location, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Node? parent, Node child, Location delimiter_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> ConstantPathTargetNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { parent: Node?, child: Node, delimiter_loc: Location, location: Location } def delimiter: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents writing to a constant path. # # ::Foo = 1 # ^^^^^^^^^ @@ -1079,61 +1093,61 @@ class ConstantPathWriteNode < Node attr_reader target: ConstantPathNode attr_reader operator_loc: Location attr_reader value: Node - def initialize: (target: ConstantPathNode, operator_loc: Location, value: Node, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (ConstantPathNode target, Location operator_loc, Node value, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> ConstantPathWriteNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, operator_loc: Location, value: Node, location: Location } def operator: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents referencing a constant. # # Foo # ^^^ class ConstantReadNode < Node attr_reader name: Symbol - def initialize: (name: Symbol, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Symbol name, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> ConstantReadNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents writing to a constant in a context that doesn't have an explicit value. # # Foo, Bar = baz # ^^^ ^^^ class ConstantTargetNode < Node attr_reader name: Symbol - def initialize: (name: Symbol, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Symbol name, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> ConstantTargetNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents writing to a constant. # # Foo = 1 # ^^^^^^^ @@ -1141,23 +1155,23 @@ attr_reader name: Symbol attr_reader name_loc: Location attr_reader value: Node attr_reader operator_loc: Location - def initialize: (name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Symbol name, Location name_loc, Node value, Location operator_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> ConstantWriteNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location } def operator: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents a method definition. # # def method # end @@ -1167,27 +1181,26 @@ attr_reader name_loc: Location attr_reader receiver: Node? attr_reader parameters: ParametersNode? attr_reader body: Node? attr_reader locals: Array[Symbol] - attr_reader locals_body_index: Integer attr_reader def_keyword_loc: Location attr_reader operator_loc: Location? attr_reader lparen_loc: Location? attr_reader rparen_loc: Location? attr_reader equal_loc: Location? attr_reader end_keyword_loc: Location? - def initialize: (name: Symbol, name_loc: Location, receiver: Node?, parameters: ParametersNode?, body: Node?, locals: Array[Symbol], locals_body_index: Integer, def_keyword_loc: Location, operator_loc: Location?, lparen_loc: Location?, rparen_loc: Location?, equal_loc: Location?, end_keyword_loc: Location?, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Symbol name, Location name_loc, Node? receiver, ParametersNode? parameters, Node? body, Array[Symbol] locals, Location def_keyword_loc, Location? operator_loc, Location? lparen_loc, Location? rparen_loc, Location? equal_loc, Location? end_keyword_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> DefNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, receiver: Node?, parameters: ParametersNode?, body: Node?, locals: Array[Symbol], def_keyword_loc: Location, operator_loc: Location?, lparen_loc: Location?, rparen_loc: Location?, equal_loc: Location?, end_keyword_loc: Location?, location: Location } def def_keyword: () -> String def operator: () -> String? @@ -1197,11 +1210,11 @@ def equal: () -> String? def end_keyword: () -> String? - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents the use of the `defined?` keyword. # # defined?(a) # ^^^^^^^^^^^ @@ -1209,99 +1222,99 @@ attr_reader lparen_loc: Location? attr_reader value: Node attr_reader rparen_loc: Location? attr_reader keyword_loc: Location - def initialize: (lparen_loc: Location?, value: Node, rparen_loc: Location?, keyword_loc: Location, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Location? lparen_loc, Node value, Location? rparen_loc, Location keyword_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> DefinedNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { lparen_loc: Location?, value: Node, rparen_loc: Location?, keyword_loc: Location, location: Location } def lparen: () -> String? def rparen: () -> String? def keyword: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents an `else` clause in a `case`, `if`, or `unless` statement. # # if a then b else c end # ^^^^^^^^^^ class ElseNode < Node attr_reader else_keyword_loc: Location attr_reader statements: StatementsNode? attr_reader end_keyword_loc: Location? - def initialize: (else_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location?, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Location else_keyword_loc, StatementsNode? statements, Location? end_keyword_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> ElseNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { else_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location?, location: Location } def else_keyword: () -> String def end_keyword: () -> String? - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents an interpolated set of statements. # # "foo #{bar}" # ^^^^^^ class EmbeddedStatementsNode < Node attr_reader opening_loc: Location attr_reader statements: StatementsNode? attr_reader closing_loc: Location - def initialize: (opening_loc: Location, statements: StatementsNode?, closing_loc: Location, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Location opening_loc, StatementsNode? statements, Location closing_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> EmbeddedStatementsNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location, statements: StatementsNode?, closing_loc: Location, location: Location } def opening: () -> String def closing: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents an interpolated variable. # # "foo #@bar" # ^^^^^ class EmbeddedVariableNode < Node attr_reader operator_loc: Location attr_reader variable: Node - def initialize: (operator_loc: Location, variable: Node, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Location operator_loc, Node variable, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> EmbeddedVariableNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { operator_loc: Location, variable: Node, location: Location } def operator: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents an `ensure` clause in a `begin` statement. # # begin # foo @@ -1312,43 +1325,43 @@ class EnsureNode < Node attr_reader ensure_keyword_loc: Location attr_reader statements: StatementsNode? attr_reader end_keyword_loc: Location - def initialize: (ensure_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Location ensure_keyword_loc, StatementsNode? statements, Location end_keyword_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> EnsureNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { ensure_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location, location: Location } def ensure_keyword: () -> String def end_keyword: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents the use of the literal `false` keyword. # # false # ^^^^^ class FalseNode < Node - def initialize: (location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> FalseNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents a find pattern in pattern matching. # # foo in *bar, baz, *qux # ^^^^^^^^^^^^^^^ @@ -1364,69 +1377,69 @@ attr_reader requireds: Array[Node] attr_reader right: Node attr_reader opening_loc: Location? attr_reader closing_loc: Location? - def initialize: (constant: Node?, left: Node, requireds: Array[Node], right: Node, opening_loc: Location?, closing_loc: Location?, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Node? constant, Node left, Array[Node] requireds, Node right, Location? opening_loc, Location? closing_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> FindPatternNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { constant: Node?, left: Node, requireds: Array[Node], right: Node, opening_loc: Location?, closing_loc: Location?, location: Location } def opening: () -> String? def closing: () -> String? - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents the use of the `..` or `...` operators to create flip flops. # # baz if foo .. bar # ^^^^^^^^^^ class FlipFlopNode < Node - attr_reader flags: Integer + private attr_reader flags: Integer attr_reader left: Node? attr_reader right: Node? attr_reader operator_loc: Location - def initialize: (flags: Integer, left: Node?, right: Node?, operator_loc: Location, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Integer flags, Node? left, Node? right, Location operator_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> FlipFlopNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, left: Node?, right: Node?, operator_loc: Location, location: Location } def exclude_end?: () -> bool def operator: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents a floating point number literal. # # 1.0 # ^^^ class FloatNode < Node - def initialize: (location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> FloatNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents the use of the `for` keyword. # # for i in a end # ^^^^^^^^^^^^^^ @@ -1437,87 +1450,87 @@ attr_reader for_keyword_loc: Location attr_reader in_keyword_loc: Location attr_reader do_keyword_loc: Location? attr_reader end_keyword_loc: Location - def initialize: (index: Node, collection: Node, statements: StatementsNode?, for_keyword_loc: Location, in_keyword_loc: Location, do_keyword_loc: Location?, end_keyword_loc: Location, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Node index, Node collection, StatementsNode? statements, Location for_keyword_loc, Location in_keyword_loc, Location? do_keyword_loc, Location end_keyword_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> ForNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { index: Node, collection: Node, statements: StatementsNode?, for_keyword_loc: Location, in_keyword_loc: Location, do_keyword_loc: Location?, end_keyword_loc: Location, location: Location } def for_keyword: () -> String def in_keyword: () -> String def do_keyword: () -> String? def end_keyword: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents forwarding all arguments to this method to another method. # # def foo(...) # bar(...) # ^^^ # end class ForwardingArgumentsNode < Node - def initialize: (location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> ForwardingArgumentsNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents the use of the forwarding parameter in a method, block, or lambda declaration. # # def foo(...) # ^^^ # end class ForwardingParameterNode < Node - def initialize: (location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> ForwardingParameterNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents the use of the `super` keyword without parentheses or arguments. # # super # ^^^^^ class ForwardingSuperNode < Node attr_reader block: BlockNode? - def initialize: (block: BlockNode?, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (BlockNode? block, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> ForwardingSuperNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { block: BlockNode?, location: Location } - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents the use of the `&&=` operator for assignment to a global variable. # # $target &&= value # ^^^^^^^^^^^^^^^^^ @@ -1525,23 +1538,23 @@ attr_reader name: Symbol attr_reader name_loc: Location attr_reader operator_loc: Location attr_reader value: Node - def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> GlobalVariableAndWriteNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location } def operator: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents assigning to a global variable using an operator that isn't `=`. # # $target += value # ^^^^^^^^^^^^^^^^ @@ -1550,21 +1563,21 @@ attr_reader name_loc: Location attr_reader operator_loc: Location attr_reader value: Node attr_reader operator: Symbol - def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Symbol operator, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> GlobalVariableOperatorWriteNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location } - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents the use of the `||=` operator for assignment to a global variable. # # $target ||= value # ^^^^^^^^^^^^^^^^^ @@ -1572,61 +1585,61 @@ attr_reader name: Symbol attr_reader name_loc: Location attr_reader operator_loc: Location attr_reader value: Node - def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> GlobalVariableOrWriteNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location } def operator: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents referencing a global variable. # # $foo # ^^^^ class GlobalVariableReadNode < Node attr_reader name: Symbol - def initialize: (name: Symbol, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Symbol name, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> GlobalVariableReadNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents writing to a global variable in a context that doesn't have an explicit value. # # $foo, $bar = baz # ^^^^ ^^^^ class GlobalVariableTargetNode < Node attr_reader name: Symbol - def initialize: (name: Symbol, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Symbol name, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> GlobalVariableTargetNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents writing to a global variable. # # $foo = 1 # ^^^^^^^^ @@ -1634,48 +1647,48 @@ attr_reader name: Symbol attr_reader name_loc: Location attr_reader value: Node attr_reader operator_loc: Location - def initialize: (name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Symbol name, Location name_loc, Node value, Location operator_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> GlobalVariableWriteNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location } def operator: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents a hash literal. # # { a => b } # ^^^^^^^^^^ class HashNode < Node attr_reader opening_loc: Location attr_reader elements: Array[Node] attr_reader closing_loc: Location - def initialize: (opening_loc: Location, elements: Array[Node], closing_loc: Location, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Location opening_loc, Array[Node] elements, Location closing_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> HashNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location, elements: Array[Node], closing_loc: Location, location: Location } def opening: () -> String def closing: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents a hash pattern in pattern matching. # # foo => { a: 1, b: 2 } # ^^^^^^^^^^^^^^ @@ -1687,25 +1700,25 @@ attr_reader elements: Array[Node] attr_reader rest: Node? attr_reader opening_loc: Location? attr_reader closing_loc: Location? - def initialize: (constant: Node?, elements: Array[Node], rest: Node?, opening_loc: Location?, closing_loc: Location?, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Node? constant, Array[Node] elements, Node? rest, Location? opening_loc, Location? closing_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> HashPatternNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { constant: Node?, elements: Array[Node], rest: Node?, opening_loc: Location?, closing_loc: Location?, location: Location } def opening: () -> String? def closing: () -> String? - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents the use of the `if` keyword, either in the block form or the modifier form. # # bar if foo # ^^^^^^^^^^ @@ -1718,69 +1731,71 @@ attr_reader then_keyword_loc: Location? attr_reader statements: StatementsNode? attr_reader consequent: Node? attr_reader end_keyword_loc: Location? - def initialize: (if_keyword_loc: Location?, predicate: Node, then_keyword_loc: Location?, statements: StatementsNode?, consequent: Node?, end_keyword_loc: Location?, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Location? if_keyword_loc, Node predicate, Location? then_keyword_loc, StatementsNode? statements, Node? consequent, Location? end_keyword_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> IfNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { if_keyword_loc: Location?, predicate: Node, then_keyword_loc: Location?, statements: StatementsNode?, consequent: Node?, end_keyword_loc: Location?, location: Location } def if_keyword: () -> String? def then_keyword: () -> String? def end_keyword: () -> String? - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents an imaginary number literal. # # 1.0i # ^^^^ class ImaginaryNode < Node attr_reader numeric: Node - def initialize: (numeric: Node, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Node numeric, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> ImaginaryNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { numeric: Node, location: Location } - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end - # Represents a node that is implicitly being added to the tree but doesn't - # correspond directly to a node in the source. + # 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: } + # ^^^^ class ImplicitNode < Node attr_reader value: Node - def initialize: (value: Node, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Node value, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> ImplicitNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { value: Node, location: Location } - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents using a trailing comma to indicate an implicit rest parameter. # # foo { |bar,| } # ^ @@ -1793,21 +1808,21 @@ # # foo, = bar # ^ class ImplicitRestNode < Node - def initialize: (location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> ImplicitRestNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents the use of the `in` keyword in a case statement. # # case a; in b then c end # ^^^^^^^^^^^ @@ -1815,147 +1830,153 @@ attr_reader pattern: Node attr_reader statements: StatementsNode? attr_reader in_loc: Location attr_reader then_loc: Location? - def initialize: (pattern: Node, statements: StatementsNode?, in_loc: Location, then_loc: Location?, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Node pattern, StatementsNode? statements, Location in_loc, Location? then_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> InNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { pattern: Node, statements: StatementsNode?, in_loc: Location, then_loc: Location?, location: Location } def in: () -> String def then: () -> String? - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents the use of the `&&=` operator on a call to the `[]` method. # # foo.bar[baz] &&= value # ^^^^^^^^^^^^^^^^^^^^^^ class IndexAndWriteNode < Node - attr_reader flags: Integer + private attr_reader flags: Integer attr_reader receiver: Node? attr_reader call_operator_loc: Location? attr_reader opening_loc: Location attr_reader arguments: ArgumentsNode? attr_reader closing_loc: Location attr_reader block: Node? attr_reader operator_loc: Location attr_reader value: Node - def initialize: (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) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Integer flags, Node? receiver, Location? call_operator_loc, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Node? block, Location operator_loc, Node value, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> IndexAndWriteNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, operator_loc: Location, value: Node, location: Location } def safe_navigation?: () -> bool def variable_call?: () -> bool def attribute_write?: () -> bool + def ignore_visibility?: () -> bool + def call_operator: () -> String? def opening: () -> String def closing: () -> String def operator: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents the use of an assignment operator on a call to `[]`. # # foo.bar[baz] += value # ^^^^^^^^^^^^^^^^^^^^^ class IndexOperatorWriteNode < Node - attr_reader flags: Integer + private attr_reader flags: Integer attr_reader receiver: Node? attr_reader call_operator_loc: Location? attr_reader opening_loc: Location attr_reader arguments: ArgumentsNode? attr_reader closing_loc: Location attr_reader block: Node? attr_reader operator: Symbol attr_reader operator_loc: Location attr_reader value: Node - def initialize: (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) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Integer flags, Node? receiver, Location? call_operator_loc, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Node? block, Symbol operator, Location operator_loc, Node value, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> IndexOperatorWriteNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, operator: Symbol, operator_loc: Location, value: Node, location: Location } def safe_navigation?: () -> bool def variable_call?: () -> bool def attribute_write?: () -> bool + def ignore_visibility?: () -> bool + def call_operator: () -> String? def opening: () -> String def closing: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents the use of the `||=` operator on a call to `[]`. # # foo.bar[baz] ||= value # ^^^^^^^^^^^^^^^^^^^^^^ class IndexOrWriteNode < Node - attr_reader flags: Integer + private attr_reader flags: Integer attr_reader receiver: Node? attr_reader call_operator_loc: Location? attr_reader opening_loc: Location attr_reader arguments: ArgumentsNode? attr_reader closing_loc: Location attr_reader block: Node? attr_reader operator_loc: Location attr_reader value: Node - def initialize: (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) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Integer flags, Node? receiver, Location? call_operator_loc, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Node? block, Location operator_loc, Node value, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> IndexOrWriteNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, operator_loc: Location, value: Node, location: Location } def safe_navigation?: () -> bool def variable_call?: () -> bool def attribute_write?: () -> bool + def ignore_visibility?: () -> bool + def call_operator: () -> String? def opening: () -> String def closing: () -> String def operator: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents assigning to an index. # # foo[bar], = 1 # ^^^^^^^^ @@ -1966,38 +1987,40 @@ # end # # for foo[bar] in baz do end # ^^^^^^^^ class IndexTargetNode < Node - attr_reader flags: Integer + private attr_reader flags: Integer attr_reader receiver: Node attr_reader opening_loc: Location attr_reader arguments: ArgumentsNode? attr_reader closing_loc: Location attr_reader block: Node? - def initialize: (flags: Integer, receiver: Node, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Integer flags, Node receiver, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Node? block, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> IndexTargetNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Node, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, location: Location } def safe_navigation?: () -> bool def variable_call?: () -> bool def attribute_write?: () -> bool + def ignore_visibility?: () -> bool + def opening: () -> String def closing: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents the use of the `&&=` operator for assignment to an instance variable. # # @target &&= value # ^^^^^^^^^^^^^^^^^ @@ -2005,23 +2028,23 @@ attr_reader name: Symbol attr_reader name_loc: Location attr_reader operator_loc: Location attr_reader value: Node - def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> InstanceVariableAndWriteNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location } def operator: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents assigning to an instance variable using an operator that isn't `=`. # # @target += value # ^^^^^^^^^^^^^^^^ @@ -2030,21 +2053,21 @@ attr_reader name_loc: Location attr_reader operator_loc: Location attr_reader value: Node attr_reader operator: Symbol - def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Symbol operator, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> InstanceVariableOperatorWriteNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location } - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents the use of the `||=` operator for assignment to an instance variable. # # @target ||= value # ^^^^^^^^^^^^^^^^^ @@ -2052,61 +2075,61 @@ attr_reader name: Symbol attr_reader name_loc: Location attr_reader operator_loc: Location attr_reader value: Node - def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> InstanceVariableOrWriteNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location } def operator: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents referencing an instance variable. # # @foo # ^^^^ class InstanceVariableReadNode < Node attr_reader name: Symbol - def initialize: (name: Symbol, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Symbol name, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> InstanceVariableReadNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents writing to an instance variable in a context that doesn't have an explicit value. # # @foo, @bar = baz # ^^^^ ^^^^ class InstanceVariableTargetNode < Node attr_reader name: Symbol - def initialize: (name: Symbol, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Symbol name, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> InstanceVariableTargetNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents writing to an instance variable. # # @foo = 1 # ^^^^^^^^ @@ -2114,72 +2137,70 @@ attr_reader name: Symbol attr_reader name_loc: Location attr_reader value: Node attr_reader operator_loc: Location - def initialize: (name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Symbol name, Location name_loc, Node value, Location operator_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> InstanceVariableWriteNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location } def operator: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents an integer number literal. # # 1 # ^ class IntegerNode < Node - attr_reader flags: Integer + private attr_reader flags: Integer - def initialize: (flags: Integer, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Integer flags, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> IntegerNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, location: Location } def binary?: () -> bool def decimal?: () -> bool def octal?: () -> bool def hexadecimal?: () -> bool - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String 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. + # 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 # ^^^^^^^^^^^^^^^^ class InterpolatedMatchLastLineNode < Node - attr_reader flags: Integer + private attr_reader flags: Integer attr_reader opening_loc: Location attr_reader parts: Array[Node] attr_reader closing_loc: Location - def initialize: (flags: Integer, opening_loc: Location, parts: Array[Node], closing_loc: Location, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Integer flags, Location opening_loc, Array[Node] parts, Location closing_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> InterpolatedMatchLastLineNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location, parts: Array[Node], closing_loc: Location, location: Location } def ignore_case?: () -> bool def extended?: () -> bool @@ -2203,31 +2224,31 @@ def opening: () -> String def closing: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents a regular expression literal that contains interpolation. # # /foo #{bar} baz/ # ^^^^^^^^^^^^^^^^ class InterpolatedRegularExpressionNode < Node - attr_reader flags: Integer + private attr_reader flags: Integer attr_reader opening_loc: Location attr_reader parts: Array[Node] attr_reader closing_loc: Location - def initialize: (flags: Integer, opening_loc: Location, parts: Array[Node], closing_loc: Location, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Integer flags, Location opening_loc, Array[Node] parts, Location closing_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> InterpolatedRegularExpressionNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location, parts: Array[Node], closing_loc: Location, location: Location } def ignore_case?: () -> bool def extended?: () -> bool @@ -2251,163 +2272,165 @@ def opening: () -> String def closing: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents a string literal that contains interpolation. # # "foo #{bar} baz" # ^^^^^^^^^^^^^^^^ class InterpolatedStringNode < Node attr_reader opening_loc: Location? attr_reader parts: Array[Node] attr_reader closing_loc: Location? - def initialize: (opening_loc: Location?, parts: Array[Node], closing_loc: Location?, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Location? opening_loc, Array[Node] parts, Location? closing_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> InterpolatedStringNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location?, parts: Array[Node], closing_loc: Location?, location: Location } def opening: () -> String? def closing: () -> String? - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents a symbol literal that contains interpolation. # # :"foo #{bar} baz" # ^^^^^^^^^^^^^^^^^ class InterpolatedSymbolNode < Node attr_reader opening_loc: Location? attr_reader parts: Array[Node] attr_reader closing_loc: Location? - def initialize: (opening_loc: Location?, parts: Array[Node], closing_loc: Location?, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Location? opening_loc, Array[Node] parts, Location? closing_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> InterpolatedSymbolNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location?, parts: Array[Node], closing_loc: Location?, location: Location } def opening: () -> String? def closing: () -> String? - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents an xstring literal that contains interpolation. # # `foo #{bar} baz` # ^^^^^^^^^^^^^^^^ class InterpolatedXStringNode < Node attr_reader opening_loc: Location attr_reader parts: Array[Node] attr_reader closing_loc: Location - def initialize: (opening_loc: Location, parts: Array[Node], closing_loc: Location, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Location opening_loc, Array[Node] parts, Location closing_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> InterpolatedXStringNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location, parts: Array[Node], closing_loc: Location, location: Location } def opening: () -> String def closing: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents a hash literal without opening and closing braces. # # foo(a: b) # ^^^^ class KeywordHashNode < Node - attr_reader flags: Integer + private attr_reader flags: Integer attr_reader elements: Array[Node] - def initialize: (flags: Integer, elements: Array[Node], location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Integer flags, Array[Node] elements, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> KeywordHashNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, elements: Array[Node], location: Location } - def static_keys?: () -> bool + def symbol_keys?: () -> bool - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents a keyword rest parameter to a method, block, or lambda definition. # # def a(**b) # ^^^ # end class KeywordRestParameterNode < Node + private attr_reader flags: Integer attr_reader name: Symbol? attr_reader name_loc: Location? attr_reader operator_loc: Location - def initialize: (name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Integer flags, Symbol? name, Location? name_loc, Location operator_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> KeywordRestParameterNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location } + def repeated_parameter?: () -> bool + def operator: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents using a lambda literal (not the lambda method call). # # ->(value) { value * 2 } # ^^^^^^^^^^^^^^^^^^^^^^^ class LambdaNode < Node attr_reader locals: Array[Symbol] - attr_reader locals_body_index: Integer attr_reader operator_loc: Location attr_reader opening_loc: Location attr_reader closing_loc: Location attr_reader parameters: Node? attr_reader body: Node? - def initialize: (locals: Array[Symbol], locals_body_index: Integer, operator_loc: Location, opening_loc: Location, closing_loc: Location, parameters: Node?, body: Node?, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Array[Symbol] locals, Location operator_loc, Location opening_loc, Location closing_loc, Node? parameters, Node? body, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> LambdaNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], operator_loc: Location, opening_loc: Location, closing_loc: Location, parameters: Node?, body: Node?, location: Location } def operator: () -> String def opening: () -> String def closing: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents the use of the `&&=` operator for assignment to a local variable. # # target &&= value # ^^^^^^^^^^^^^^^^ @@ -2416,23 +2439,23 @@ attr_reader operator_loc: Location attr_reader value: Node attr_reader name: Symbol attr_reader depth: Integer - def initialize: (name_loc: Location, operator_loc: Location, value: Node, name: Symbol, depth: Integer, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Location name_loc, Location operator_loc, Node value, Symbol name, Integer depth, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> LocalVariableAndWriteNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { name_loc: Location, operator_loc: Location, value: Node, name: Symbol, depth: Integer, location: Location } def operator: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents assigning to a local variable using an operator that isn't `=`. # # target += value # ^^^^^^^^^^^^^^^ @@ -2442,21 +2465,21 @@ attr_reader value: Node attr_reader name: Symbol attr_reader operator: Symbol attr_reader depth: Integer - def initialize: (name_loc: Location, operator_loc: Location, value: Node, name: Symbol, operator: Symbol, depth: Integer, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Location name_loc, Location operator_loc, Node value, Symbol name, Symbol operator, Integer depth, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> LocalVariableOperatorWriteNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { name_loc: Location, operator_loc: Location, value: Node, name: Symbol, operator: Symbol, depth: Integer, location: Location } - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents the use of the `||=` operator for assignment to a local variable. # # target ||= value # ^^^^^^^^^^^^^^^^ @@ -2465,65 +2488,63 @@ attr_reader operator_loc: Location attr_reader value: Node attr_reader name: Symbol attr_reader depth: Integer - def initialize: (name_loc: Location, operator_loc: Location, value: Node, name: Symbol, depth: Integer, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Location name_loc, Location operator_loc, Node value, Symbol name, Integer depth, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> LocalVariableOrWriteNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { name_loc: Location, operator_loc: Location, value: Node, name: Symbol, depth: Integer, location: Location } def operator: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String 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. + # 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 # ^^^ class LocalVariableReadNode < Node attr_reader name: Symbol attr_reader depth: Integer - def initialize: (name: Symbol, depth: Integer, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Symbol name, Integer depth, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> LocalVariableReadNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, depth: Integer, location: Location } - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents writing to a local variable in a context that doesn't have an explicit value. # # foo, bar = baz # ^^^ ^^^ class LocalVariableTargetNode < Node attr_reader name: Symbol attr_reader depth: Integer - def initialize: (name: Symbol, depth: Integer, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Symbol name, Integer depth, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> LocalVariableTargetNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, depth: Integer, location: Location } - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents writing to a local variable. # # foo = 1 # ^^^^^^^ @@ -2532,46 +2553,44 @@ attr_reader depth: Integer attr_reader name_loc: Location attr_reader value: Node attr_reader operator_loc: Location - def initialize: (name: Symbol, depth: Integer, name_loc: Location, value: Node, operator_loc: Location, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Symbol name, Integer depth, Location name_loc, Node value, Location operator_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> LocalVariableWriteNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, depth: Integer, name_loc: Location, value: Node, operator_loc: Location, location: Location } def operator: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String 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. + # 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 # ^^^^^^ class MatchLastLineNode < Node - attr_reader flags: Integer + private attr_reader flags: Integer attr_reader opening_loc: Location attr_reader content_loc: Location attr_reader closing_loc: Location attr_reader unescaped: String - def initialize: (flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Integer flags, Location opening_loc, Location content_loc, Location closing_loc, String unescaped, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> MatchLastLineNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location } def ignore_case?: () -> bool def extended?: () -> bool @@ -2597,94 +2616,92 @@ def content: () -> String def closing: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents the use of the modifier `in` operator. # # foo in bar # ^^^^^^^^^^ class MatchPredicateNode < Node attr_reader value: Node attr_reader pattern: Node attr_reader operator_loc: Location - def initialize: (value: Node, pattern: Node, operator_loc: Location, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Node value, Node pattern, Location operator_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> MatchPredicateNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { value: Node, pattern: Node, operator_loc: Location, location: Location } def operator: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents the use of the `=>` operator. # # foo => bar # ^^^^^^^^^^ class MatchRequiredNode < Node attr_reader value: Node attr_reader pattern: Node attr_reader operator_loc: Location - def initialize: (value: Node, pattern: Node, operator_loc: Location, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Node value, Node pattern, Location operator_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> MatchRequiredNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { value: Node, pattern: Node, operator_loc: Location, location: Location } def operator: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end - # Represents writing local variables using a regular expression match with - # named capture groups. + # Represents writing local variables using a regular expression match with named capture groups. # # /(?<foo>bar)/ =~ baz # ^^^^^^^^^^^^^^^^^^^^ class MatchWriteNode < Node attr_reader call: CallNode attr_reader targets: Array[Node] - def initialize: (call: CallNode, targets: Array[Node], location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (CallNode call, Array[Node] targets, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> MatchWriteNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { call: CallNode, targets: Array[Node], location: Location } - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end - # Represents a node that is missing from the source and results in a syntax - # error. + # Represents a node that is missing from the source and results in a syntax error. class MissingNode < Node - def initialize: (location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> MissingNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents a module declaration involving the `module` keyword. # # module Foo end # ^^^^^^^^^^^^^^ @@ -2694,25 +2711,25 @@ attr_reader constant_path: Node attr_reader body: Node? attr_reader end_keyword_loc: Location attr_reader name: Symbol - def initialize: (locals: Array[Symbol], module_keyword_loc: Location, constant_path: Node, body: Node?, end_keyword_loc: Location, name: Symbol, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Array[Symbol] locals, Location module_keyword_loc, Node constant_path, Node? body, Location end_keyword_loc, Symbol name, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> ModuleNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], module_keyword_loc: Location, constant_path: Node, body: Node?, end_keyword_loc: Location, name: Symbol, location: Location } def module_keyword: () -> String def end_keyword: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents a multi-target expression. # # a, (b, c) = 1, 2, 3 # ^^^^^^ @@ -2721,25 +2738,25 @@ attr_reader rest: Node? attr_reader rights: Array[Node] attr_reader lparen_loc: Location? attr_reader rparen_loc: Location? - def initialize: (lefts: Array[Node], rest: Node?, rights: Array[Node], lparen_loc: Location?, rparen_loc: Location?, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Array[Node] lefts, Node? rest, Array[Node] rights, Location? lparen_loc, Location? rparen_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> MultiTargetNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { lefts: Array[Node], rest: Node?, rights: Array[Node], lparen_loc: Location?, rparen_loc: Location?, location: Location } def lparen: () -> String? def rparen: () -> String? - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents a write to a multi-target expression. # # a, b, c = 1, 2, 3 # ^^^^^^^^^^^^^^^^^ @@ -2750,201 +2767,206 @@ attr_reader lparen_loc: Location? attr_reader rparen_loc: Location? attr_reader operator_loc: Location attr_reader value: Node - def initialize: (lefts: Array[Node], rest: Node?, rights: Array[Node], lparen_loc: Location?, rparen_loc: Location?, operator_loc: Location, value: Node, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Array[Node] lefts, Node? rest, Array[Node] rights, Location? lparen_loc, Location? rparen_loc, Location operator_loc, Node value, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> MultiWriteNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { lefts: Array[Node], rest: Node?, rights: Array[Node], lparen_loc: Location?, rparen_loc: Location?, operator_loc: Location, value: Node, location: Location } def lparen: () -> String? def rparen: () -> String? def operator: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents the use of the `next` keyword. # # next 1 # ^^^^^^ class NextNode < Node attr_reader arguments: ArgumentsNode? attr_reader keyword_loc: Location - def initialize: (arguments: ArgumentsNode?, keyword_loc: Location, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (ArgumentsNode? arguments, Location keyword_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> NextNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { arguments: ArgumentsNode?, keyword_loc: Location, location: Location } def keyword: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents the use of the `nil` keyword. # # nil # ^^^ class NilNode < Node - def initialize: (location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> NilNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents the use of `**nil` inside method arguments. # # def a(**nil) # ^^^^^ # end class NoKeywordsParameterNode < Node attr_reader operator_loc: Location attr_reader keyword_loc: Location - def initialize: (operator_loc: Location, keyword_loc: Location, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Location operator_loc, Location keyword_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> NoKeywordsParameterNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { operator_loc: Location, keyword_loc: Location, location: Location } def operator: () -> String def keyword: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end - # Represents an implicit set of parameters through the use of numbered - # parameters within a block or lambda. + # Represents an implicit set of parameters through the use of numbered parameters within a block or lambda. # # -> { _1 + _2 } # ^^^^^^^^^^^^^^ class NumberedParametersNode < Node attr_reader maximum: Integer - def initialize: (maximum: Integer, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Integer maximum, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> NumberedParametersNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { maximum: Integer, location: Location } - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents reading a numbered reference to a capture in the previous match. # # $1 # ^^ class NumberedReferenceReadNode < Node attr_reader number: Integer - def initialize: (number: Integer, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Integer number, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> NumberedReferenceReadNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { number: Integer, location: Location } - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents an optional keyword parameter to a method, block, or lambda definition. # # def a(b: 1) # ^^^^ # end class OptionalKeywordParameterNode < Node + private attr_reader flags: Integer attr_reader name: Symbol attr_reader name_loc: Location attr_reader value: Node - def initialize: (name: Symbol, name_loc: Location, value: Node, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Integer flags, Symbol name, Location name_loc, Node value, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> OptionalKeywordParameterNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, name_loc: Location, value: Node, location: Location } - def inspect: (inspector: NodeInspector) -> String + def repeated_parameter?: () -> bool + + def inspect: (?NodeInspector inspector) -> String end # Represents an optional parameter to a method, block, or lambda definition. # # def a(b = 1) # ^^^^^ # end class OptionalParameterNode < Node + private attr_reader flags: Integer attr_reader name: Symbol attr_reader name_loc: Location attr_reader operator_loc: Location attr_reader value: Node - def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Integer flags, Symbol name, Location name_loc, Location operator_loc, Node value, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> OptionalParameterNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location } + def repeated_parameter?: () -> bool + def operator: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents the use of the `||` operator or the `or` keyword. # # left or right # ^^^^^^^^^^^^^ class OrNode < Node attr_reader left: Node attr_reader right: Node attr_reader operator_loc: Location - def initialize: (left: Node, right: Node, operator_loc: Location, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Node left, Node right, Location operator_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> OrNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { left: Node, right: Node, operator_loc: Location, location: Location } def operator: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents the list of parameters on a method, block, or lambda definition. # # def a(b, c, d) # ^^^^^^^ @@ -2956,98 +2978,96 @@ attr_reader posts: Array[Node] attr_reader keywords: Array[Node] attr_reader keyword_rest: Node? attr_reader block: BlockParameterNode? - def initialize: (requireds: Array[Node], optionals: Array[Node], rest: Node?, posts: Array[Node], keywords: Array[Node], keyword_rest: Node?, block: BlockParameterNode?, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Array[Node] requireds, Array[Node] optionals, Node? rest, Array[Node] posts, Array[Node] keywords, Node? keyword_rest, BlockParameterNode? block, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> ParametersNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { requireds: Array[Node], optionals: Array[Node], rest: Node?, posts: Array[Node], keywords: Array[Node], keyword_rest: Node?, block: BlockParameterNode?, location: Location } - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents a parenthesized expression # # (10 + 34) # ^^^^^^^^^ class ParenthesesNode < Node attr_reader body: Node? attr_reader opening_loc: Location attr_reader closing_loc: Location - def initialize: (body: Node?, opening_loc: Location, closing_loc: Location, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Node? body, Location opening_loc, Location closing_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> ParenthesesNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { body: Node?, opening_loc: Location, closing_loc: Location, location: Location } def opening: () -> String def closing: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end - # Represents the use of the `^` operator for pinning an expression in a - # pattern matching expression. + # Represents the use of the `^` operator for pinning an expression in a pattern matching expression. # # foo in ^(bar) # ^^^^^^ class PinnedExpressionNode < Node attr_reader expression: Node attr_reader operator_loc: Location attr_reader lparen_loc: Location attr_reader rparen_loc: Location - def initialize: (expression: Node, operator_loc: Location, lparen_loc: Location, rparen_loc: Location, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Node expression, Location operator_loc, Location lparen_loc, Location rparen_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> PinnedExpressionNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { expression: Node, operator_loc: Location, lparen_loc: Location, rparen_loc: Location, location: Location } def operator: () -> String def lparen: () -> String def rparen: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end - # Represents the use of the `^` operator for pinning a variable in a pattern - # matching expression. + # Represents the use of the `^` operator for pinning a variable in a pattern matching expression. # # foo in ^bar # ^^^^ class PinnedVariableNode < Node attr_reader variable: Node attr_reader operator_loc: Location - def initialize: (variable: Node, operator_loc: Location, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Node variable, Location operator_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> PinnedVariableNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { variable: Node, operator_loc: Location, location: Location } def operator: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents the use of the `END` keyword. # # END { foo } # ^^^^^^^^^^^ @@ -3055,27 +3075,27 @@ attr_reader statements: StatementsNode? attr_reader keyword_loc: Location attr_reader opening_loc: Location attr_reader closing_loc: Location - def initialize: (statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (StatementsNode? statements, Location keyword_loc, Location opening_loc, Location closing_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> PostExecutionNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location, location: Location } def keyword: () -> String def opening: () -> String def closing: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents the use of the `BEGIN` keyword. # # BEGIN { foo } # ^^^^^^^^^^^^^ @@ -3083,131 +3103,131 @@ attr_reader statements: StatementsNode? attr_reader keyword_loc: Location attr_reader opening_loc: Location attr_reader closing_loc: Location - def initialize: (statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (StatementsNode? statements, Location keyword_loc, Location opening_loc, Location closing_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> PreExecutionNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location, location: Location } def keyword: () -> String def opening: () -> String def closing: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # The top level node of any parse tree. class ProgramNode < Node attr_reader locals: Array[Symbol] attr_reader statements: StatementsNode - def initialize: (locals: Array[Symbol], statements: StatementsNode, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Array[Symbol] locals, StatementsNode statements, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> ProgramNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], statements: StatementsNode, location: Location } - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents the use of the `..` or `...` operators. # # 1..2 # ^^^^ # # c if a =~ /left/ ... b =~ /right/ # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ class RangeNode < Node - attr_reader flags: Integer + private attr_reader flags: Integer attr_reader left: Node? attr_reader right: Node? attr_reader operator_loc: Location - def initialize: (flags: Integer, left: Node?, right: Node?, operator_loc: Location, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Integer flags, Node? left, Node? right, Location operator_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> RangeNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, left: Node?, right: Node?, operator_loc: Location, location: Location } def exclude_end?: () -> bool def operator: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents a rational number literal. # # 1.0r # ^^^^ class RationalNode < Node attr_reader numeric: Node - def initialize: (numeric: Node, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Node numeric, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> RationalNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { numeric: Node, location: Location } - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents the use of the `redo` keyword. # # redo # ^^^^ class RedoNode < Node - def initialize: (location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> RedoNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents a regular expression literal with no interpolation. # # /foo/i # ^^^^^^ class RegularExpressionNode < Node - attr_reader flags: Integer + private attr_reader flags: Integer attr_reader opening_loc: Location attr_reader content_loc: Location attr_reader closing_loc: Location attr_reader unescaped: String - def initialize: (flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Integer flags, Location opening_loc, Location content_loc, Location closing_loc, String unescaped, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> RegularExpressionNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location } def ignore_case?: () -> bool def extended?: () -> bool @@ -3233,191 +3253,199 @@ def content: () -> String def closing: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents a required keyword parameter to a method, block, or lambda definition. # # def a(b: ) # ^^ # end class RequiredKeywordParameterNode < Node + private attr_reader flags: Integer attr_reader name: Symbol attr_reader name_loc: Location - def initialize: (name: Symbol, name_loc: Location, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Integer flags, Symbol name, Location name_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> RequiredKeywordParameterNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, name_loc: Location, location: Location } - def inspect: (inspector: NodeInspector) -> String + def repeated_parameter?: () -> bool + + def inspect: (?NodeInspector inspector) -> String end # Represents a required parameter to a method, block, or lambda definition. # # def a(b) # ^ # end class RequiredParameterNode < Node + private attr_reader flags: Integer attr_reader name: Symbol - def initialize: (name: Symbol, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Integer flags, Symbol name, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> RequiredParameterNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, location: Location } - def inspect: (inspector: NodeInspector) -> String + def repeated_parameter?: () -> bool + + def inspect: (?NodeInspector inspector) -> String end # Represents an expression modified with a rescue. # # foo rescue nil # ^^^^^^^^^^^^^^ class RescueModifierNode < Node attr_reader expression: Node attr_reader keyword_loc: Location attr_reader rescue_expression: Node - def initialize: (expression: Node, keyword_loc: Location, rescue_expression: Node, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Node expression, Location keyword_loc, Node rescue_expression, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> RescueModifierNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { expression: Node, keyword_loc: Location, rescue_expression: Node, location: Location } def keyword: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String 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. + # `Foo, *splat, Bar` are in the `exceptions` field. `ex` is in the `exception` field. class RescueNode < Node attr_reader keyword_loc: Location attr_reader exceptions: Array[Node] attr_reader operator_loc: Location? attr_reader reference: Node? attr_reader statements: StatementsNode? attr_reader consequent: RescueNode? - def initialize: (keyword_loc: Location, exceptions: Array[Node], operator_loc: Location?, reference: Node?, statements: StatementsNode?, consequent: RescueNode?, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Location keyword_loc, Array[Node] exceptions, Location? operator_loc, Node? reference, StatementsNode? statements, RescueNode? consequent, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> RescueNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, exceptions: Array[Node], operator_loc: Location?, reference: Node?, statements: StatementsNode?, consequent: RescueNode?, location: Location } def keyword: () -> String def operator: () -> String? - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents a rest parameter to a method, block, or lambda definition. # # def a(*b) # ^^ # end class RestParameterNode < Node + private attr_reader flags: Integer attr_reader name: Symbol? attr_reader name_loc: Location? attr_reader operator_loc: Location - def initialize: (name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Integer flags, Symbol? name, Location? name_loc, Location operator_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> RestParameterNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location } + def repeated_parameter?: () -> bool + def operator: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents the use of the `retry` keyword. # # retry # ^^^^^ class RetryNode < Node - def initialize: (location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> RetryNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents the use of the `return` keyword. # # return 1 # ^^^^^^^^ class ReturnNode < Node attr_reader keyword_loc: Location attr_reader arguments: ArgumentsNode? - def initialize: (keyword_loc: Location, arguments: ArgumentsNode?, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Location keyword_loc, ArgumentsNode? arguments, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> ReturnNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, arguments: ArgumentsNode?, location: Location } def keyword: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents the `self` keyword. # # self # ^^^^ class SelfNode < Node - def initialize: (location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> SelfNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents a singleton class declaration involving the `class` keyword. # # class << self end # ^^^^^^^^^^^^^^^^^ @@ -3427,151 +3455,150 @@ attr_reader operator_loc: Location attr_reader expression: Node attr_reader body: Node? attr_reader end_keyword_loc: Location - def initialize: (locals: Array[Symbol], class_keyword_loc: Location, operator_loc: Location, expression: Node, body: Node?, end_keyword_loc: Location, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Array[Symbol] locals, Location class_keyword_loc, Location operator_loc, Node expression, Node? body, Location end_keyword_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> SingletonClassNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], class_keyword_loc: Location, operator_loc: Location, expression: Node, body: Node?, end_keyword_loc: Location, location: Location } def class_keyword: () -> String def operator: () -> String def end_keyword: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents the use of the `__ENCODING__` keyword. # # __ENCODING__ # ^^^^^^^^^^^^ class SourceEncodingNode < Node - def initialize: (location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> SourceEncodingNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents the use of the `__FILE__` keyword. # # __FILE__ # ^^^^^^^^ class SourceFileNode < Node attr_reader filepath: String - def initialize: (filepath: String, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (String filepath, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> SourceFileNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { filepath: String, location: Location } - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents the use of the `__LINE__` keyword. # # __LINE__ # ^^^^^^^^ class SourceLineNode < Node - def initialize: (location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> SourceLineNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents the use of the splat operator. # # [*a] # ^^ class SplatNode < Node attr_reader operator_loc: Location attr_reader expression: Node? - def initialize: (operator_loc: Location, expression: Node?, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Location operator_loc, Node? expression, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> SplatNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { operator_loc: Location, expression: Node?, location: Location } def operator: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents a set of statements contained within some scope. # # foo; bar; baz # ^^^^^^^^^^^^^ class StatementsNode < Node attr_reader body: Array[Node] - def initialize: (body: Array[Node], location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Array[Node] body, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> StatementsNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { body: Array[Node], location: Location } - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end - # Represents a string literal, a string contained within a `%w` list, or - # plain string content within an interpolated string. + # 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" # ^^^^ ^^^^ class StringNode < Node - attr_reader flags: Integer + private attr_reader flags: Integer attr_reader opening_loc: Location? attr_reader content_loc: Location attr_reader closing_loc: Location? attr_reader unescaped: String - def initialize: (flags: Integer, opening_loc: Location?, content_loc: Location, closing_loc: Location?, unescaped: String, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Integer flags, Location? opening_loc, Location content_loc, Location? closing_loc, String unescaped, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> StringNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location?, content_loc: Location, closing_loc: Location?, unescaped: String, location: Location } def forced_utf8_encoding?: () -> bool def forced_binary_encoding?: () -> bool @@ -3581,11 +3608,11 @@ def content: () -> String def closing: () -> String? - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents the use of the `super` keyword with parentheses or arguments. # # super() # ^^^^^^^ @@ -3597,51 +3624,51 @@ attr_reader lparen_loc: Location? attr_reader arguments: ArgumentsNode? attr_reader rparen_loc: Location? attr_reader block: Node? - def initialize: (keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, block: Node?, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Location keyword_loc, Location? lparen_loc, ArgumentsNode? arguments, Location? rparen_loc, Node? block, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> SuperNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, block: Node?, location: Location } def keyword: () -> String def lparen: () -> String? def rparen: () -> String? - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents a symbol literal or a symbol contained within a `%i` list. # # :foo # ^^^^ # # %i[foo] # ^^^ class SymbolNode < Node - attr_reader flags: Integer + private attr_reader flags: Integer attr_reader opening_loc: Location? attr_reader value_loc: Location? attr_reader closing_loc: Location? attr_reader unescaped: String - def initialize: (flags: Integer, opening_loc: Location?, value_loc: Location?, closing_loc: Location?, unescaped: String, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Integer flags, Location? opening_loc, Location? value_loc, Location? closing_loc, String unescaped, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> SymbolNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location?, value_loc: Location?, closing_loc: Location?, unescaped: String, location: Location } def forced_utf8_encoding?: () -> bool def forced_binary_encoding?: () -> bool @@ -3651,51 +3678,51 @@ def value: () -> String? def closing: () -> String? - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents the use of the literal `true` keyword. # # true # ^^^^ class TrueNode < Node - def initialize: (location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> TrueNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents the use of the `undef` keyword. # # undef :foo, :bar, :baz # ^^^^^^^^^^^^^^^^^^^^^^ class UndefNode < Node attr_reader names: Array[Node] attr_reader keyword_loc: Location - def initialize: (names: Array[Node], keyword_loc: Location, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Array[Node] names, Location keyword_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> UndefNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { names: Array[Node], keyword_loc: Location, location: Location } def keyword: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents the use of the `unless` keyword, either in the block form or the modifier form. # # bar unless foo # ^^^^^^^^^^^^^^ @@ -3708,59 +3735,59 @@ attr_reader then_keyword_loc: Location? attr_reader statements: StatementsNode? attr_reader consequent: ElseNode? attr_reader end_keyword_loc: Location? - def initialize: (keyword_loc: Location, predicate: Node, then_keyword_loc: Location?, statements: StatementsNode?, consequent: ElseNode?, end_keyword_loc: Location?, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Location keyword_loc, Node predicate, Location? then_keyword_loc, StatementsNode? statements, ElseNode? consequent, Location? end_keyword_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> UnlessNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, predicate: Node, then_keyword_loc: Location?, statements: StatementsNode?, consequent: ElseNode?, end_keyword_loc: Location?, location: Location } def keyword: () -> String def then_keyword: () -> String? def end_keyword: () -> String? - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String 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 # ^^^^^^^^^^^^^^^^^^^^ class UntilNode < Node - attr_reader flags: Integer + private attr_reader flags: Integer attr_reader keyword_loc: Location attr_reader closing_loc: Location? attr_reader predicate: Node attr_reader statements: StatementsNode? - def initialize: (flags: Integer, keyword_loc: Location, closing_loc: Location?, predicate: Node, statements: StatementsNode?, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Integer flags, Location keyword_loc, Location? closing_loc, Node predicate, StatementsNode? statements, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> UntilNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, keyword_loc: Location, closing_loc: Location?, predicate: Node, statements: StatementsNode?, location: Location } def begin_modifier?: () -> bool def keyword: () -> String def closing: () -> String? - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents the use of the `when` keyword within a case statement. # # case true # when true @@ -3769,76 +3796,76 @@ class WhenNode < Node attr_reader keyword_loc: Location attr_reader conditions: Array[Node] attr_reader statements: StatementsNode? - def initialize: (keyword_loc: Location, conditions: Array[Node], statements: StatementsNode?, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Location keyword_loc, Array[Node] conditions, StatementsNode? statements, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> WhenNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, conditions: Array[Node], statements: StatementsNode?, location: Location } def keyword: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String 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 # ^^^^^^^^^^^^^^^^^^^^ class WhileNode < Node - attr_reader flags: Integer + private attr_reader flags: Integer attr_reader keyword_loc: Location attr_reader closing_loc: Location? attr_reader predicate: Node attr_reader statements: StatementsNode? - def initialize: (flags: Integer, keyword_loc: Location, closing_loc: Location?, predicate: Node, statements: StatementsNode?, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Integer flags, Location keyword_loc, Location? closing_loc, Node predicate, StatementsNode? statements, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> WhileNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, keyword_loc: Location, closing_loc: Location?, predicate: Node, statements: StatementsNode?, location: Location } def begin_modifier?: () -> bool def keyword: () -> String def closing: () -> String? - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents an xstring literal with no interpolation. # # `foo` # ^^^^^ class XStringNode < Node - attr_reader flags: Integer + private attr_reader flags: Integer attr_reader opening_loc: Location attr_reader content_loc: Location attr_reader closing_loc: Location attr_reader unescaped: String - def initialize: (flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Integer flags, Location opening_loc, Location content_loc, Location closing_loc, String unescaped, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> XStringNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location } def forced_utf8_encoding?: () -> bool def forced_binary_encoding?: () -> bool @@ -3846,11 +3873,11 @@ def content: () -> String def closing: () -> String - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Represents the use of the `yield` keyword. # # yield 1 # ^^^^^^^ @@ -3858,27 +3885,27 @@ attr_reader keyword_loc: Location attr_reader lparen_loc: Location? attr_reader arguments: ArgumentsNode? attr_reader rparen_loc: Location? - def initialize: (keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, location: Location) -> void - def accept: (visitor: Visitor) -> void - def set_newline_flag: (newline_marked: Array[bool]) -> void + def initialize: (Location keyword_loc, Location? lparen_loc, ArgumentsNode? arguments, Location? rparen_loc, Location location) -> void + def accept: (Visitor visitor) -> void + def set_newline_flag: (Array[bool] newline_marked) -> void def child_nodes: () -> Array[Node?] def deconstruct: () -> Array[Node?] def copy: (**untyped) -> YieldNode - def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?] + def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, location: Location } def keyword: () -> String def lparen: () -> String? def rparen: () -> String? - def inspect: (inspector: NodeInspector) -> String + def inspect: (?NodeInspector inspector) -> String end # Flags for arguments nodes. module ArgumentsNodeFlags # if arguments contain keyword splat @@ -3897,10 +3924,12 @@ SAFE_NAVIGATION: Integer # a call that could have been a local variable VARIABLE_CALL: Integer # a call that is an attribute write, so the value being written should be returned ATTRIBUTE_WRITE: Integer + # a call that ignores method visibility + IGNORE_VISIBILITY: Integer end # Flags for nodes that have unescaped content. module EncodingFlags # internal bytes forced the encoding to UTF-8 @@ -3921,20 +3950,26 @@ HEXADECIMAL: Integer end # Flags for keyword hash nodes. module KeywordHashNodeFlags - # a keyword hash which only has `AssocNode` elements all with static literal keys, which means the elements can be treated as keyword arguments - STATIC_KEYS: Integer + # a keyword hash which only has `AssocNode` elements all with symbol keys, which means the elements can be treated as keyword arguments + SYMBOL_KEYS: Integer end # Flags for while and until loop nodes. module LoopFlags # a loop after a begin statement, so the body is executed first before the condition BEGIN_MODIFIER: Integer end + # Flags for parameter nodes. + module ParameterFlags + # a parameter name that has been repeated in the method signature + REPEATED_PARAMETER: Integer + end + # Flags for range and flip-flop nodes. module RangeFlags # ... operator EXCLUDE_END: Integer end @@ -3986,459 +4021,459 @@ end class Visitor < BasicVisitor # Visit a AliasGlobalVariableNode node - def visit_alias_global_variable_node: (node: AliasGlobalVariableNode) -> void + def visit_alias_global_variable_node: (AliasGlobalVariableNode node) -> void # Visit a AliasMethodNode node - def visit_alias_method_node: (node: AliasMethodNode) -> void + def visit_alias_method_node: (AliasMethodNode node) -> void # Visit a AlternationPatternNode node - def visit_alternation_pattern_node: (node: AlternationPatternNode) -> void + def visit_alternation_pattern_node: (AlternationPatternNode node) -> void # Visit a AndNode node - def visit_and_node: (node: AndNode) -> void + def visit_and_node: (AndNode node) -> void # Visit a ArgumentsNode node - def visit_arguments_node: (node: ArgumentsNode) -> void + def visit_arguments_node: (ArgumentsNode node) -> void # Visit a ArrayNode node - def visit_array_node: (node: ArrayNode) -> void + def visit_array_node: (ArrayNode node) -> void # Visit a ArrayPatternNode node - def visit_array_pattern_node: (node: ArrayPatternNode) -> void + def visit_array_pattern_node: (ArrayPatternNode node) -> void # Visit a AssocNode node - def visit_assoc_node: (node: AssocNode) -> void + def visit_assoc_node: (AssocNode node) -> void # Visit a AssocSplatNode node - def visit_assoc_splat_node: (node: AssocSplatNode) -> void + def visit_assoc_splat_node: (AssocSplatNode node) -> void # Visit a BackReferenceReadNode node - def visit_back_reference_read_node: (node: BackReferenceReadNode) -> void + def visit_back_reference_read_node: (BackReferenceReadNode node) -> void # Visit a BeginNode node - def visit_begin_node: (node: BeginNode) -> void + def visit_begin_node: (BeginNode node) -> void # Visit a BlockArgumentNode node - def visit_block_argument_node: (node: BlockArgumentNode) -> void + def visit_block_argument_node: (BlockArgumentNode node) -> void # Visit a BlockLocalVariableNode node - def visit_block_local_variable_node: (node: BlockLocalVariableNode) -> void + def visit_block_local_variable_node: (BlockLocalVariableNode node) -> void # Visit a BlockNode node - def visit_block_node: (node: BlockNode) -> void + def visit_block_node: (BlockNode node) -> void # Visit a BlockParameterNode node - def visit_block_parameter_node: (node: BlockParameterNode) -> void + def visit_block_parameter_node: (BlockParameterNode node) -> void # Visit a BlockParametersNode node - def visit_block_parameters_node: (node: BlockParametersNode) -> void + def visit_block_parameters_node: (BlockParametersNode node) -> void # Visit a BreakNode node - def visit_break_node: (node: BreakNode) -> void + def visit_break_node: (BreakNode node) -> void # Visit a CallAndWriteNode node - def visit_call_and_write_node: (node: CallAndWriteNode) -> void + def visit_call_and_write_node: (CallAndWriteNode node) -> void # Visit a CallNode node - def visit_call_node: (node: CallNode) -> void + def visit_call_node: (CallNode node) -> void # Visit a CallOperatorWriteNode node - def visit_call_operator_write_node: (node: CallOperatorWriteNode) -> void + def visit_call_operator_write_node: (CallOperatorWriteNode node) -> void # Visit a CallOrWriteNode node - def visit_call_or_write_node: (node: CallOrWriteNode) -> void + def visit_call_or_write_node: (CallOrWriteNode node) -> void # Visit a CallTargetNode node - def visit_call_target_node: (node: CallTargetNode) -> void + def visit_call_target_node: (CallTargetNode node) -> void # Visit a CapturePatternNode node - def visit_capture_pattern_node: (node: CapturePatternNode) -> void + def visit_capture_pattern_node: (CapturePatternNode node) -> void # Visit a CaseMatchNode node - def visit_case_match_node: (node: CaseMatchNode) -> void + def visit_case_match_node: (CaseMatchNode node) -> void # Visit a CaseNode node - def visit_case_node: (node: CaseNode) -> void + def visit_case_node: (CaseNode node) -> void # Visit a ClassNode node - def visit_class_node: (node: ClassNode) -> void + def visit_class_node: (ClassNode node) -> void # Visit a ClassVariableAndWriteNode node - def visit_class_variable_and_write_node: (node: ClassVariableAndWriteNode) -> void + def visit_class_variable_and_write_node: (ClassVariableAndWriteNode node) -> void # Visit a ClassVariableOperatorWriteNode node - def visit_class_variable_operator_write_node: (node: ClassVariableOperatorWriteNode) -> void + def visit_class_variable_operator_write_node: (ClassVariableOperatorWriteNode node) -> void # Visit a ClassVariableOrWriteNode node - def visit_class_variable_or_write_node: (node: ClassVariableOrWriteNode) -> void + def visit_class_variable_or_write_node: (ClassVariableOrWriteNode node) -> void # Visit a ClassVariableReadNode node - def visit_class_variable_read_node: (node: ClassVariableReadNode) -> void + def visit_class_variable_read_node: (ClassVariableReadNode node) -> void # Visit a ClassVariableTargetNode node - def visit_class_variable_target_node: (node: ClassVariableTargetNode) -> void + def visit_class_variable_target_node: (ClassVariableTargetNode node) -> void # Visit a ClassVariableWriteNode node - def visit_class_variable_write_node: (node: ClassVariableWriteNode) -> void + def visit_class_variable_write_node: (ClassVariableWriteNode node) -> void # Visit a ConstantAndWriteNode node - def visit_constant_and_write_node: (node: ConstantAndWriteNode) -> void + def visit_constant_and_write_node: (ConstantAndWriteNode node) -> void # Visit a ConstantOperatorWriteNode node - def visit_constant_operator_write_node: (node: ConstantOperatorWriteNode) -> void + def visit_constant_operator_write_node: (ConstantOperatorWriteNode node) -> void # Visit a ConstantOrWriteNode node - def visit_constant_or_write_node: (node: ConstantOrWriteNode) -> void + def visit_constant_or_write_node: (ConstantOrWriteNode node) -> void # Visit a ConstantPathAndWriteNode node - def visit_constant_path_and_write_node: (node: ConstantPathAndWriteNode) -> void + def visit_constant_path_and_write_node: (ConstantPathAndWriteNode node) -> void # Visit a ConstantPathNode node - def visit_constant_path_node: (node: ConstantPathNode) -> void + def visit_constant_path_node: (ConstantPathNode node) -> void # Visit a ConstantPathOperatorWriteNode node - def visit_constant_path_operator_write_node: (node: ConstantPathOperatorWriteNode) -> void + def visit_constant_path_operator_write_node: (ConstantPathOperatorWriteNode node) -> void # Visit a ConstantPathOrWriteNode node - def visit_constant_path_or_write_node: (node: ConstantPathOrWriteNode) -> void + def visit_constant_path_or_write_node: (ConstantPathOrWriteNode node) -> void # Visit a ConstantPathTargetNode node - def visit_constant_path_target_node: (node: ConstantPathTargetNode) -> void + def visit_constant_path_target_node: (ConstantPathTargetNode node) -> void # Visit a ConstantPathWriteNode node - def visit_constant_path_write_node: (node: ConstantPathWriteNode) -> void + def visit_constant_path_write_node: (ConstantPathWriteNode node) -> void # Visit a ConstantReadNode node - def visit_constant_read_node: (node: ConstantReadNode) -> void + def visit_constant_read_node: (ConstantReadNode node) -> void # Visit a ConstantTargetNode node - def visit_constant_target_node: (node: ConstantTargetNode) -> void + def visit_constant_target_node: (ConstantTargetNode node) -> void # Visit a ConstantWriteNode node - def visit_constant_write_node: (node: ConstantWriteNode) -> void + def visit_constant_write_node: (ConstantWriteNode node) -> void # Visit a DefNode node - def visit_def_node: (node: DefNode) -> void + def visit_def_node: (DefNode node) -> void # Visit a DefinedNode node - def visit_defined_node: (node: DefinedNode) -> void + def visit_defined_node: (DefinedNode node) -> void # Visit a ElseNode node - def visit_else_node: (node: ElseNode) -> void + def visit_else_node: (ElseNode node) -> void # Visit a EmbeddedStatementsNode node - def visit_embedded_statements_node: (node: EmbeddedStatementsNode) -> void + def visit_embedded_statements_node: (EmbeddedStatementsNode node) -> void # Visit a EmbeddedVariableNode node - def visit_embedded_variable_node: (node: EmbeddedVariableNode) -> void + def visit_embedded_variable_node: (EmbeddedVariableNode node) -> void # Visit a EnsureNode node - def visit_ensure_node: (node: EnsureNode) -> void + def visit_ensure_node: (EnsureNode node) -> void # Visit a FalseNode node - def visit_false_node: (node: FalseNode) -> void + def visit_false_node: (FalseNode node) -> void # Visit a FindPatternNode node - def visit_find_pattern_node: (node: FindPatternNode) -> void + def visit_find_pattern_node: (FindPatternNode node) -> void # Visit a FlipFlopNode node - def visit_flip_flop_node: (node: FlipFlopNode) -> void + def visit_flip_flop_node: (FlipFlopNode node) -> void # Visit a FloatNode node - def visit_float_node: (node: FloatNode) -> void + def visit_float_node: (FloatNode node) -> void # Visit a ForNode node - def visit_for_node: (node: ForNode) -> void + def visit_for_node: (ForNode node) -> void # Visit a ForwardingArgumentsNode node - def visit_forwarding_arguments_node: (node: ForwardingArgumentsNode) -> void + def visit_forwarding_arguments_node: (ForwardingArgumentsNode node) -> void # Visit a ForwardingParameterNode node - def visit_forwarding_parameter_node: (node: ForwardingParameterNode) -> void + def visit_forwarding_parameter_node: (ForwardingParameterNode node) -> void # Visit a ForwardingSuperNode node - def visit_forwarding_super_node: (node: ForwardingSuperNode) -> void + def visit_forwarding_super_node: (ForwardingSuperNode node) -> void # Visit a GlobalVariableAndWriteNode node - def visit_global_variable_and_write_node: (node: GlobalVariableAndWriteNode) -> void + def visit_global_variable_and_write_node: (GlobalVariableAndWriteNode node) -> void # Visit a GlobalVariableOperatorWriteNode node - def visit_global_variable_operator_write_node: (node: GlobalVariableOperatorWriteNode) -> void + def visit_global_variable_operator_write_node: (GlobalVariableOperatorWriteNode node) -> void # Visit a GlobalVariableOrWriteNode node - def visit_global_variable_or_write_node: (node: GlobalVariableOrWriteNode) -> void + def visit_global_variable_or_write_node: (GlobalVariableOrWriteNode node) -> void # Visit a GlobalVariableReadNode node - def visit_global_variable_read_node: (node: GlobalVariableReadNode) -> void + def visit_global_variable_read_node: (GlobalVariableReadNode node) -> void # Visit a GlobalVariableTargetNode node - def visit_global_variable_target_node: (node: GlobalVariableTargetNode) -> void + def visit_global_variable_target_node: (GlobalVariableTargetNode node) -> void # Visit a GlobalVariableWriteNode node - def visit_global_variable_write_node: (node: GlobalVariableWriteNode) -> void + def visit_global_variable_write_node: (GlobalVariableWriteNode node) -> void # Visit a HashNode node - def visit_hash_node: (node: HashNode) -> void + def visit_hash_node: (HashNode node) -> void # Visit a HashPatternNode node - def visit_hash_pattern_node: (node: HashPatternNode) -> void + def visit_hash_pattern_node: (HashPatternNode node) -> void # Visit a IfNode node - def visit_if_node: (node: IfNode) -> void + def visit_if_node: (IfNode node) -> void # Visit a ImaginaryNode node - def visit_imaginary_node: (node: ImaginaryNode) -> void + def visit_imaginary_node: (ImaginaryNode node) -> void # Visit a ImplicitNode node - def visit_implicit_node: (node: ImplicitNode) -> void + def visit_implicit_node: (ImplicitNode node) -> void # Visit a ImplicitRestNode node - def visit_implicit_rest_node: (node: ImplicitRestNode) -> void + def visit_implicit_rest_node: (ImplicitRestNode node) -> void # Visit a InNode node - def visit_in_node: (node: InNode) -> void + def visit_in_node: (InNode node) -> void # Visit a IndexAndWriteNode node - def visit_index_and_write_node: (node: IndexAndWriteNode) -> void + def visit_index_and_write_node: (IndexAndWriteNode node) -> void # Visit a IndexOperatorWriteNode node - def visit_index_operator_write_node: (node: IndexOperatorWriteNode) -> void + def visit_index_operator_write_node: (IndexOperatorWriteNode node) -> void # Visit a IndexOrWriteNode node - def visit_index_or_write_node: (node: IndexOrWriteNode) -> void + def visit_index_or_write_node: (IndexOrWriteNode node) -> void # Visit a IndexTargetNode node - def visit_index_target_node: (node: IndexTargetNode) -> void + def visit_index_target_node: (IndexTargetNode node) -> void # Visit a InstanceVariableAndWriteNode node - def visit_instance_variable_and_write_node: (node: InstanceVariableAndWriteNode) -> void + def visit_instance_variable_and_write_node: (InstanceVariableAndWriteNode node) -> void # Visit a InstanceVariableOperatorWriteNode node - def visit_instance_variable_operator_write_node: (node: InstanceVariableOperatorWriteNode) -> void + def visit_instance_variable_operator_write_node: (InstanceVariableOperatorWriteNode node) -> void # Visit a InstanceVariableOrWriteNode node - def visit_instance_variable_or_write_node: (node: InstanceVariableOrWriteNode) -> void + def visit_instance_variable_or_write_node: (InstanceVariableOrWriteNode node) -> void # Visit a InstanceVariableReadNode node - def visit_instance_variable_read_node: (node: InstanceVariableReadNode) -> void + def visit_instance_variable_read_node: (InstanceVariableReadNode node) -> void # Visit a InstanceVariableTargetNode node - def visit_instance_variable_target_node: (node: InstanceVariableTargetNode) -> void + def visit_instance_variable_target_node: (InstanceVariableTargetNode node) -> void # Visit a InstanceVariableWriteNode node - def visit_instance_variable_write_node: (node: InstanceVariableWriteNode) -> void + def visit_instance_variable_write_node: (InstanceVariableWriteNode node) -> void # Visit a IntegerNode node - def visit_integer_node: (node: IntegerNode) -> void + def visit_integer_node: (IntegerNode node) -> void # Visit a InterpolatedMatchLastLineNode node - def visit_interpolated_match_last_line_node: (node: InterpolatedMatchLastLineNode) -> void + def visit_interpolated_match_last_line_node: (InterpolatedMatchLastLineNode node) -> void # Visit a InterpolatedRegularExpressionNode node - def visit_interpolated_regular_expression_node: (node: InterpolatedRegularExpressionNode) -> void + def visit_interpolated_regular_expression_node: (InterpolatedRegularExpressionNode node) -> void # Visit a InterpolatedStringNode node - def visit_interpolated_string_node: (node: InterpolatedStringNode) -> void + def visit_interpolated_string_node: (InterpolatedStringNode node) -> void # Visit a InterpolatedSymbolNode node - def visit_interpolated_symbol_node: (node: InterpolatedSymbolNode) -> void + def visit_interpolated_symbol_node: (InterpolatedSymbolNode node) -> void # Visit a InterpolatedXStringNode node - def visit_interpolated_x_string_node: (node: InterpolatedXStringNode) -> void + def visit_interpolated_x_string_node: (InterpolatedXStringNode node) -> void # Visit a KeywordHashNode node - def visit_keyword_hash_node: (node: KeywordHashNode) -> void + def visit_keyword_hash_node: (KeywordHashNode node) -> void # Visit a KeywordRestParameterNode node - def visit_keyword_rest_parameter_node: (node: KeywordRestParameterNode) -> void + def visit_keyword_rest_parameter_node: (KeywordRestParameterNode node) -> void # Visit a LambdaNode node - def visit_lambda_node: (node: LambdaNode) -> void + def visit_lambda_node: (LambdaNode node) -> void # Visit a LocalVariableAndWriteNode node - def visit_local_variable_and_write_node: (node: LocalVariableAndWriteNode) -> void + def visit_local_variable_and_write_node: (LocalVariableAndWriteNode node) -> void # Visit a LocalVariableOperatorWriteNode node - def visit_local_variable_operator_write_node: (node: LocalVariableOperatorWriteNode) -> void + def visit_local_variable_operator_write_node: (LocalVariableOperatorWriteNode node) -> void # Visit a LocalVariableOrWriteNode node - def visit_local_variable_or_write_node: (node: LocalVariableOrWriteNode) -> void + def visit_local_variable_or_write_node: (LocalVariableOrWriteNode node) -> void # Visit a LocalVariableReadNode node - def visit_local_variable_read_node: (node: LocalVariableReadNode) -> void + def visit_local_variable_read_node: (LocalVariableReadNode node) -> void # Visit a LocalVariableTargetNode node - def visit_local_variable_target_node: (node: LocalVariableTargetNode) -> void + def visit_local_variable_target_node: (LocalVariableTargetNode node) -> void # Visit a LocalVariableWriteNode node - def visit_local_variable_write_node: (node: LocalVariableWriteNode) -> void + def visit_local_variable_write_node: (LocalVariableWriteNode node) -> void # Visit a MatchLastLineNode node - def visit_match_last_line_node: (node: MatchLastLineNode) -> void + def visit_match_last_line_node: (MatchLastLineNode node) -> void # Visit a MatchPredicateNode node - def visit_match_predicate_node: (node: MatchPredicateNode) -> void + def visit_match_predicate_node: (MatchPredicateNode node) -> void # Visit a MatchRequiredNode node - def visit_match_required_node: (node: MatchRequiredNode) -> void + def visit_match_required_node: (MatchRequiredNode node) -> void # Visit a MatchWriteNode node - def visit_match_write_node: (node: MatchWriteNode) -> void + def visit_match_write_node: (MatchWriteNode node) -> void # Visit a MissingNode node - def visit_missing_node: (node: MissingNode) -> void + def visit_missing_node: (MissingNode node) -> void # Visit a ModuleNode node - def visit_module_node: (node: ModuleNode) -> void + def visit_module_node: (ModuleNode node) -> void # Visit a MultiTargetNode node - def visit_multi_target_node: (node: MultiTargetNode) -> void + def visit_multi_target_node: (MultiTargetNode node) -> void # Visit a MultiWriteNode node - def visit_multi_write_node: (node: MultiWriteNode) -> void + def visit_multi_write_node: (MultiWriteNode node) -> void # Visit a NextNode node - def visit_next_node: (node: NextNode) -> void + def visit_next_node: (NextNode node) -> void # Visit a NilNode node - def visit_nil_node: (node: NilNode) -> void + def visit_nil_node: (NilNode node) -> void # Visit a NoKeywordsParameterNode node - def visit_no_keywords_parameter_node: (node: NoKeywordsParameterNode) -> void + def visit_no_keywords_parameter_node: (NoKeywordsParameterNode node) -> void # Visit a NumberedParametersNode node - def visit_numbered_parameters_node: (node: NumberedParametersNode) -> void + def visit_numbered_parameters_node: (NumberedParametersNode node) -> void # Visit a NumberedReferenceReadNode node - def visit_numbered_reference_read_node: (node: NumberedReferenceReadNode) -> void + def visit_numbered_reference_read_node: (NumberedReferenceReadNode node) -> void # Visit a OptionalKeywordParameterNode node - def visit_optional_keyword_parameter_node: (node: OptionalKeywordParameterNode) -> void + def visit_optional_keyword_parameter_node: (OptionalKeywordParameterNode node) -> void # Visit a OptionalParameterNode node - def visit_optional_parameter_node: (node: OptionalParameterNode) -> void + def visit_optional_parameter_node: (OptionalParameterNode node) -> void # Visit a OrNode node - def visit_or_node: (node: OrNode) -> void + def visit_or_node: (OrNode node) -> void # Visit a ParametersNode node - def visit_parameters_node: (node: ParametersNode) -> void + def visit_parameters_node: (ParametersNode node) -> void # Visit a ParenthesesNode node - def visit_parentheses_node: (node: ParenthesesNode) -> void + def visit_parentheses_node: (ParenthesesNode node) -> void # Visit a PinnedExpressionNode node - def visit_pinned_expression_node: (node: PinnedExpressionNode) -> void + def visit_pinned_expression_node: (PinnedExpressionNode node) -> void # Visit a PinnedVariableNode node - def visit_pinned_variable_node: (node: PinnedVariableNode) -> void + def visit_pinned_variable_node: (PinnedVariableNode node) -> void # Visit a PostExecutionNode node - def visit_post_execution_node: (node: PostExecutionNode) -> void + def visit_post_execution_node: (PostExecutionNode node) -> void # Visit a PreExecutionNode node - def visit_pre_execution_node: (node: PreExecutionNode) -> void + def visit_pre_execution_node: (PreExecutionNode node) -> void # Visit a ProgramNode node - def visit_program_node: (node: ProgramNode) -> void + def visit_program_node: (ProgramNode node) -> void # Visit a RangeNode node - def visit_range_node: (node: RangeNode) -> void + def visit_range_node: (RangeNode node) -> void # Visit a RationalNode node - def visit_rational_node: (node: RationalNode) -> void + def visit_rational_node: (RationalNode node) -> void # Visit a RedoNode node - def visit_redo_node: (node: RedoNode) -> void + def visit_redo_node: (RedoNode node) -> void # Visit a RegularExpressionNode node - def visit_regular_expression_node: (node: RegularExpressionNode) -> void + def visit_regular_expression_node: (RegularExpressionNode node) -> void # Visit a RequiredKeywordParameterNode node - def visit_required_keyword_parameter_node: (node: RequiredKeywordParameterNode) -> void + def visit_required_keyword_parameter_node: (RequiredKeywordParameterNode node) -> void # Visit a RequiredParameterNode node - def visit_required_parameter_node: (node: RequiredParameterNode) -> void + def visit_required_parameter_node: (RequiredParameterNode node) -> void # Visit a RescueModifierNode node - def visit_rescue_modifier_node: (node: RescueModifierNode) -> void + def visit_rescue_modifier_node: (RescueModifierNode node) -> void # Visit a RescueNode node - def visit_rescue_node: (node: RescueNode) -> void + def visit_rescue_node: (RescueNode node) -> void # Visit a RestParameterNode node - def visit_rest_parameter_node: (node: RestParameterNode) -> void + def visit_rest_parameter_node: (RestParameterNode node) -> void # Visit a RetryNode node - def visit_retry_node: (node: RetryNode) -> void + def visit_retry_node: (RetryNode node) -> void # Visit a ReturnNode node - def visit_return_node: (node: ReturnNode) -> void + def visit_return_node: (ReturnNode node) -> void # Visit a SelfNode node - def visit_self_node: (node: SelfNode) -> void + def visit_self_node: (SelfNode node) -> void # Visit a SingletonClassNode node - def visit_singleton_class_node: (node: SingletonClassNode) -> void + def visit_singleton_class_node: (SingletonClassNode node) -> void # Visit a SourceEncodingNode node - def visit_source_encoding_node: (node: SourceEncodingNode) -> void + def visit_source_encoding_node: (SourceEncodingNode node) -> void # Visit a SourceFileNode node - def visit_source_file_node: (node: SourceFileNode) -> void + def visit_source_file_node: (SourceFileNode node) -> void # Visit a SourceLineNode node - def visit_source_line_node: (node: SourceLineNode) -> void + def visit_source_line_node: (SourceLineNode node) -> void # Visit a SplatNode node - def visit_splat_node: (node: SplatNode) -> void + def visit_splat_node: (SplatNode node) -> void # Visit a StatementsNode node - def visit_statements_node: (node: StatementsNode) -> void + def visit_statements_node: (StatementsNode node) -> void # Visit a StringNode node - def visit_string_node: (node: StringNode) -> void + def visit_string_node: (StringNode node) -> void # Visit a SuperNode node - def visit_super_node: (node: SuperNode) -> void + def visit_super_node: (SuperNode node) -> void # Visit a SymbolNode node - def visit_symbol_node: (node: SymbolNode) -> void + def visit_symbol_node: (SymbolNode node) -> void # Visit a TrueNode node - def visit_true_node: (node: TrueNode) -> void + def visit_true_node: (TrueNode node) -> void # Visit a UndefNode node - def visit_undef_node: (node: UndefNode) -> void + def visit_undef_node: (UndefNode node) -> void # Visit a UnlessNode node - def visit_unless_node: (node: UnlessNode) -> void + def visit_unless_node: (UnlessNode node) -> void # Visit a UntilNode node - def visit_until_node: (node: UntilNode) -> void + def visit_until_node: (UntilNode node) -> void # Visit a WhenNode node - def visit_when_node: (node: WhenNode) -> void + def visit_when_node: (WhenNode node) -> void # Visit a WhileNode node - def visit_while_node: (node: WhileNode) -> void + def visit_while_node: (WhileNode node) -> void # Visit a XStringNode node - def visit_x_string_node: (node: XStringNode) -> void + def visit_x_string_node: (XStringNode node) -> void # Visit a YieldNode node - def visit_yield_node: (node: YieldNode) -> void + def visit_yield_node: (YieldNode node) -> void end module DSL private # Create a new Location object - def Location: (source: Source?, start_offset: Integer, length: Integer) -> Location + def Location: (?Source? source, ?Integer start_offset, ?Integer length) -> Location # Create a new AliasGlobalVariableNode node def AliasGlobalVariableNode: (new_name: Node, old_name: Node, keyword_loc: Location, location: Location) -> AliasGlobalVariableNode # Create a new AliasMethodNode node def AliasMethodNode: (new_name: Node, old_name: Node, keyword_loc: Location, location: Location) -> AliasMethodNode @@ -4451,25 +4486,25 @@ # Create a new ArrayNode node def ArrayNode: (flags: Integer, elements: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location) -> ArrayNode # Create a new ArrayPatternNode node def ArrayPatternNode: (constant: Node?, requireds: Array[Node], rest: Node?, posts: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location) -> ArrayPatternNode # Create a new AssocNode node - def AssocNode: (key: Node, value: Node?, operator_loc: Location?, location: Location) -> AssocNode + def AssocNode: (key: Node, value: Node, operator_loc: Location?, location: Location) -> AssocNode # Create a new AssocSplatNode node def AssocSplatNode: (value: Node?, operator_loc: Location, location: Location) -> AssocSplatNode # Create a new BackReferenceReadNode node def BackReferenceReadNode: (name: Symbol, location: Location) -> BackReferenceReadNode # Create a new BeginNode node def BeginNode: (begin_keyword_loc: Location?, statements: StatementsNode?, rescue_clause: RescueNode?, else_clause: ElseNode?, ensure_clause: EnsureNode?, end_keyword_loc: Location?, location: Location) -> BeginNode # Create a new BlockArgumentNode node def BlockArgumentNode: (expression: Node?, operator_loc: Location, location: Location) -> BlockArgumentNode # Create a new BlockLocalVariableNode node - def BlockLocalVariableNode: (name: Symbol, location: Location) -> BlockLocalVariableNode + def BlockLocalVariableNode: (flags: Integer, name: Symbol, location: Location) -> BlockLocalVariableNode # Create a new BlockNode node - def BlockNode: (locals: Array[Symbol], locals_body_index: Integer, parameters: Node?, body: Node?, opening_loc: Location, closing_loc: Location, location: Location) -> BlockNode + def BlockNode: (locals: Array[Symbol], parameters: Node?, body: Node?, opening_loc: Location, closing_loc: Location, location: Location) -> BlockNode # Create a new BlockParameterNode node - def BlockParameterNode: (name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location) -> BlockParameterNode + def BlockParameterNode: (flags: Integer, name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location) -> BlockParameterNode # Create a new BlockParametersNode node def BlockParametersNode: (parameters: ParametersNode?, locals: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location) -> BlockParametersNode # Create a new BreakNode node def BreakNode: (arguments: ArgumentsNode?, keyword_loc: Location, location: Location) -> BreakNode # Create a new CallAndWriteNode node @@ -4525,11 +4560,11 @@ # Create a new ConstantTargetNode node def ConstantTargetNode: (name: Symbol, location: Location) -> ConstantTargetNode # Create a new ConstantWriteNode node def ConstantWriteNode: (name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location) -> ConstantWriteNode # Create a new DefNode node - def DefNode: (name: Symbol, name_loc: Location, receiver: Node?, parameters: ParametersNode?, body: Node?, locals: Array[Symbol], locals_body_index: Integer, def_keyword_loc: Location, operator_loc: Location?, lparen_loc: Location?, rparen_loc: Location?, equal_loc: Location?, end_keyword_loc: Location?, location: Location) -> DefNode + def DefNode: (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) -> DefNode # Create a new DefinedNode node def DefinedNode: (lparen_loc: Location?, value: Node, rparen_loc: Location?, keyword_loc: Location, location: Location) -> DefinedNode # Create a new ElseNode node def ElseNode: (else_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location?, location: Location) -> ElseNode # Create a new EmbeddedStatementsNode node @@ -4613,13 +4648,13 @@ # Create a new InterpolatedXStringNode node def InterpolatedXStringNode: (opening_loc: Location, parts: Array[Node], closing_loc: Location, location: Location) -> InterpolatedXStringNode # Create a new KeywordHashNode node def KeywordHashNode: (flags: Integer, elements: Array[Node], location: Location) -> KeywordHashNode # Create a new KeywordRestParameterNode node - def KeywordRestParameterNode: (name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location) -> KeywordRestParameterNode + def KeywordRestParameterNode: (flags: Integer, name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location) -> KeywordRestParameterNode # Create a new LambdaNode node - def LambdaNode: (locals: Array[Symbol], locals_body_index: Integer, operator_loc: Location, opening_loc: Location, closing_loc: Location, parameters: Node?, body: Node?, location: Location) -> LambdaNode + def LambdaNode: (locals: Array[Symbol], operator_loc: Location, opening_loc: Location, closing_loc: Location, parameters: Node?, body: Node?, location: Location) -> LambdaNode # Create a new LocalVariableAndWriteNode node def LocalVariableAndWriteNode: (name_loc: Location, operator_loc: Location, value: Node, name: Symbol, depth: Integer, location: Location) -> LocalVariableAndWriteNode # Create a new LocalVariableOperatorWriteNode node def LocalVariableOperatorWriteNode: (name_loc: Location, operator_loc: Location, value: Node, name: Symbol, operator: Symbol, depth: Integer, location: Location) -> LocalVariableOperatorWriteNode # Create a new LocalVariableOrWriteNode node @@ -4655,13 +4690,13 @@ # Create a new NumberedParametersNode node def NumberedParametersNode: (maximum: Integer, location: Location) -> NumberedParametersNode # Create a new NumberedReferenceReadNode node def NumberedReferenceReadNode: (number: Integer, location: Location) -> NumberedReferenceReadNode # Create a new OptionalKeywordParameterNode node - def OptionalKeywordParameterNode: (name: Symbol, name_loc: Location, value: Node, location: Location) -> OptionalKeywordParameterNode + def OptionalKeywordParameterNode: (flags: Integer, name: Symbol, name_loc: Location, value: Node, location: Location) -> OptionalKeywordParameterNode # Create a new OptionalParameterNode node - def OptionalParameterNode: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> OptionalParameterNode + def OptionalParameterNode: (flags: Integer, name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> OptionalParameterNode # Create a new OrNode node def OrNode: (left: Node, right: Node, operator_loc: Location, location: Location) -> OrNode # Create a new ParametersNode node def ParametersNode: (requireds: Array[Node], optionals: Array[Node], rest: Node?, posts: Array[Node], keywords: Array[Node], keyword_rest: Node?, block: BlockParameterNode?, location: Location) -> ParametersNode # Create a new ParenthesesNode node @@ -4683,18 +4718,18 @@ # Create a new RedoNode node def RedoNode: (location: Location) -> RedoNode # Create a new RegularExpressionNode node def RegularExpressionNode: (flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location) -> RegularExpressionNode # Create a new RequiredKeywordParameterNode node - def RequiredKeywordParameterNode: (name: Symbol, name_loc: Location, location: Location) -> RequiredKeywordParameterNode + def RequiredKeywordParameterNode: (flags: Integer, name: Symbol, name_loc: Location, location: Location) -> RequiredKeywordParameterNode # Create a new RequiredParameterNode node - def RequiredParameterNode: (name: Symbol, location: Location) -> RequiredParameterNode + def RequiredParameterNode: (flags: Integer, name: Symbol, location: Location) -> RequiredParameterNode # Create a new RescueModifierNode node def RescueModifierNode: (expression: Node, keyword_loc: Location, rescue_expression: Node, location: Location) -> RescueModifierNode # Create a new RescueNode node def RescueNode: (keyword_loc: Location, exceptions: Array[Node], operator_loc: Location?, reference: Node?, statements: StatementsNode?, consequent: RescueNode?, location: Location) -> RescueNode # Create a new RestParameterNode node - def RestParameterNode: (name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location) -> RestParameterNode + def RestParameterNode: (flags: Integer, name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location) -> RestParameterNode # Create a new RetryNode node def RetryNode: (location: Location) -> RetryNode # Create a new ReturnNode node def ReturnNode: (keyword_loc: Location, arguments: ArgumentsNode?, location: Location) -> ReturnNode # Create a new SelfNode node