UNPKG

458 BJavaScriptView Raw
1
2/**
3 * The firedoc module
4 * @module firedoc
5 */
6
7const debug = require('debug')('firedoc:parser');
8const AST = require('./ast').AST;
9
10/**
11 * parse and generate the `AST` object
12 *
13 * @method parse
14 * @param {String} syntaxtype
15 * @param {Array} files
16 * @param {Array} dirs
17 * @return {AST} the ast object
18 */
19function parse (syntaxtype, files, dirs) {
20 return AST.reset().create(files, dirs, syntaxtype);
21}
22
23exports.parse = parse;