Fixed --start vs. --start-rule inconsistency between help and actual option processing code.

redux
David Majda 14 years ago
parent a43d1b33e3
commit d3104742d9

@ -22,7 +22,7 @@ file "lib/pegjs-runtime-#{version}.min.js" => "lib/runtime.js" do |t|
end
file "lib/metagrammar.js" => "lib/metagrammar.pegjs" do |t|
system "bin/pegjs --start grammar PEG.grammarParser lib/metagrammar.pegjs"
system "bin/pegjs --start-rule grammar PEG.grammarParser lib/metagrammar.pegjs"
end
desc "Build the minified parser runtime"

@ -95,10 +95,10 @@ var args = Array.prototype.slice.call(arguments, 1);
while (args.length > 0 && isOption(args[0])) {
switch (args[0]) {
case "-s":
case "--start":
case "--start-rule":
nextArg();
if (args.length === 0) {
abort("Missing parameter of the -s/--start option.");
abort("Missing parameter of the -s/--start-rule option.");
}
startRule = args[0];
break;

Loading…
Cancel
Save