Conlang/compiler/cl-repl/src/tools.rs

12 lines
247 B
Rust
Raw Normal View History

use cl_token::Token;
/// Prints a token in the particular way [cl-repl](crate) does
pub fn print_token(t: &Token) {
println!(
"{:02}:{:02}: {:#19} │{}│",
t.line(),
t.col(),
t.ty(),
t.data(),
)
}