Sam O'Brien

Results 23 comments of Sam O'Brien

Fixed by #491. The regex is parsed correctly, and then rejected on the basis that it may match the empty string, which isn't allowed by logos. Adding something to the...

Solved by #491 The following passes ```rust mod issue_242 { use logos::Logos; #[derive(Logos, Debug, PartialEq)] #[logos(skip r"[ \t\n\f]+")] enum Token { #[regex("\\d*[13579]", |lex| lex.slice().parse().map_err(|_| ())) ] OddNumber(i32), } #[test] fn...

Fixed by #491 The following doesn't compile, but gives a reasonable error message: ```rust mod issue_243 { #[derive(logos::Logos)] enum Tokens { #[regex(r#"'(?:'?(?:[[:ascii:][^\\']]|\\[[:ascii:]]))*'"#)] #[regex(r#"'(?:"?(?:[[:ascii:][^\\"]]|\\[[:ascii:]]))*'"#)] Problem, } } ``` ``` error: The...