mirror of https://github.com/CPunch/Cosmo.git
files ran from cli now have baselib again
This commit is contained in:
parent
e1d33855c3
commit
293bab307b
|
@ -89,6 +89,7 @@ static char *readFile(const char* path) {
|
||||||
static void runFile(const char* fileName) {
|
static void runFile(const char* fileName) {
|
||||||
char* script = readFile(fileName);
|
char* script = readFile(fileName);
|
||||||
CState *state = cosmoV_newState();
|
CState *state = cosmoV_newState();
|
||||||
|
cosmoB_loadlibrary(state);
|
||||||
|
|
||||||
interpret(state, script);
|
interpret(state, script);
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
var test = {}
|
||||||
|
|
||||||
|
if !test.hello then
|
||||||
|
test.hello = "hello world!"
|
||||||
|
end
|
||||||
|
|
||||||
|
print(test.hello .. "!!!!")
|
Loading…
Reference in New Issue