fix(cli): do not stop printing dot graphs until edits are re-parsed

This commit is contained in:
Amaan Qureshi 2024-10-04 23:41:21 -04:00
parent 21a34f9124
commit 6be6a40bdf

View file

@ -122,8 +122,6 @@ pub fn parse_file_at_path(parser: &mut Parser, opts: &ParseFileOptions) -> Resul
_ => parser.parse(&source_code, None),
};
parser.stop_printing_dot_graphs();
let stdout = io::stdout();
let mut stdout = stdout.lock();
@ -142,6 +140,8 @@ pub fn parse_file_at_path(parser: &mut Parser, opts: &ParseFileOptions) -> Resul
}
}
parser.stop_printing_dot_graphs();
let duration = time.elapsed();
let duration_ms = duration.as_micros() as f64 / 1e3;
let mut cursor = tree.walk();
@ -354,6 +354,8 @@ pub fn parse_file_at_path(parser: &mut Parser, opts: &ParseFileOptions) -> Resul
bytes: source_code.len(),
duration: Some(duration),
});
} else {
parser.stop_printing_dot_graphs();
}
if opts.print_time {