commit 3c21d58

uint  ·  2026-10-24 18:27:52 +0000 UTC
parent 2cd0deb
Document public functions
1 files changed,  +11, -0
M expl.h
M expl.h
+11, -0
 1@@ -44,9 +44,20 @@ struct expl_value {
 2 	} as;
 3 };
 4 
 5+/* create a new context and initialize it
 6+   returns context on success, NULL on failure */
 7 expl* expl_init(void);
 8+
 9+/* free given context and resources */
10 void expl_close(expl* ctx);
11+
12+/* register a native function in the given context
13+   returns 1 on success, 0 on failure */
14 int expl_register(expl* ctx, const char* name, expl_native fn, void* data);
15+
16+/* run the source code in the given context
17+   returns the result of expression evaluated, return->type is EXPL_VALUE_NIL on
18+   failure */
19 expl_value expl_run(expl* ctx, const char* source);
20 
21 #endif /* EXPL_H */