Skip to content

Instantly share code, notes, and snippets.

@juanpicado
Created March 19, 2016 23:53
Show Gist options
  • Save juanpicado/2142a0d03863fea3493d to your computer and use it in GitHub Desktop.
Save juanpicado/2142a0d03863fea3493d to your computer and use it in GitHub Desktop.
// esprima
var ast = esprima.parse("var foo = 'bar';");
// acorn
var ast = acorn.parse('var a;', {
// collect ranges for each node
ranges: true
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment