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

Feature/codegen refactor #11

Merged
merged 6 commits into from
Dec 20, 2018
Merged

Feature/codegen refactor #11

merged 6 commits into from
Dec 20, 2018

Conversation

ekampf
Copy link
Collaborator

@ekampf ekampf commented Dec 20, 2018

No description provided.

@@ -4,6 +4,17 @@


class CodeGenerator:

Choose a reason for hiding this comment

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

This class should not be called CodeGenerator. Maybe CodeChunk.

def block(self):
return self.Block(self)

def write_block(self, block_header: str, *args, **kwargs):

Choose a reason for hiding this comment

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

I'm also not happy about this name either.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@aviv-ebates maybe begin_block ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

no begin is not good because it also in charge of ending...

return self.gen

def __exit__(self, exc_type, exc_val, exc_tb):
self.gen.undent()

Choose a reason for hiding this comment

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

unindent

@ekampf ekampf merged commit 68e194d into master Dec 20, 2018
@ekampf ekampf deleted the feature/codegen_refactor branch December 20, 2018 17:04
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.

None yet

2 participants