diff --git a/lib/compiler/passes/report-infinite-loops.js b/lib/compiler/passes/report-infinite-loops.js index 766df22..cf8bf29 100644 --- a/lib/compiler/passes/report-infinite-loops.js +++ b/lib/compiler/passes/report-infinite-loops.js @@ -13,7 +13,7 @@ function reportInfiniteLoops(ast) { zero_or_more: function(node) { if (!asts.alwaysConsumesOnSuccess(ast, node.expression)) { throw new GrammarError( - "Possible infinite loop when parsing (repetition used with with an expression that may not consume any input).", + "Possible infinite loop when parsing (repetition used with an expression that may not consume any input).", node.location ); } @@ -22,7 +22,7 @@ function reportInfiniteLoops(ast) { one_or_more: function(node) { if (!asts.alwaysConsumesOnSuccess(ast, node.expression)) { throw new GrammarError( - "Possible infinite loop when parsing (repetition used with with an expression that may not consume any input).", + "Possible infinite loop when parsing (repetition used with an expression that may not consume any input).", node.location ); } diff --git a/spec/unit/compiler/passes/report-infinite-loops.spec.js b/spec/unit/compiler/passes/report-infinite-loops.spec.js index 9339d05..4ebce04 100644 --- a/spec/unit/compiler/passes/report-infinite-loops.spec.js +++ b/spec/unit/compiler/passes/report-infinite-loops.spec.js @@ -7,7 +7,7 @@ describe("compiler pass |reportInfiniteLoops|", function() { it("reports infinite loops for zero_or_more", function() { expect(pass).toReportError('start = ("")*', { - message: "Possible infinite loop when parsing (repetition used with with an expression that may not consume any input).", + message: "Possible infinite loop when parsing (repetition used with an expression that may not consume any input).", location: { start: { offset: 8, line: 1, column: 9 }, end: { offset: 13, line: 1, column: 14 } @@ -17,7 +17,7 @@ describe("compiler pass |reportInfiniteLoops|", function() { it("reports infinite loops for one_or_more", function() { expect(pass).toReportError('start = ("")+', { - message: "Possible infinite loop when parsing (repetition used with with an expression that may not consume any input).", + message: "Possible infinite loop when parsing (repetition used with an expression that may not consume any input).", location: { start: { offset: 8, line: 1, column: 9 }, end: { offset: 13, line: 1, column: 14 }