19 lines
437 B
C
Raw Normal View History

2021-10-01 00:21:50 +08:00
/* this demo shows the usage of method */
#include <stdio.h>
#include "PikaMain.h"
#include "PikaVM.h"
2022-01-06 16:17:40 +08:00
#include "pikaScript.h"
2021-10-01 00:21:50 +08:00
int main(int argc, char* argv[]) {
if (1 == argc) {
pikaScriptShell(pikaScriptInit());
return 0;
}
if (2 == argc) {
PikaObj* pikaMain = newRootObj("pikaMain", New_PikaMain);
pikaVM_runFile(pikaMain, argv[1]);
obj_deinit(pikaMain);
return 0;
}
2021-10-01 00:21:50 +08:00
}