Hi
You'll get back an Neko AST, which needs to be compiled into Bytecode
instructions, then written into a .n , either on disk or in memory.
Console.nml does just that :
- read some lines until one ends with "!"
- parse
- compile
- write bytecode in memory (string)
- use the load module API (Reflex in NML) to load the module from memory
Best,
Nicolas
Done that.
.................
I've found a terrible bug in your sources. loadmodule function trying to
load modules not in dll-host directory, but juct in CWD.
Imagine that we have exe file with Neko embedded, and trying to execute
this exe file with argument of custom positioned data file's name.
Second example:
Execution root (CWD):
myScript.py
| \neko
| \Ast.n (as neko/Ast)
| \_neko.pyd
| \__init__.py
| \Ast.n (as core/Ast)
when I'm trying to invoke $loader.loadmodule("neko/Ast") I received
core/Ast instead !!!. Maybe you need to fix "neko_select_file" function,
to search modules in loader.path and onlyu after that elsewhere?
Fix that please, or find terrible bug in my head :-D .
--
Neko : One VM to run them all
(http://nekovm.org)