-
Notifications
You must be signed in to change notification settings - Fork 106
fix: context-aware named param conversion #513
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
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.
nice!
So the typechecker doesn't properly check whether a role exists?
I would've expected it to complain about the "missing role a"
| "{}{}", | ||
| ALPHABET[pos], | ||
| if iteration > 0 { | ||
| deterministic_identifier(iteration - 1) |
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 love me a good recursion
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.
das kam sogar ohne Claude 😂
| _ => {} | ||
| }; | ||
| SyntaxKind::POSITIONAL_PARAM | ||
| SyntaxKind::NAMED_PARAM |
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.
das war n bug nehm ich an?
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.
Ja, allerdings kein wichtiger für die Statement Splitter Logik deshalb kam es nie raus
The typechecker just runs on DML statements and such replacement are less of an issue there. but at some point someone will report it too I guess. If that happens, we can find another solution for it. 😅👍🏼 |
we were blindly converting named parameters to positional parameters. but the latter is only valid as a literal, and not as an identifier.
statements like
are not valid when converted to
i went a bit back and forth on this and decided the easiest way to fix this is to convert to identifiers like
aif the previous non-trivia token is one of a set list of tokens. We will probably have a bunch of edge cases here but fixing them should be as easy as adding a keyword to the list.now, we convert to
closes #510