mirror of
https://github.com/Noratrieb/dilaria.git
synced 2026-01-14 17:35:03 +01:00
test program
This commit is contained in:
parent
1ed076a5d3
commit
bea961bbbd
4 changed files with 28 additions and 3 deletions
|
|
@ -5,5 +5,11 @@ mod parse;
|
|||
pub fn run_program(program: &str) {
|
||||
let lexer = lex::Lexer::lex(program);
|
||||
let tokens: Result<Vec<_>, _> = lexer.collect();
|
||||
println!("{:#?}", tokens);
|
||||
println!(
|
||||
"{:#?}",
|
||||
tokens.map(|tokens| tokens
|
||||
.into_iter()
|
||||
.map(|token| token.kind)
|
||||
.collect::<Vec<_>>())
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue