class Crylox::ASTPrinter

Overview

Since crystal supports multiple dispatch we don't need to make visitor pattern, Instead just make prints for each Expr type

Defined in:

ast_printer.cr

Instance Method Summary

Instance Method Detail

def parenthesize(name : String, *exprs : Expr) #

[View source]
def print(expr : Binary) : String #

[View source]
def print(expr : Grouping) : String #

[View source]
def print(expr : Literal) : String #

[View source]
def print(expr : Unary) #

[View source]
def print(stmt : Print) #

[View source]
def print(stmt : Stmt) #

[View source]
def print(expr : Expr) #

[View source]