An alias for source_lines
, used to mimic the API from RubyVM::AbstractSyntaxTree
to make it easier to migrate.
Similar to inspect, but respects the current level of indentation given by the pretty print object.
def deconstruct_keys
: (Array keys) -> { node_id: Integer
, location: Location
, new_name
: GlobalVariableReadNode
| BackReferenceReadNode
| NumberedReferenceReadNode
, old_name
: GlobalVariableReadNode
| BackReferenceReadNode
| NumberedReferenceReadNode
| SymbolNode
| MissingNode
, keyword_loc
: Location
}
def deconstruct_keys
: (Array keys) -> { node_id: Integer
, location: Location
, new_name
: SymbolNode
| InterpolatedSymbolNode
, old_name
: SymbolNode
| InterpolatedSymbolNode
| GlobalVariableReadNode
| MissingNode
, keyword_loc
: Location
}
def deconstruct_keys
: (Array keys) -> { node_id: Integer
, location: Location
, left: Prism::node, right: Prism::node, operator_loc
: Location
}
def deconstruct_keys
: (Array keys) -> { node_id: Integer
, location: Location
, left: Prism::node, right: Prism::node, operator_loc
: Location
}
def deconstruct_keys
: (Array keys) -> { node_id: Integer
, location: Location
, arguments: Array }
def deconstruct_keys
: (Array keys) -> { node_id: Integer
, location: Location
, elements: Array, opening_loc
: Location
?, closing_loc
: Location
? }
Represents the optional source location for the opening token.
[1,2,3] # "[" %w[foo bar baz] # "%w[" %I(apple orange banana) # "%I(" foo = 1, 2, 3 # nil
Represents the optional source location for the closing token.
[1,2,3] # "]" %w[foo bar baz] # "]" %I(apple orange banana) # ")" foo = 1, 2, 3 # nil
def deconstruct_keys
: (Array keys) -> { node_id: Integer
, location: Location
, constant: ConstantReadNode
| ConstantPathNode
| nil, requireds: Array, rest: Prism::node?, posts: Array, opening_loc
: Location
?, closing_loc
: Location
? }
Represents the opening location of the array pattern.
foo in [1, 2] ^
Represents the closing location of the array pattern.
foo in [1, 2] ^
def deconstruct_keys
: (Array keys) -> { node_id: Integer
, location: Location
, key: Prism::node, value: Prism::node, operator_loc
: Location
? }
def deconstruct_keys
: (Array keys) -> { node_id: Integer
, location: Location
, value: Prism::node?, operator_loc
: Location
}
def deconstruct_keys
: (Array keys) -> { node_id: Integer
, location: Location
, name: Symbol
}
def deconstruct_keys
: (Array keys) -> { node_id: Integer
, location: Location
, begin_keyword_loc
: Location
?, statements: StatementsNode
?, rescue_clause
: RescueNode
?, else_clause
: ElseNode
?, ensure_clause
: EnsureNode
?, end_keyword_loc
: Location
? }
def deconstruct_keys
: (Array keys) -> { node_id: Integer
, location: Location
, expression: Prism::node?, operator_loc
: Location
}
def deconstruct_keys
: (Array keys) -> { node_id: Integer
, location: Location
, name: Symbol
}
def deconstruct_keys
: (Array keys) -> { node_id: Integer
, location: Location
, locals: Array, parameters: BlockParametersNode
| NumberedParametersNode
| ItParametersNode
| nil, body: StatementsNode
| BeginNode
| nil, opening_loc
: Location
, closing_loc
: Location
}
Represents the location of the opening ‘|`.
[1, 2, 3].each { |i| puts x } ^
Represents the location of the closing ‘|`.
[1, 2, 3].each { |i| puts x } ^
def deconstruct_keys
: (Array keys) -> { node_id: Integer
, location: Location
, name: Symbol
?, name_loc
: Location
?, operator_loc
: Location
}
def deconstruct_keys
: (Array keys) -> { node_id: Integer
, location: Location
, parameters: ParametersNode
?, locals: Array, opening_loc
: Location
?, closing_loc
: Location
? }
Represents the opening location of the block parameters.
-> (a, b = 1; local) { } ^ foo do |a, b = 1; local| ^ end