class YARP::ProgramNode
The top level node of any parse tree.
def accept(visitor)
def accept(visitor) visitor.visit_program_node(self) end
def child_nodes
def child_nodes [statements] end
def comment_targets
def comment_targets [statements] end
def copy(**params)
def copy(**params) ProgramNode.new( params.fetch(:locals) { locals }, params.fetch(:statements) { statements }, params.fetch(:location) { location }, ) end
def deconstruct_keys(keys)
def deconstruct_keys(keys) { locals: locals, statements: statements, location: location } end
def initialize(locals, statements, location)
def initialize(locals, statements, location) @locals = locals @statements = statements @location = location end
def inspect(inspector = NodeInspector.new)
def inspect(inspector = NodeInspector.new) inspector << inspector.header(self) inspector << "├── locals: #{locals.inspect}\n" inspector << "└── statements:\n" inspector << inspector.child_node(statements, " ") inspector.to_str end