instance method · added in Ruby 3.4
RubyVM::AbstractSyntaxTree::Node#locations
() -> ::Array[::RubyVM::AbstractSyntaxTree::Location]
node.locations → array
ast.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/ast.rb, line 280
def locations
Primitive.ast_node_locations
end
Returns location objects associated with the AST node. The returned array contains RubyVM::AbstractSyntaxTree::Location.
Ruby version changes
-
3.4
-
Add
RubyVM::AbstractSyntaxTree::Node#locationsmethod which returns location objects associated with the AST node. [Feature #20624]
-