From bdbb94b63785d03d12b2225222ee34108d896668 Mon Sep 17 00:00:00 2001 From: Linnnus Date: Thu, 10 Apr 2025 05:21:21 +0000 Subject: feat(cli): More CLI stuff, idk --- src/core/interpret.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/core/interpret.h (limited to 'src/core/interpret.h') 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 + +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 -- cgit v1.2.3