void prettySCRIPTCOLLECTION(SCRIPTCOLLECTION *scriptcollection) { printf("scripts\n{\n"); #if (PRINTSYMBOL) prettySymbolTable(1,scriptcollection->sym); #endif if (scriptcollection->toplevels != NULL) prettyTOPLEVEL(1, scriptcollection->toplevels); printf("}\n"); }
void prettyTOPLEVEL(int indent, TOPLEVEL *toplevel) { switch(toplevel->kind){ case programK: prettyPROGRAM(indent, toplevel->val.programT); break; case functionK: prettyFUNCTION(indent, toplevel->val.functionT); break; } if(toplevel->next != NULL) { indentprintf(indent, "\n"); prettyTOPLEVEL(indent, toplevel->next); } }
void prettyTOPLEVEL(int indent, TOPLEVEL *toplevel) { switch(toplevel->kind){ case functionK: prettyFUNCTION(indent, toplevel->val.functionT); break; case eventK: prettyEVENT(indent, toplevel->val.eventT); break; case stmsK: prettySTM(indent, toplevel->val.stms); break; } if(toplevel->next != NULL) { indentprintf(indent, "\n"); prettyTOPLEVEL(indent, toplevel->next); } }
void prettySCRIPTCOLLECTION(SCRIPTCOLLECTION *scriptcollection) { if (scriptcollection->toplevels != NULL) prettyTOPLEVEL(1, scriptcollection->toplevels); }