Fix JSHint errors

Fixes the following JSHint errors (which I think are JSHint bugs):

  spec/parser.spec.js: line 142, col 20, Bad for in variable 'key'.
  spec/generated-parser.spec.js: line 119, col 20, Bad for in variable 'key'.
redux
David Majda 12 years ago
parent 09f3f83e1c
commit d61fd1792d

@ -91,7 +91,7 @@ describe("generated parser", function() {
};
}
var result, key;
var result;
try {
result = this.actual.parse(input, options);
@ -106,6 +106,12 @@ describe("generated parser", function() {
return false;
} catch (e) {
/*
* Should be at the top level but then JSHint complains about bad for
* in variable.
*/
var key;
if (this.isNot) {
this.message = function() {
return "Expected " + jasmine.pp(input)

@ -118,7 +118,7 @@ describe("PEG.js grammar parser", function() {
};
}
var result, key;
var result;
try {
result = PEG.parser.parse(this.actual);
@ -131,6 +131,12 @@ describe("PEG.js grammar parser", function() {
return false;
} catch (e) {
/*
* Should be at the top level but then JSHint complains about bad for
* in variable.
*/
var key;
if (this.isNot) {
this.message = function() {
return "Expected " + jasmine.pp(this.actual) + " to parse, "

Loading…
Cancel
Save