Labels and control flow

This commit is contained in:
2025-11-23 19:18:10 +11:00
parent a69901be7b
commit ddcde88182
4 changed files with 87 additions and 13 deletions

View File

@@ -1,16 +1,19 @@
#ifndef INTERPRETER_H
#define INTERPRETER_H
#define MAX_ID_LEN 64
#include "types.h"
#include "parser.h"
#include "include/uthash.h"
typedef enum GroundRuntimeError {
ARG_TYPE_MISMATCH, TOO_FEW_ARGS, TOO_MANY_ARGS, FIXME
ARG_TYPE_MISMATCH, TOO_FEW_ARGS, TOO_MANY_ARGS, UNKNOWN_LABEL, FIXME
} GroundRuntimeError;
typedef struct GroundLabel {
char id[MAX_ID_LEN];
int lineNum;
UT_hash_handle hh;
} GroundLabel;
void interpretGroundProgram(GroundProgram* in);