Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Accept an already parsed AST #10

Open
wants to merge 2 commits into
from
Jump to file or symbol
Failed to load files and symbols.
+2 −1
Split
View
@@ -29,7 +29,8 @@ module.exports = function (src, opts, fn) {
opts.range = true;
if (typeof src !== 'string') src = String(src);
- var ast = parse(src, opts);
+ var ast = opts.ast || parse(src, opts);
+ delete opts.ast;
var result = {
chunks : src.split(''),