Closed md2 closed 11 years ago
Currently, if you try to put dash (-) inside a character group (at the beginning or at the end of it) nex will panic: bad range in character class:
-
panic: bad range in character class
/[-a-z]/ { } // package main import ("fmt";"os") func main() { NN_FUN(NewLexer(os.Stdin)) }
I wish to be able to use dashes like that, because else regexp becomes cumbersome if your identifiers can contain a dash.
I just added support for this feature. Let me know if it seems broken.
Currently, if you try to put dash (
-
) inside a character group (at the beginning or at the end of it) nex willpanic: bad range in character class
:I wish to be able to use dashes like that, because else regexp becomes cumbersome if your identifiers can contain a dash.