Skip to content

Instantly share code, notes, and snippets.

@saevarb
Created April 5, 2017 10:54
Show Gist options
  • Save saevarb/92ff32bf4b18bec3b4d870499346e7ee to your computer and use it in GitHub Desktop.
Save saevarb/92ff32bf4b18bec3b4d870499346e7ee to your computer and use it in GitHub Desktop.
void prettyDeclList(DeclList* declList) {
return;
}
void prettyStaList(DeclList* staListj) {
Decl* ptr = staList->head;
while(ptr != NULL) {
prettyStatement(ptr->current);
ptr = ptr->next;
}
}
void prettyStatement(Stmt* stmt) {
switch (stmt->type) {
case RETURN:
...
case ASSIGN:
...
}
}
void prettyBody(Body* body) {
prettyDeclList(body->staList);
prettyStaList(body->declList);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment