mirror of
https://github.com/CPunch/Cosmo.git
synced 2024-11-22 07:20:05 +00:00
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);
|
||||||
|
|
||||||
|
7
test.cosmo
Normal file
7
test.cosmo
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
var test = {}
|
||||||
|
|
||||||
|
if !test.hello then
|
||||||
|
test.hello = "hello world!"
|
||||||
|
end
|
||||||
|
|
||||||
|
print(test.hello .. "!!!!")
|
Loading…
Reference in New Issue
Block a user