You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
460 B
JavaScript
18 lines
460 B
JavaScript
6 years ago
|
module.exports = function(acorn) {
|
||
|
switch (parseInt(acorn.version)) {
|
||
|
case 2:
|
||
|
case 3:
|
||
|
acorn.plugins.asyncawait = require('./acorn-v3') ;
|
||
|
break ;
|
||
|
case 4:
|
||
|
acorn.plugins.asyncawait = require('./acorn-v4') ;
|
||
|
break ;
|
||
|
case 5:
|
||
|
acorn.plugins.asyncawait = require('./acorn-v4') ;
|
||
|
break ;
|
||
|
default:
|
||
|
throw new Error("acorn-es7-plugin requires Acorn v2, 3, 4 or 5") ;
|
||
|
}
|
||
|
return acorn
|
||
|
}
|