Preventing infinite loops in JavaScript code using Esprima | Hacker News Reader