We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The code generator should only create a new label if it encounters a variable declaration, not when it just sees a variable assignment.
The code in question is here https://github.com/d409f19/cellmata/blob/master/compiler/src/main/kotlin/visitors/codegen.kt#L748:L752
The text was updated successfully, but these errors were encountered:
I believe the changing the mentioned code to the following would resolve the issue
val label = if (node.isDeclaration) { val newLabel = nextLabel() addMapping(node.ident, newLabel) newLabel } else { getMappedLabel(node.ident) } return "var $label = (${visit(node.expr)})"
Sorry, something went wrong.
No branches or pull requests
The code generator should only create a new label if it encounters a variable declaration, not when it just sees a variable assignment.
The code in question is here https://github.com/d409f19/cellmata/blob/master/compiler/src/main/kotlin/visitors/codegen.kt#L748:L752
The text was updated successfully, but these errors were encountered: