files ran from cli now have baselib again

This commit is contained in:
CPunch 2020-11-03 22:18:55 -06:00
parent e1d33855c3
commit 293bab307b
2 changed files with 8 additions and 0 deletions

View File

@ -89,6 +89,7 @@ static char *readFile(const char* path) {
static void runFile(const char* fileName) {
char* script = readFile(fileName);
CState *state = cosmoV_newState();
cosmoB_loadlibrary(state);
interpret(state, script);

7
test.cosmo Normal file
View File

@ -0,0 +1,7 @@
var test = {}
if !test.hello then
test.hello = "hello world!"
end
print(test.hello .. "!!!!")