Skip to content

Commit

Permalink
fix linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
loga4 committed Jun 3, 2022
1 parent dd1ea67 commit 040177a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/parser/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -514,20 +514,20 @@ export class Parser {

this.matches('TICK')

let loopDetectorCursor = 0;
let loopDetectorCursor = 0
let loopDetector = false
while (!this.eof() && this.peek().type !== 'TICK') {
node.body.push(this.walk(node.body))
loopDetectorCursor++;
loopDetectorCursor++
if (loopDetectorCursor >= 10000) {
loopDetector = true;
break;
loopDetector = true
break
}
}

if (loopDetector) {
while (!this.eof() && this.peek().type !== 'TICK') {
this.cursor++;
this.cursor++
}
this.report('Infinite loop detected')
}
Expand Down

0 comments on commit 040177a

Please sign in to comment.