On this page
Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
class · Ruby 4.1
Ruby::Prism::Node
This represents a node in the tree. It is the parent class of all of the various node types.
Class methods 2
Instance methods 40
#accept
#breadth_first_search
#breadth_first_search_all
#cached_end_code_units_column
#cached_end_code_units_offset
#cached_start_code_units_column
#cached_start_code_units_offset
#child_nodes
#comments
#comment_targets
#compact_child_nodes
#deconstruct
#each_child_node
#end_character_column
#end_character_offset
#end_column
#end_line
#end_offset
#find
#find_all
#inspect
#leading_comments
#location
#newline?
#save
#save_location
#script_lines
#slice
#slice_lines
#source_lines
#start_character_column
#start_character_offset
#start_column
#start_line
#start_offset
#static_literal?
#to_dot
#trailing_comments
#tunnel
#type
Attributes
Read
A unique identifier for this node. This is used in a very specific use case where you want to keep around a reference to a node without having to keep around the syntax tree in memory. This unique identifier will be consistent across multiple parses of the same source code.