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

Function PrintReturnStatement

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

Source from the content-addressed store, hash-verified

128 }
129
130 void PrintReturnStatement(AstStatement* stmt, std::stringstream &buff, int indent) {
131 AstStatement* parent = stmt->parent;
132 // "return" and not the last statement of the block
133 if ((parent->sub_print_count + parent->comment_print_count + 1) < parent->sub->size) {
134 PrintIndent(buff, indent);
135 buff << "do return " << stmt->code << " end\n";
136 }
137 else {
138 PrintIndent(buff, indent);
139 buff << "return " << stmt->code << "\n";
140 }
141 }
142
143 void PrintBlockStatement(GluaDecompileContextP ctx, AstStatement* stmt, std::stringstream &buff, int indent) {
144 std::stringstream startCode;

Callers 1

PrintAstStatementFunction · 0.85

Calls 1

PrintIndentFunction · 0.85

Tested by

no test coverage detected