Fix custom javascript interpreter configuration for OSX.
This commit is contained in:
parent
15f12d9b59
commit
424e3f4712
7 changed files with 42 additions and 15 deletions
|
|
@ -23,13 +23,18 @@ int main(int argc, char* argv[]) {
|
|||
bool interactive = false;
|
||||
JSShell* shell = 0;
|
||||
|
||||
std::vector<std::string> modulePath;
|
||||
modulePath.push_back(".");
|
||||
|
||||
for (int idx = 1; idx < argc; ++idx) {
|
||||
if(strcmp(argv[idx], "-v8") == 0) {
|
||||
shell = JSShell::Create(JSShell::V8);
|
||||
shell = JSShell::Create(JSShell::V8);
|
||||
} else if(strcmp(argv[idx], "-jsc") == 0) {
|
||||
shell = JSShell::Create(JSShell::JSC);
|
||||
shell = JSShell::Create(JSShell::JSC);
|
||||
} else if(strcmp(argv[idx], "-i") == 0) {
|
||||
interactive = true;
|
||||
} else if(strcmp(argv[idx], "-L") == 0) {
|
||||
modulePath.push_back(argv[++idx]);
|
||||
} else {
|
||||
scriptPath = argv[idx];
|
||||
}
|
||||
|
|
@ -39,6 +44,8 @@ int main(int argc, char* argv[]) {
|
|||
shell = JSShell::Create();
|
||||
}
|
||||
|
||||
shell->setModulePath(modulePath);
|
||||
|
||||
bool failed = false;
|
||||
|
||||
if(interactive) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue