From ec5e59aed39effad81a8fe8e5f52dfd7e4468d94 Mon Sep 17 00:00:00 2001 From: John Doty Date: Thu, 4 Jan 2024 19:44:03 -0800 Subject: [PATCH] [fine] Clean up comments a bit --- fine/tests/example_tests.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fine/tests/example_tests.rs b/fine/tests/example_tests.rs index e07a84d7..680ab3d5 100644 --- a/fine/tests/example_tests.rs +++ b/fine/tests/example_tests.rs @@ -2,13 +2,13 @@ use fine::parser::concrete::Tree; use pretty_assertions::assert_eq; fn rebase_concrete(source_path: &str, dump: &str) { - // RE-BASE let contents = std::fs::read_to_string(source_path) .expect(&format!("unable to read input file {}", source_path)); let mut result = String::new(); let mut lines = contents.lines(); + // Search for the "concrete:" section. let mut found_concrete_section = false; while let Some(line) = lines.next() { result.push_str(line); @@ -26,6 +26,8 @@ fn rebase_concrete(source_path: &str, dump: &str) { ); } + // We've found the section we care about, replace all the lines we care + // about with the actual lines. let mut replaced_output = false; while let Some(line) = lines.next() { if line.starts_with("// | ") {