We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This is a dupe of #377, but I thought to post it nonetheless as an extra test case for #265.
use logos::Logos; #[derive(Logos, Debug, PartialEq, Eq)] #[logos(skip r"[ \t\f]+")] enum FooToken { #[token("fast", priority = 999999)] SomeToken, #[regex(r#"[a-z0-9_/]+ = "#)] RegexThatShouldNotMatch, } #[test] fn it_does_not_ignore_token() { let mut lex = FooToken::lexer("[fast "); let _first_goes_the_bracket = lex.next().unwrap(); assert_eq!("[", lex.slice()); let second_match = lex.next().unwrap(); assert_eq!("fast", lex.slice()); assert_eq!(Ok(FooToken::SomeToken), second_match); // <--- incorrectly results in `Err(())` }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This is a dupe of #377, but I thought to post it nonetheless as an extra test case for #265.
The text was updated successfully, but these errors were encountered: