class Lit::Interpreter

Included Modules

Defined in:

lit/interpreter.cr

Class Method Summary

Instance Method Summary

Instance methods inherited from module Lit::Stmt::Visitor

visit_expression_stmt(stmt : Expression) visit_expression_stmt, visit_let_stmt(stmt : Let) visit_let_stmt, visit_print_stmt(stmt : Print) visit_print_stmt

Instance methods inherited from module Lit::Expr::Visitor

visit_assign_expr(expr : Assign) visit_assign_expr, visit_binary_expr(expr : Binary) visit_binary_expr, visit_grouping_expr(expr : Grouping) visit_grouping_expr, visit_literal_expr(expr : Literal) visit_literal_expr, visit_logical_expr(expr : Logical) visit_logical_expr, visit_ternary_expr(expr : Ternary) visit_ternary_expr, visit_unary_expr(expr : Unary) visit_unary_expr, visit_variable_expr(expr : Variable) visit_variable_expr

Class Method Detail

def self.interpret(stmts : Array(Stmt)) #

[View source]

Instance Method Detail

def environment : Lit::Environment #

TODO Exclude this after e2e tests


[View source]
def evaluate(expr : Expr) : Value #

[View source]
def execute(stmt : Stmt) : Value #

[View source]
def interpret(stmts) : Nil #

[View source]
def visit_assign_expr(expr) : Value #

[View source]
def visit_binary_expr(expr) : Value #

[View source]
def visit_expression_stmt(stmt) : Nil #

[View source]
def visit_grouping_expr(expr) : Value #

[View source]
def visit_let_stmt(stmt) : Nil #

[View source]
def visit_literal_expr(expr) : Value #

[View source]
def visit_logical_expr(expr) : Value #

[View source]
def visit_print_stmt(stmt) : Nil #

[View source]
def visit_ternary_expr(expr) : Value #

[View source]
def visit_unary_expr(expr) : Value #

[View source]
def visit_variable_expr(expr) : Value #

[View source]