Updated the project structure, and modified the Makefile to hopefully be future proof so I can freely make sub-folders in the src/ folder and not have to worry about breaking the Makefile.
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
#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;
|
||||
|
||||
void Interpret(Expr*);
|
||||
void FreeObject(Object*);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user