From ec3f7f5bb07ffb3fb72aa0c2a67bc8642eea2474 Mon Sep 17 00:00:00 2001 From: David Majda Date: Tue, 4 Oct 2016 11:15:52 +0200 Subject: [PATCH] Remove extra indentation --- bin/pegjs | 4 ++-- lib/compiler/passes/generate-js.js | 30 +++++++++++++++--------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/bin/pegjs b/bin/pegjs index 8554e84..eb3b170 100755 --- a/bin/pegjs +++ b/bin/pegjs @@ -255,13 +255,13 @@ while (args.length > 0 && isOption(args[0])) { if (Object.keys(options.dependencies).length > 0) { if (options.format !== "amd" && options.format !== "commonjs" && options.format !== "umd") { - abort("Can't use the -d/--dependency option with the \"" + options.format + "\" module format."); + abort("Can't use the -d/--dependency option with the \"" + options.format + "\" module format."); } } if (options.exportVar !== null) { if (options.format !== "globals" && options.format !== "umd") { - abort("Can't use the -e/--export-var option with the \"" + options.format + "\" module format."); + abort("Can't use the -e/--export-var option with the \"" + options.format + "\" module format."); } } diff --git a/lib/compiler/passes/generate-js.js b/lib/compiler/passes/generate-js.js index fe50287..8f82e2a 100644 --- a/lib/compiler/passes/generate-js.js +++ b/lib/compiler/passes/generate-js.js @@ -100,21 +100,21 @@ function generateJS(ast, options) { if (options.trace) { parts.push([ - "", - "if (" + resultCode + " !== peg$FAILED) {", - " peg$tracer.trace({", - " type: \"rule.match\",", - " rule: " + ruleNameCode + ",", - " result: " + resultCode + ",", - " location: peg$computeLocation(startPos, peg$currPos)", - " });", - "} else {", - " peg$tracer.trace({", - " type: \"rule.fail\",", - " rule: " + ruleNameCode + ",", - " location: peg$computeLocation(startPos, startPos)", - " });", - "}" + "", + "if (" + resultCode + " !== peg$FAILED) {", + " peg$tracer.trace({", + " type: \"rule.match\",", + " rule: " + ruleNameCode + ",", + " result: " + resultCode + ",", + " location: peg$computeLocation(startPos, peg$currPos)", + " });", + "} else {", + " peg$tracer.trace({", + " type: \"rule.fail\",", + " rule: " + ruleNameCode + ",", + " location: peg$computeLocation(startPos, startPos)", + " });", + "}" ].join("\n")); }