mirror of
https://github.com/janet-lang/janet
synced 2025-01-12 00:20:26 +00:00
Fix startup environment.
This commit is contained in:
parent
2541806dc1
commit
427b2638e0
@ -2,6 +2,8 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
## Unreleased
|
||||
- Add `cli-main` function to the core, which invokes Janet's CLI interface.
|
||||
This basically moves what was init.janet into boot.janet.
|
||||
- Improve flychecking, and fix flyching bugs introduced in 1.4.0.
|
||||
- Add `prin`, `eprint`, `eprintf` and `eprin` functions. The
|
||||
functions prefix with e print to `(dyn :err stderr)`
|
||||
|
@ -88,7 +88,9 @@ int main(int argc, char **argv) {
|
||||
Janet mainfun, out;
|
||||
janet_resolve(env, janet_csymbol("cli-main"), &mainfun);
|
||||
Janet mainargs[1] = { janet_wrap_array(args) };
|
||||
status = janet_pcall(janet_unwrap_function(mainfun), 1, mainargs, &out, NULL);
|
||||
JanetFiber *fiber = janet_fiber(janet_unwrap_function(mainfun), 64, 1, mainargs);
|
||||
fiber->env = env;
|
||||
status = janet_continue(fiber, janet_wrap_nil(), &out);
|
||||
|
||||
/* Deinitialize vm */
|
||||
janet_deinit();
|
||||
|
@ -9,6 +9,7 @@
|
||||
|
||||
# Body
|
||||
(each path (tuple/slice (dyn :args) 1)
|
||||
(print "\n/* " path " */\n")
|
||||
(print (slurp path)))
|
||||
|
||||
# maybe will help
|
||||
|
Loading…
Reference in New Issue
Block a user