JavaScript parser for aster.
This is internal module and should be used as part of aster-parse or aster-src.
It uses esprima to do it's job.
Type: Boolean
Default: true
Location tracking (required for source maps).
Type: Boolean
Default: false
Include comments to AST.
Customized parser generator, by default:
function defaultParser(options) {
return function (files) {
return files.map(function (file) {
return {
type: 'File',
program: parse(file.contents, {loc: options.loc, source: file.path, attachComment: options.attachComment}),
loc: {
source: file.path
}
};
});
};
}You can f.ex change the type: 'File' if you are not parsing files.

