asterjs / aster-parse-esnext

Parse ES6 as ES5 AST for aster.

Home Page:https://npmjs.org/package/aster-parse-esnext

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

aster-parse-esnext

NPM version Build Status

ES6->ES5 parser for aster.

Usage

This is internal module and should be used as part of aster-parse or aster-src.

It uses esprima#harmony and esnext transpiler to do it's job.

In order to use ES6 parser for all the .js files, register it in your build script as following:

var aster = require('aster');

aster.src.registerParser('.js', require('aster-parse-esnext'));

API

parseEsNext(options)

options.loc

Type: Boolean Default: true

Location tracking (required for source maps).

options.comments

Type: Boolean Default: false

Include comments to AST.

License

MIT License

About

Parse ES6 as ES5 AST for aster.

https://npmjs.org/package/aster-parse-esnext

License:MIT License


Languages

Language:JavaScript 100.0%