Skip to content

0.11.2

Compare
Choose a tag to compare
@maciejhirsz maciejhirsz released this 25 Apr 19:19
· 197 commits to master since this release
  • Adds the ability to write #[logos(subpattern name = r"regex")] on the token enum, which is then used as a "subroutine" in regex rule definitions with the syntax (?&name) (by @CAD97, #131). Example:
    #[derive(Logos)]
    #[logos(subpattern xdigit = r"[0-9a-fA-F]")]
    enum Token {
        #[regex("0[xX](?&xdigit)+")]
        LiteralHex,
    
        // ...
    }
  • Fixed an issue where the compilation would fail when a looping group begun with a loop: (f*oo)*