Which IDE version are you using? I made some changes to get a new Esprima, so maybe if you try http://espruino.com/ide then it'll do a better job?
Web IDE version 0.72.1
@user109783 started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Which IDE version are you using? I made some changes to get a new Esprima, so maybe if you try http://espruino.com/ide then it'll do a better job?