-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New "createToken" helper functions. #329
Comments
open question: The problem is that when defining Tokens ESNext classes, the Chevrotain convention was to use class Integer extends Token {
static PATTERN = /\d+/
static LABEL = "A whole number"
} but when using helper functions with the config object it seems more idiomatic to use low case property names. or perhaps we should(can?) be idiot proof for these case issues? |
Being 100% tolerant to API mistakes in this case will just add unneeded complexity. In that case the static property names will have to be renamed to uppercase (pattern --> PATTERN). I do not believe additional validations are warranted at this time. |
reopening to remind myself to modify the playground examples. |
The Old "extendToken" helpers were not suitable for handling multiple optional arguments.
So a config object is now in the new API.
The old APIs are still present but are considered deprecated and will probably be removed at (or before)
version 1.0.0
The text was updated successfully, but these errors were encountered: