diff --git a/schala-lang/language/src/parsing.rs b/schala-lang/language/src/parsing.rs index 1df054a..da97c3c 100644 --- a/schala-lang/language/src/parsing.rs +++ b/schala-lang/language/src/parsing.rs @@ -262,12 +262,13 @@ impl Parser { pub fn format_parse_trace(&self) -> String { let mut buf = String::new(); + buf.push_str("Parse productions:\n"); for r in self.parse_record.iter() { let mut indent = String::new(); for _ in 0..r.level { - indent.push(' '); + indent.push('.'); } - buf.push_str(&format!("{}Production `{}`, token: {}\n", indent, r.production_name, r.next_token)) + buf.push_str(&format!("{}`{}`, next token: {}\n", indent, r.production_name, r.next_token)) } buf }