-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Simplify string check in Lexer.lex_identifier
#4420
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
Conversation
let mut saw_b = false; | ||
let mut saw_r = false; | ||
let mut saw_u = false; | ||
let mut saw_f = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the current logic is a bit difficult to verify if it's correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh definitely, the change makes it much better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this originally came from the tokenizer code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great! looks much better, thanks!
Simplifies string check in
Lexer.lex_identifier
.