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

Can't name identifier the "flip table" emoticon. #7048

Closed
bblum opened this issue Jun 11, 2013 · 5 comments
Closed

Can't name identifier the "flip table" emoticon. #7048

bblum opened this issue Jun 11, 2013 · 5 comments
Labels
A-parser Area: The parsing of Rust source code to an AST

Comments

@bblum
Copy link
Contributor

bblum commented Jun 11, 2013

fn _╯°□°╯︵┻━┻() {}

errors with:

table.rs:3:3: 3:4 error: unknown start of token: 9583
table.rs:3 fn _╯°□°╯︵┻━┻() {}
              ^

However, I put an underscore before the unicode, so "9583" shouldn't even be considered the start of the token. Note that the span is wrong too.

@brson
Copy link
Contributor

brson commented Jun 11, 2013

awesome test case. let's get this in the tree pronto

@Blei
Copy link
Contributor

Blei commented Jun 11, 2013

The incorrect span is fixed with #7058.

It's not possible to name a function ╯°□°╯︵┻━┻ as these characters are not in XID_Continue, i.e. the set of unicode characters specified to be valid identifiers, which in turn is used to specify which characters can appear in valid Rust identifiers.

@bstrie
Copy link
Contributor

bstrie commented Jun 11, 2013

Indeed, not every Unicode character is eligible to appear in a Rust identifier. If you think it should be otherwise, please discuss it in #4928.

@bblum
Copy link
Contributor Author

bblum commented Jun 11, 2013

I would not fight for it, but I will watch with interest.

@bstrie
Copy link
Contributor

bstrie commented Jun 11, 2013

Closing now that #7058 has landed, which fixes the issue with the span.

@bstrie bstrie closed this as completed Jun 11, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-parser Area: The parsing of Rust source code to an AST
Projects
None yet
Development

No branches or pull requests

4 participants