Created
May 5, 2015 19:42
-
-
Save zxqx/e9c8ce4e518f27b1e0fb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs'); | |
var acorn = require('./node_modules/babel/node_modules/babel-core/lib/acorn'); | |
require('./node_modules/babel/node_modules/babel-core/lib/acorn/plugins/flow.js'); | |
var T = fs.readFileSync('./T.js'); | |
var ast = acorn.parse(T, { | |
ecmaVersion: 7, | |
sourceType: 'module', | |
plugins: { | |
flow: true | |
}, | |
features: { | |
'es7.asyncFunctions': true | |
} | |
}); | |
console.log(ast); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment