port to esprima/spidermonkey standard ast api