Skip to content

Commit

Permalink
Dont print AST more than we need to
Browse files Browse the repository at this point in the history
  • Loading branch information
pvdz committed Sep 7, 2024
1 parent 90176b1 commit b9eb285
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/normalize/phase1_1.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,11 @@ export function phase1_1(fdata, resolve, req, firstAfterParse, passes, phase1s,
', pass=' + passes + ', phase1s=', phase1s, ', len:', fdata.len, '\n##################################\n\n\n',
);
try {
if (VERBOSE_TRACING || REF_TRACK_TRACING) {
const code = fmat(tmat(ast, true), true);
console.log('\nCurrent state (start of phase1.1)\n--------------\n' + code + '\n--------------\n');
if (!(!verboseTracing && (passes > 1 || phase1s > 1))) {
if (VERBOSE_TRACING || REF_TRACK_TRACING) {
const code = fmat(tmat(ast, true), true);
console.log('\nCurrent state (start of phase1.1)\n--------------\n' + code + '\n--------------\n');
}
}
} catch (e) {
vlog('printing ast failed');
Expand Down

0 comments on commit b9eb285

Please sign in to comment.