class Myst::Printer

Defined in:

myst/tools/printer.cr

Constructors

Class Method Summary

Instance Method Summary

Macro Summary

Constructor Detail

def self.new #

[View source]

Class Method Detail

def self.print(node, io : IO) #

[View source]
def self.print(node) #

[View source]

Instance Method Detail

def print(node, io : IO) #

[View source]
def print(node) #

[View source]
def replace(node : Node, new_node : Node) #

[View source]
def replacements : Hash(UInt64, Node) #

#replacements is a Hash containing mappings from Node instances to other Nodes that should be used in their place when recursing through a program tree. This is useful for performing code rewrites programmatically without having to modify the original program.


[View source]
def replacements=(replacements : Hash(UInt64, Node)) #

#replacements is a Hash containing mappings from Node instances to other Nodes that should be used in their place when recursing through a program tree. This is useful for performing code rewrites programmatically without having to modify the original program.


[View source]
def visit(node : Nop, io : IO) #

[View source]
def visit(node : Expressions, io : IO) #

[View source]
def visit(node : NilLiteral, io : IO) #

[View source]
def visit(node : BooleanLiteral, io : IO) #

[View source]
def visit(node : IntegerLiteral, io : IO) #

[View source]
def visit(node : FloatLiteral, io : IO) #

[View source]
def visit(node : StringLiteral, io : IO) #

[View source]
def visit(node : SymbolLiteral, io : IO) #

[View source]
def visit(node : ListLiteral, io : IO) #

[View source]
def visit(node : MapLiteral, io : IO) #

[View source]
def visit(node : Var, io : IO) #

[View source]
def visit(node : Const, io : IO) #

[View source]
def visit(node : Underscore, io : IO) #

[View source]
def visit(node : IVar, io : IO) #

[View source]
def visit(node : ValueInterpolation, io : IO) #

[View source]
def visit(node : SimpleAssign, io : IO) #

[View source]
def visit(node : Or, io : IO) #

[View source]
def visit(node : And, io : IO) #

[View source]
def visit(node : Splat, io : IO) #

[View source]
def visit(node : Not, io : IO) #

[View source]
def visit(node : Negation, io : IO) #

[View source]
def visit(node : Call, io : IO) #

[View source]
def visit(node : Param, io : IO) #

[View source]
def visit(node : ModuleDef, io : IO) #

[View source]
def visit(node : TypeDef, io : IO) #

[View source]
def visit(node : Def, io : IO) #

[View source]
def visit(node : Node, io : IO) #

Catch all for unimplemented nodes


[View source]

Macro Detail

macro make_visitor(node_type) #

[View source]