Closed Him188 closed 4 years ago
I would generally recommend against using the LixyGenericTokenType
and tokenType()
functions, but this can definitely be a nice addition!
The "cleaner" intended way of declaring token types would be to have an enum that implements the LixyTokenType
and declare everything in there. Because this is "your" enum, you could also have additional information in there, making it a fairly flexible option. But you can't always declare enum classes (Kotlin scripts don't allow you to do that for some reason), so I agree that this would be very useful.
It will be very useful (especially for debugging) if
LixyGenericTokenType
can have a name. Also probably we can add a prettytoString
or make itdata class
.