mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-07-27 22:29:11 -04:00
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:
parent
14642e63b3
commit
302f23bc5a
7 changed files with 18 additions and 7 deletions
src/core
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue