It isn't quite pure Esprima, we (Scripted) are using my (unfinished!) fork of Esprima that has some recovery features. That way we can get a decent AST out even when there are errors, it is setup here for playing around with: http://aclement.github.com/esprima/demo/parse.html