Fix hang when printing dot graphs from the CLI

This commit is contained in:
Max Brunsfeld 2023-10-31 15:59:37 -07:00
parent b26eff13e2
commit 3380e0eed7
2 changed files with 5 additions and 1 deletions

View file

@ -104,6 +104,8 @@ pub fn parse_file_at_path(parser: &mut Parser, opts: ParseFileOptions) -> Result
_ => parser.parse(&source_code, None),
};
parser.stop_printing_dot_graphs();
let stdout = io::stdout();
let mut stdout = stdout.lock();

View file

@ -90,6 +90,8 @@ pub fn run_tests_at_path(
&mut corrected_entries,
)?;
parser.stop_printing_dot_graphs();
if failures.len() > 0 {
println!("");
@ -719,7 +721,7 @@ code
---
; Line start comment
(a
(a
; ignore this
(b)
; also ignore this