#ifndef AST_INTERPRETER_HH #define AST_INTERPRETER_HH #include "expr.hh" #include "../tokenizer.hh" #include struct AstInterpreter { void interpret(const Expr &expression); private: Object evaluate(const Expr &expr); Object evaluate_binary_expression(const Expr &expr); Object evaluate_grouping_expression(const Expr &expr); Object evaluate_literal_expression(const Expr &expr); Object evaluate_unary_expression(const Expr &expr); bool is_truthy(const Object &object); bool is_equal(const Object &left, const Object &right); }; #endif