class

CrLox::Interpreter

Inherits CrLox::Helper < CrLox::Visitor < Reference < Object

Constructors

new(had_error : Bool = false, error_message : String = "", environment : CrLox::Environment = Environment.new(nil), break __arg0 : Bool = false, active_loops : Int32 = 0)
Source

Instance methods

evaluate(expr : Expr) : LiteralType
Source
execute(stmt : Stmt)
Source
execute_block(statements : Array(Stmt), environment : Environment)
Source
interpret(statements : Array(Stmt))
Source
visit_assign_expr(expr : Expr)
Source
visit_binary_expr(expr : Binary) : LiteralType
Source
visit_block_stmt(stmt : Stmt)
Source
visit_break_stmt(stmt : Stmt)
Source
visit_expression_stmt(stmt : Stmt)
Source
visit_grouping_expr(expr : Grouping) : LiteralType
Source
visit_if_stmt(stmt : Stmt)
Source
visit_literal_expr(expr : Literal) : LiteralType
Source
visit_logical_expr(expr : Expr)
Source
visit_print_stmt(stmt : Stmt)
Source
visit_unary_expr(expr : Unary) : LiteralType
Source
visit_var_stmt(stmt : Stmt)
Source
visit_variable_expr(expr : Expr)
Source
visit_while_stmt(stmt : Stmt)
Source