Update Acorn.js and use it now by default, thanks to Marijn's fast bugfix:

https://github.com/marijnh/acorn/issues/14
This commit is contained in:
Jürg Lehni 2012-11-18 12:25:37 -08:00
parent 14642e63b3
commit 302f23bc5a
7 changed files with 18 additions and 7 deletions

View file

@ -21,7 +21,7 @@
/*#*/ if (options.parser == 'acorn') {
/*#*/ include('../../lib/acorn-min.js');
/*#*/ } else {
/*#*/ } else if (options.parser == 'esprima') {
/*#*/ include('../../lib/esprima-min.js');
/*#*/ }
@ -189,7 +189,7 @@ var PaperScript = this.PaperScript = new function() {
// Now do the parsing magic
/*#*/ if (options.parser == 'acorn') {
walkAst(acorn.parse(code, { ranges: true }));
/*#*/ } else {
/*#*/ } else if (options.parser == 'esprima') {
walkAst(esprima.parse(code, { range: true }));
/*#*/ }
return code;