Make tokens optional (#563)

Adding tokens to the ast is significant slower and most tools
don't ever use them anyway
This commit is contained in:
Daniel Tschinder
2017-06-27 20:26:24 -07:00
committed by Henry Zhu
parent 3d03414c05
commit fecdb6feeb
12 changed files with 786 additions and 7 deletions

View File

@@ -80,7 +80,6 @@ function runTest(test, parseFunction) {
throw err;
}
delete ast.tokens;
if (ast.comments && !ast.comments.length) delete ast.comments;
if (!test.expect.code && !opts.throws && !process.env.CI) {
@@ -133,7 +132,7 @@ function misMatch(exp, act) {
}
for (var prop in act) {
if (prop === "__clone") {
if (typeof act[prop] === "function") {
continue;
}