From bb10056f388e74e9e6e0bd411c40d35eeb827a96 Mon Sep 17 00:00:00 2001 From: John Date: Sun, 2 Nov 2025 01:10:36 -0400 Subject: [PATCH] main: Print span of expressions, by parsing them as Anno --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 81c8dbe..91fb0d1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -198,7 +198,7 @@ fn parse(document: &str) { Ok("false" | "0" | "no") ); for idx in 0.. { - match parser.parse::(0) { + match parser.parse::>(0) { Err(e @ ParseError::EOF(s)) if s.tail == document.len() as _ => { println!( "\x1b[92m{e} (total {} byte{}, {idx} expression{})\x1b[0m", @@ -222,7 +222,7 @@ fn parse(document: &str) { break; } Ok(v) if verbose => { - println!("\x1b[{}m{v}", (idx + 5) % 6 + 31); + println!("\x1b[{}m{}: {v}", (idx + 5) % 6 + 31, v.1); } _ => {} }