From e7d735785c3fef853857b8e3d8658977d0606fba Mon Sep 17 00:00:00 2001 From: Maxwell Jeffress Date: Mon, 29 Dec 2025 19:13:36 +1100 Subject: [PATCH] Expose parser for external api --- include/groundvm.h | 2 ++ src/interface.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/include/groundvm.h b/include/groundvm.h index 3508008..222d867 100644 --- a/include/groundvm.h +++ b/include/groundvm.h @@ -131,6 +131,8 @@ GroundArg groundCreateReference(GroundArgType type, char* ref); GroundValue groundCreateValue(GroundValueType type, ...); +GroundProgram groundParseFile(const char* code); + #ifdef __cplusplus } #endif diff --git a/src/interface.c b/src/interface.c index 78788ba..ac1bdf8 100644 --- a/src/interface.c +++ b/src/interface.c @@ -86,3 +86,7 @@ void groundPrintProgram(GroundProgram* program) { printf("\n"); } } + +GroundProgram groundParseFile(const char* code) { + return parseFile(code); +}