diff --git a/src/main.rs b/src/main.rs index 6b7fd11..cf70565 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,5 +1,6 @@ #![forbid(unsafe_code)] +mod ast; mod base_55; mod brian; mod error; @@ -48,8 +49,8 @@ fn main() { println!( "Error `{:?}` occurred at span: {:?} = `{:?}`", e.kind, - e.position.clone(), - source.slice(e.position) + e.span.clone(), + source.slice(e.span) ); } } diff --git a/src/repl.rs b/src/repl.rs index 36a065e..cfa1b34 100644 --- a/src/repl.rs +++ b/src/repl.rs @@ -25,15 +25,15 @@ pub fn repl() { println!( "Error `{:?}` occurred at span: {:?} = `{:?}`", e.kind, - e.position.clone(), - line.slice(e.position.clone()) + e.span.clone(), + line.slice(e.span.clone()) ); println!(" | {}", line); println!( " {}{}-- Here", - " ".repeat(e.position.start), - "^".repeat((e.position.end - e.position.start).max(1)) + " ".repeat(e.span.start), + "^".repeat((e.span.end - e.span.start).max(1)) ); } }