started work on typed pipelines

This commit is contained in:
Schrottkatze 2023-11-17 21:37:55 +01:00
commit 414b6c927d
5 changed files with 109 additions and 12 deletions

View file

@ -7,7 +7,7 @@ pub enum Token<'a> {
Word(&'a str),
#[regex("[\\d]+", priority = 2, callback = |lex| lex.slice().parse::<i64>().unwrap())]
IntLiteral(i64),
#[regex("[\\d]+.[\\d]+", |lex| lex.slice().parse::<f64>().unwrap())]
#[regex("[\\d]+\\.[\\d]+", |lex| lex.slice().parse::<f64>().unwrap())]
FloatLiteral(f64),
#[regex(r#""([^"\\]|\\["\\bnfrt]|u[a-fA-F0-9]{4})*""#, |lex| lex.slice().to_owned())]
StringLiteral(String),