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] } ); });