diff --git a/Objective-J/CommonJS/lib/objective-j.js b/Objective-J/CommonJS/lib/objective-j.js index c123e81c0..4b74070c2 100644 --- a/Objective-J/CommonJS/lib/objective-j.js +++ b/Objective-J/CommonJS/lib/objective-j.js @@ -89,17 +89,11 @@ exports.run = function(args) { print("Usage (objj): " + args[0] + " [options] [--] files..."); print(" -v, --version print the current version of objj"); - print(" -I, --objj-include-paths specify the framework to be used") - print(" -p, --parser specify to use a specific parser") + print(" -I, --objj-include-paths include a specific framework paths") + print(" -h, --help print this help"); return; } - if (argv[0] === "-p" || argv[0] === "--parser") - { - argv.shift(); - optionalParserUsed = true; - } - while (argv.length && argv[0] == "-I" || argv[0] == "--objj-include-paths") { argv.shift(); @@ -109,6 +103,8 @@ exports.run = function(args) if (argv && argv.length > 0) { + var endCommand = false; + while (argv.length > 0) { var arg0 = argv.shift(); @@ -116,16 +112,19 @@ exports.run = function(args) exports.make_narwhal_factory(mainFilePath)(require, { }, module, system, print); + if (argv[0] == "--") + { + endCommand = true; + argv.shift(); + } + if (typeof main === "function") main([arg0].concat(argv)); require("browser/timeout").serviceTimeouts(); - if (optionalParserUsed) - { - // Here we have no idea what the parser does...this is used for xCodeCapp + if (endCommand) break; - } ObjectiveJ.Executable.resetCachedFileExecutableSearchers(); ObjectiveJ.StaticResource.resetRootResources(); diff --git a/Tools/XcodeCapp/XcodeCapp/ProcessSourceOperation.m b/Tools/XcodeCapp/XcodeCapp/ProcessSourceOperation.m index 0a987b2e3..8d95e03a8 100644 --- a/Tools/XcodeCapp/XcodeCapp/ProcessSourceOperation.m +++ b/Tools/XcodeCapp/XcodeCapp/ProcessSourceOperation.m @@ -71,8 +71,8 @@ { launchPath = self.xcc.executablePaths[@"objj"]; arguments = @[ - @"--parser", self.xcc.parserPath, + @"--", self.projectPath, self.sourcePath ];