MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / PrintAstStatement

Function PrintAstStatement

src/Chain/libraries/glua/glua_statement.cpp:244–275  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

242 }
243
244 void PrintAstStatement(GluaDecompileContextP ctx, AstStatement* stmt, std::stringstream &buff, int indent) {
245 switch (stmt->type) {
246 case SIMPLE_STMT:
247 PrintSimpleStatement(stmt, buff, indent);
248 break;
249 case BREAK_STMT:
250 PrintBreakStatement(stmt, buff, indent);
251 break;
252 case RETURN_STMT:
253 PrintReturnStatement(stmt, buff, indent);
254 break;
255 case DO_STMT:
256 case FUNCTION_STMT:
257 case WHILE_STMT:
258 case REPEAT_STMT:
259 case FORLOOP_STMT:
260 case TFORLOOP_STMT:
261 PrintBlockStatement(ctx, stmt, buff, indent);
262 break;
263 case IF_STMT:
264 PrintIfStatement(ctx, stmt, buff, indent, 0);
265 break;
266 case IF_THEN_STMT:
267 case IF_ELSE_STMT:
268 PrintIndent(buff, indent);
269 buff << "-- DECOMPILER ERROR: unexpected statement " << stmttype[stmt->type] << "\n";
270 break;
271 case JMP_DEST_STMT:
272 PrintJmpDestStatement(ctx, stmt, buff, indent);
273 break;
274 }
275 }
276
277 void AddToStatement(AstStatement* stmt, AstStatement* sub) {
278 if (stmt && sub) {

Callers

nothing calls this directly

Calls 7

PrintSimpleStatementFunction · 0.85
PrintBreakStatementFunction · 0.85
PrintReturnStatementFunction · 0.85
PrintBlockStatementFunction · 0.85
PrintIfStatementFunction · 0.85
PrintIndentFunction · 0.85
PrintJmpDestStatementFunction · 0.85

Tested by

no test coverage detected