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

Float lexing is slightly wrong #40

Open
osa1 opened this issue Dec 2, 2021 · 0 comments
Open

Float lexing is slightly wrong #40

osa1 opened this issue Dec 2, 2021 · 0 comments

Comments

@osa1
Copy link

osa1 commented Dec 2, 2021

This line in the lexer:

@lit_float2 / ( [^\._a-zA-Z] | \r | \n )

Implements the "not immediately followed" part in the Rust lexical syntax spec: https://doc.rust-lang.org/reference/tokens.html#floating-point-literals

The code uses _a-zA-Z as the beginning of an identifier, but according to Rust spec any XID_Start is a valid identifier first character, so that part of the lexer should be updated with _ and @xid_start. (not sure what the right syntax for this is in alex)

(I don't have Haskell toolchain installed otherwise I would submit a PR)

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

No branches or pull requests

1 participant