1
0
mirror of https://github.com/janet-lang/janet synced 2025-10-28 14:17:42 +00:00

Complete adding parser to scripting.

This commit is contained in:
Calvin Rose
2017-05-03 19:57:06 -04:00
parent 631bb0cb63
commit c6e9f24f82
7 changed files with 145 additions and 8 deletions

View File

@@ -39,6 +39,7 @@ int debug_compile_and_run(Gst *vm, GstValue ast, GstValue env) {
gst_compiler(&c, vm);
gst_compiler_usemodule(&c, "std");
gst_compiler_usemodule(&c, "std.io");
gst_compiler_usemodule(&c, "std.parse");
gst_compiler_globals(&c, env);
func = gst_wrap_function(gst_compiler_compile(&c, ast));
/* Check for compilation errors */
@@ -145,6 +146,7 @@ int main(int argc, const char **argv) {
gst_init(&vm);
gst_stl_load(&vm);
gst_parse_load(&vm);
if (argc > 1) {
const char *filename;
FILE *f;