-
Notifications
You must be signed in to change notification settings - Fork 335
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 delta #2857
Fix delta #2857
Conversation
This is not how you should go about fixing it. Delta vars should be initialized by the chip. Also need test cases |
Also is this not just reverting the behavior to the new compiler behavior? Which people still had issues with? |
I was referencing older commits to see what could have caused the change and didn't realize you had set up a different system in place for that.
Haha never mind I'm a bit clueless. |
I don't think the variables being initialized was the bug anyway, that would cause lua errors if so. I still haven't had the chance to look into it myself (on mobile) |
end ---@cast ident Token # Know it isn't nil from above check | ||
|
||
else ---@cast ident Token # Know it isn't nil from above check | ||
if v[1] == "$" then self.delta_vars[ident.value] = true end |
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.
This behavior was moved from the parser to compiler. This shouldn't be fixing anything and if it is, whatever was depending on it should be moved to use the compiler's output
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.
Was partially wrong about this part, kept it in the parser only because we still don't have an analyzer pass, and compiler needs to know if a variable is ever used with $ even before the $ operator is used.. think I'll just stick with the parser for now until I get to said analyzer..
Think I'll just make my own PR so you don't have to make these changes. Also just fyi iirc regression tests are linked to issues not PRs. |
Right, well, if it's any help, the code executes in a way that
Thanks |
Fixes #2841