-
Notifications
You must be signed in to change notification settings - Fork 439
Parse versions as three integer tokens #1440
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
Conversation
@swift-ci Please test |
abd7eeb
to
cbf27d5
Compare
cbf27d5
to
0a57b4e
Compare
@swift-ci Please test |
) | ||
) | ||
) | ||
|
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.
Worth having custom diagnostics for these? It would be nice if the non-digit-containing token was unexpected within the version tuple rather than ending up as unexpected within the attribute when there's no space after .
.
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.
My judgment was that the diagnostics were sufficiently good for now.
0a57b4e
to
10ef365
Compare
@swift-ci Please test |
@swift-ci Please test Windows |
name: "MajorMinor", | ||
kind: .token(choices: [.token(tokenKind: "IntegerLiteralToken"), .token(tokenKind: "FloatingLiteralToken")]), | ||
description: "In case the version consists only of the major version, an integer literal that specifies the major version. In case the version consists of major and minor version number, a floating literal in which the decimal part is interpreted as the minor version." | ||
name: "Major", |
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.
Only "patch" has the name "PatchVersion" we should be consistent
Previously, internals from the lexer leaked through by representing the major and minor part of the version as a float literal. Also, we accepted non-decimal numbers (eg. hex) for version number, which we don’t want. Fixes swiftlang#1434 rdar://107152155
10ef365
to
47a8dcd
Compare
@swift-ci Please test |
@swift-ci Please test Windows |
Parse versions as three integer tokens
Previously, internals from the lexer leaked through by representing the major and minor part of the version as a float literal. Also, we accepted non-decimal numbers (eg. hex) for version number, which we don’t want.
Fixes #1434
rdar://107152155