diff options
author | Linnnus <[email protected]> | 2025-04-10 05:21:21 +0000 |
---|---|---|
committer | Linnnus <[email protected]> | 2025-04-15 00:55:08 +0000 |
commit | bdbb94b63785d03d12b2225222ee34108d896668 (patch) | |
tree | f4e7d779db6264ddcc15b9ef9cb0995f15dfadae /src/core/interpret.h | |
parent | 7bd2461c849b4626653a4744427c904b87354bd7 (diff) |
feat(cli): More CLI stuff, idk
Diffstat (limited to 'src/core/interpret.h')
-rw-r--r-- | src/core/interpret.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/core/interpret.h b/src/core/interpret.h new file mode 100644 index 0000000..8bdc92f --- /dev/null +++ b/src/core/interpret.h @@ -0,0 +1,20 @@ +#ifndef SAND_INTERPRET_H +#define SAND_INTERPRET_H + +// This module defines a single function which composes all the stuff the +// interpreter does. It should be bascially the only function that an embedder +// needs to know. + +#include "state.h" + +#include <stddef.h> + +typedef enum { + SAND_INTERPRET_OK, + SAND_INTERPRET_COMPILE_ERROR, + SAND_INTERPRET_RUNTIME_ERROR, +} SandInterpretResult; + +SandInterpretResult sand_interpret(SandState *, const char *filename, const char *source, size_t source_length); + +#endif |