cl-token: Move token definition into its own crate

This commit is contained in:
2024-02-29 19:36:06 -06:00
parent ee27095fb3
commit 6e1d5af134
14 changed files with 41 additions and 30 deletions

View File

@@ -1,5 +1,6 @@
//! This example grabs input from stdin, lexes it, and prints which lexer rules matched
#![allow(unused_imports)]
use cl_token::Token;
use conlang::lexer::Lexer;
use std::{
error::Error,
@@ -57,7 +58,7 @@ fn lex_tokens(file: &str, path: Option<&Path>) -> Result<(), Box<dyn Error>> {
Ok(())
}
fn print_token(t: conlang::token::Token) {
fn print_token(t: Token) {
println!(
"{:02}:{:02}: {:#19}{}",
t.line(),