-
Notifications
You must be signed in to change notification settings - Fork 270
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
Add octal-prefix grammar to support "0o" and "0O" #258
base: master
Are you sure you want to change the base?
Conversation
这是来自QQ邮箱的假期自动回复邮件。
您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。
|
@@ -440,9 +440,12 @@ decimal-literal:: | |||
decimal-literal digit | |||
|
|||
octal-literal:: | |||
'0' | |||
octal-prefix octal-digit |
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.
It seems like a plain 0
now doesn't match any of the rules anymore?
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.
Plain 0
is included in octal-prefix
.
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.
It is, but it now has to be followed by octal-digit, so only 00 would be valid, not plain 0.
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.
Oh, I see what you’re saying. Under what circumstances should a single digit 0
be interpreted as octal and not decimal?
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.
(Regardless of my question, I think removing the plain 0
by itself was an oversight on my part and not intentional.)
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.
For 0 the decimal and octal interpretation is the same, so it doesn't really matter which it is, as long as it's one of them. In the grammar it's probably easier to express as octal.
No description provided.