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

Round-trip literals faithfully #125

Closed
dtolnay opened this issue Apr 21, 2017 · 2 comments
Closed

Round-trip literals faithfully #125

dtolnay opened this issue Apr 21, 2017 · 2 comments
Labels

Comments

@dtolnay
Copy link
Owner

dtolnay commented Apr 21, 2017

extern crate syn;

#[macro_use]
extern crate quote;

fn main() {
    let ref int = syn::parse_token_trees("0_0").unwrap()[0];
    println!("{}", quote!(#int));
}
0

This should print 0_0. Relevant for making sure not to corrupt input to other macros: #124.

@mystor
Copy link
Collaborator

mystor commented May 31, 2017

This should be fixed by #147, as we faithfully parse integers into Literal objects and don't interpret them now.

@mystor
Copy link
Collaborator

mystor commented Jun 3, 2017

This is fixed on master 🎊 (see #158)

@mystor mystor closed this as completed Jun 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants