From 45b62d66d230aa483d916fba0f8a2f83135d1ffb Mon Sep 17 00:00:00 2001 From: David Majda Date: Tue, 4 Oct 2016 12:42:46 +0200 Subject: [PATCH] Whitespace fixes --- bin/pegjs | 2 +- spec/unit/compiler/passes/helpers.js | 2 +- spec/unit/parser.spec.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/pegjs b/bin/pegjs index 7206730..5c7d189 100755 --- a/bin/pegjs +++ b/bin/pegjs @@ -172,7 +172,7 @@ while (args.length > 0 && isOption(args[0])) { } try { json = fs.readFileSync(args[0]); - } catch(e) { + } catch (e) { abort("Can't read from file \"" + args[0] + "\"."); } addExtraOptions(options, json); diff --git a/spec/unit/compiler/passes/helpers.js b/spec/unit/compiler/passes/helpers.js index 12dbe23..b622127 100644 --- a/spec/unit/compiler/passes/helpers.js +++ b/spec/unit/compiler/passes/helpers.js @@ -94,7 +94,7 @@ beforeEach(function() { this.message = () => "Expected the pass to report an error " - + (details ? "with details " + jasmine.pp(details) + " ": "") + + (details ? "with details " + jasmine.pp(details) + " " : "") + "for grammar " + jasmine.pp(grammar) + ", " + "but it didn't."; diff --git a/spec/unit/parser.spec.js b/spec/unit/parser.spec.js index 2a06125..0dc6482 100644 --- a/spec/unit/parser.spec.js +++ b/spec/unit/parser.spec.js @@ -252,7 +252,7 @@ describe("PEG.js grammar parser", function() { // Canonical Initializer is "{ code }". it("parses Initializer", function() { expect("{ code };start = 'abcd'").toParseAs( - { type: "grammar", initializer: initializer, rules: [ruleStart] } + { type: "grammar", initializer: initializer, rules: [ruleStart] } ); });