-
Notifications
You must be signed in to change notification settings - Fork 4
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
added constructor generation #121
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.
@qoxrdw Thank you for the contribution! Just a few small comments.
; | ||
|
||
constructorBody | ||
: '{' '}' |
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.
@qoxrdw Can we use methodBlock
instead of constructorBody
here?
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.
Yes, we can use it if we want the constructor body not to be empty. I'll add this.
classBody /* $jsmith-scope */ | ||
: '{' classBodyDeclaration+ '}' NL | ||
: '{' constructorDeclaration classBodyDeclaration+'}' NL |
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.
@qoxrdw Class might be without a constructor. Maybe we can make constuctorDeclaration
optional? What do you think?
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.
Yes, I agree, I'll add this.
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.
@qoxrdw Looks good to me. Thanks
@rultor merge |
@volodya-lombrozo OK, I'll try to merge now. You can check the progress of the merge here. |
@volodya-lombrozo Done! FYI, the full log is here (took me 4min). |
added constructor generation
also added a new puzzle for it
PR for issue #15