-
Notifications
You must be signed in to change notification settings - Fork 66
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
Code review nits for semver grammar #303
Conversation
examples/semver.peggy
Outdated
numericIdentifier | ||
= '0' / (positiveDigit digit*) | ||
= n:('0' / $(positiveDigit digit*)) { return parseInt(n, 10); } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Formally should parse be BigInt(n)
instead of parseInt(n, 10)
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eh, I guess. We don't have to worry about IE anymore.
= [1-9] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any other places where [1-9]
is used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to stay as close as possible to the original grammar.
@dselman look good, make sense? |
When I copy-paste the grammar into https://peggyjs.org/online.html (Firefox 101.0.1 or edge 102.0.1245.44) and add {
"major": [ERROR],
"minor": [ERROR],
"patch": [ERROR],
"pre": null,
"build": null
} Changing |
Probably. We could switch to node-inspect-extracted, at least I know that works. |
Yes, getting rid of jsDump seemed to fix this for me. I will cherry-pick that change over to the docs branch when we're done. |
See conversation in #300