Skip to content
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

Parse integer suffix beginning with a hex digit #252

Merged
merged 2 commits into from
Sep 25, 2020
Merged

Parse integer suffix beginning with a hex digit #252

merged 2 commits into from
Sep 25, 2020

Conversation

dtolnay
Copy link
Owner

@dtolnay dtolnay commented Sep 25, 2020

Previously e.g. 0o0A would fail to lex because A is not a permissible octal digit. It doesn't need to be a digit though. This is an octal literal 0o0 with suffix A.

This matches libproc_macro's behavior which parses it as:

Literal {
    kind: Integer,
    symbol: "0o0",
    suffix: Some("A"),
    span: #7 bytes(88..92),
}

dtolnay/syn#897

@dtolnay dtolnay merged commit ac910cf into dtolnay:master Sep 25, 2020
@dtolnay dtolnay deleted the lit branch September 25, 2020 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant