Skip to content

Incorrect mixing of character and byte positions in parser #3961

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

Closed
brson opened this issue Nov 14, 2012 · 4 comments
Closed

Incorrect mixing of character and byte positions in parser #3961

brson opened this issue Nov 14, 2012 · 4 comments
Labels
A-parser Area: The lexing & parsing of Rust source code to an AST

Comments

@brson
Copy link
Contributor

brson commented Nov 14, 2012

I am doing some refactoring of the codemap in order to make some parser changes, and in the process adding types for character and byte positions. There are several places that use both together incorrectly. Will add FIXME's as I find them.

@brson
Copy link
Contributor Author

brson commented Nov 14, 2012

It looks like this only happens in trim_whitespace_prefix_and_push_line

@graydon
Copy link
Contributor

graydon commented Mar 25, 2013

non-critical for 0.6, de-milestoning

@catamorphism
Copy link
Contributor

Nominating for milestone 5, production-ready

@graydon
Copy link
Contributor

graydon commented May 16, 2013

just a bug, removing milestone/nomination.

pnkfelix added a commit to pnkfelix/rust that referenced this issue May 28, 2013
bors added a commit that referenced this issue Jun 16, 2013
…n, r=brson

r?  (yes, the review request is back, now that I got it building against incom... I mean master!)

(Attempting to port from orphaned pull-request #6764 )

Fix for #3961. Also includes a test case to illustrate the issues. (All of the entries that say "should align" should align with each other, and the four lines near the end that say "compare _" for _ in {A,B,C,D} should line up with each other.)

Before applying this change set:
-- the "(should align)"'s are all over the place, and the form/line feeding spaces are not cut out as one might or might not expect.
-- compare B and D do not match A and C.

(To be honest, its hard to really say what the right behavior is here, and people who are expecting a particular behavior out of a pretty printer in these cases may well get burned.)
RalfJung pushed a commit to RalfJung/rust that referenced this issue Oct 15, 2024
…alfJung

epoll event adding: no need to join, there's no old clock here
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-parser Area: The lexing & parsing of Rust source code to an AST
Projects
None yet
Development

No branches or pull requests

3 participants