Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Use a template language for Expression and Statement templates #15

Description

@woodruffw

Right now, subclasses of Expression and Statement hardcode their abstract syntax features in the view and concretize methods. To avoid duplication and to make addition of new subclasses easier, these should be lifted to a _template (or similar) class attribute that contains a Handlebar (or other) template.

For example:

class IfStmt(Statement):
    _template = """
    if ({{ cond }}) {
      {{ expr }}
    }
    """

view and concretize could then use _template as appropriate.

Metadata

Metadata

Assignees

Labels

C:patchlangComponent: PatchLangI:CHESSIntegration with CHESS

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions