Files
clox/interpreter.h
T

27 lines
468 B
C

#ifndef INTERPRETER_H
#define INTERPRETER_H
#include "expr.h"
#include "token.h"
typedef enum {
INS_STRING,
INS_DOUBLE,
INS_BOOLEAN,
INS_NULL
} ObjectInstanceType;
typedef struct Object {
ObjectInstanceType instance;
union {
char* string;
double number;
int boolean;
} value;
} Object;
const void* VisitLiteralExpression(Expr*);
void* VisitGroupingExpression(Expr*);
Object* VisitBinaryExpression(Expr*);
#endif