mirror of
https://github.com/janet-lang/janet
synced 2025-10-28 22:27:41 +00:00
Add var and def. Make them behave the same
but have different implementations in top level scope in order to enable incremental compilation and repl.
This commit is contained in:
@@ -34,8 +34,7 @@ int debug_compile_and_run(Gst *vm, GstValue ast, GstValue last) {
|
||||
GstValue func;
|
||||
/* Try to compile generated AST */
|
||||
gst_compiler(&c, vm);
|
||||
gst_compiler_usemodule(&c, "std");
|
||||
gst_compiler_global(&c, "_", last);
|
||||
gst_env_putc(vm, vm->env, "_", last);
|
||||
func = gst_wrap_function(gst_compiler_compile(&c, ast));
|
||||
/* Check for compilation errors */
|
||||
if (c.error.type != GST_NIL) {
|
||||
|
||||
Reference in New Issue
Block a user