From f21dcb8265d78683f984aa70014e1fb91a191ae7 Mon Sep 17 00:00:00 2001 From: Alexandre Wilhelm Date: Mon, 3 Nov 2014 15:25:47 -0800 Subject: [PATCH] New: Added option --parser/-p to the command objj Previously it wasn't possible to specify a custom parser for the command objj. This is needed for xCodeCapp --- Objective-J/CommonJS/lib/objective-j.js | 8 +++++++- Tools/XcodeCapp/XcodeCapp/ProcessSourceOperation.m | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Objective-J/CommonJS/lib/objective-j.js b/Objective-J/CommonJS/lib/objective-j.js index ff89d8766..47d838406 100644 --- a/Objective-J/CommonJS/lib/objective-j.js +++ b/Objective-J/CommonJS/lib/objective-j.js @@ -90,10 +90,16 @@ 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(" -h, --help print this help"); + print(" -p, --parser specify to use a specific parser") 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(); diff --git a/Tools/XcodeCapp/XcodeCapp/ProcessSourceOperation.m b/Tools/XcodeCapp/XcodeCapp/ProcessSourceOperation.m index 81e9b7cf6..0a987b2e3 100644 --- a/Tools/XcodeCapp/XcodeCapp/ProcessSourceOperation.m +++ b/Tools/XcodeCapp/XcodeCapp/ProcessSourceOperation.m @@ -71,6 +71,7 @@ { launchPath = self.xcc.executablePaths[@"objj"]; arguments = @[ + @"--parser", self.xcc.parserPath, self.projectPath, self.sourcePath