hedhyw / rex

Flexible regular expressions constructor for Golang.
MIT License
196 stars 5 forks source link

Restrict usage of characters in `Class`, `NotClass` #22

Closed hedhyw closed 2 years ago

hedhyw commented 2 years ago

Now, we can pass anything to rex.Common.Class, not rex.Common.NotClass. We need a way to restrict it.

Idea

Create an abstraction:

type ClassToken interface {
   Token
   Unwrap() Token
   // ....
}

Make Raw as a ClassToken?