You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use logos::Logos;// logos 0.12.1#[derive(Logos)]enumToken{#[regex("x()*")]What,#[error]Error,}
Yields this compile error:
error: proc-macro derive panicked
--> src\lib.rs:3:10
|
3 | #[derive(Logos)]
| ^^^^^
|
= help: message: Indexing into an empty node. This is a bug, please report it at:
https://github.com/maciejhirsz/logos/issues
error: could not compile `logos-bug` due to previous error
rustc version rustc 1.66.0 (69f9c33d7 2022-12-12)
The text was updated successfully, but these errors were encountered:
I know that this particular regex is not something I want to write, I'm just reporting this because it's definitely a bug in the macro. For valid regexes it should compile, and for invalid ones it should show a reasonable error message (or at least point to the problematic regex), and in this case it is doing neither. Even better, the macro itself asks me to report this.
This code:
Yields this compile error:
rustc version
rustc 1.66.0 (69f9c33d7 2022-12-12)
The text was updated successfully, but these errors were encountered: