|
|
@ -8,7 +8,7 @@ describe("compiler pass |reportInfiniteLoops|", function() {
|
|
|
|
|
|
|
|
|
|
|
|
it("reports infinite loops for zero_or_more", function() {
|
|
|
|
it("reports infinite loops for zero_or_more", function() {
|
|
|
|
expect(pass).toReportError('start = ("")*', {
|
|
|
|
expect(pass).toReportError('start = ("")*', {
|
|
|
|
message: "Infinite loop detected.",
|
|
|
|
message: "Possible infinite loop detected.",
|
|
|
|
location: {
|
|
|
|
location: {
|
|
|
|
start: { offset: 8, line: 1, column: 9 },
|
|
|
|
start: { offset: 8, line: 1, column: 9 },
|
|
|
|
end: { offset: 13, line: 1, column: 14 }
|
|
|
|
end: { offset: 13, line: 1, column: 14 }
|
|
|
@ -18,7 +18,7 @@ describe("compiler pass |reportInfiniteLoops|", function() {
|
|
|
|
|
|
|
|
|
|
|
|
it("reports infinite loops for one_or_more", function() {
|
|
|
|
it("reports infinite loops for one_or_more", function() {
|
|
|
|
expect(pass).toReportError('start = ("")+', {
|
|
|
|
expect(pass).toReportError('start = ("")+', {
|
|
|
|
message: "Infinite loop detected.",
|
|
|
|
message: "Possible infinite loop detected.",
|
|
|
|
location: {
|
|
|
|
location: {
|
|
|
|
start: { offset: 8, line: 1, column: 9 },
|
|
|
|
start: { offset: 8, line: 1, column: 9 },
|
|
|
|
end: { offset: 13, line: 1, column: 14 }
|
|
|
|
end: { offset: 13, line: 1, column: 14 }
|
|
|
|