-
Notifications
You must be signed in to change notification settings - Fork 428
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
Fix: refmt3 with unary -. in labelled arguments #1642
Conversation
Great fix! Thank you. |
Looks good, nice job! If you add a rule: | "=-" {
set_lexeme_length lexbuf 1;
EQUAL
} This trick lets you implement look-ahead: you match a longer string which is not completely consumed. The lexer will resume lexing at "-" and should return MINUS or whatever token is matched in combination with MINUS. |
This is a follow-up to reasonml#1642 employing the strategy highlighted in the following comment: reasonml#1642 (comment) It removes the special case around `LABEL_WITH_EQUAL`, making other valid inputs parseable too.
This is a follow-up to reasonml#1642 employing the strategy highlighted in the following comment: reasonml#1642 (comment) It removes the special case around `LABEL_WITH_EQUAL`, making other valid inputs parseable too.
This is a follow-up to reasonml#1642 employing the strategy highlighted in the following comment: reasonml#1642 (comment) It removes the special case around `LABEL_WITH_EQUAL`, making other valid inputs parseable too.
* Fix syntax error when parsing `let x=-.1;` and co. This is a follow-up to #1642 employing the strategy highlighted in the following comment: #1642 (comment) It removes the special case around `LABEL_WITH_EQUAL`, making other valid inputs parseable too. * Fix infix operators that start with equals sign (e.g. `=+`) also add regression tests for these cases * check in generated error messages
fixes #1580