Skip to content
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

Current function cell #32

Merged
merged 6 commits into from
Sep 18, 2024
Merged

Current function cell #32

merged 6 commits into from
Sep 18, 2024

Conversation

mariaKt
Copy link
Contributor

@mariaKt mariaKt commented Sep 12, 2024

This PR adds a cell that tracks the name of the function whose body is at the top of the K cell.

I added a contractInit Id used when the contract initialization code is running, because it is not technically in the body of the constructor.

However, I am not certain that there is a reason to separate the initialization from the constructor, in that there will never be a branch (constructor will always follow the initialization code, if any). So, I could eliminate contractInit entirely, and change the current function name to constructor immediately before the initialization code. Let me know what you think.

@mariaKt mariaKt marked this pull request as ready for review September 13, 2024 16:03
@mariaKt mariaKt requested a review from dwightguth September 13, 2024 16:03
@@ -6,15 +6,22 @@ module SOLIDITY-EXPRESSION
imports SOLIDITY-CONFIGURATION
imports INT

syntax Id ::= "contractInit" [token]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use the existing "constructor" token we use for this purpose.

@mariaKt mariaKt merged commit cb5ae6b into main Sep 18, 2024
1 check passed
@mariaKt mariaKt deleted the current-function branch September 18, 2024 01:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants