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

Function PrintSimpleStatement

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

Source from the content-addressed store, hash-verified

98 }
99
100 void PrintSimpleStatement(AstStatement* stmt, std::stringstream &buff, int indent) {
101 AstStatement* parent = stmt->parent;
102 // start with '(' and not the first statement of the block
103 if (parent->sub_print_count > 0 && stmt->code[0] == '(') {
104 PrintIndent(buff, indent);
105 buff << ";\n";
106 }
107 PrintIndent(buff, indent);
108 buff << stmt->code << "\n";
109 if (strncmp("--", stmt->code.c_str(), 2) == 0) {
110 parent->sub_print_count--;
111 parent->comment_print_count++;
112 }
113 }
114
115 void PrintBreakStatement(AstStatement* stmt, std::stringstream &buff, int indent) {
116 AstStatement* parent = stmt->parent;

Callers 1

PrintAstStatementFunction · 0.85

Calls 2

PrintIndentFunction · 0.85
c_strMethod · 0.45

Tested by

no test coverage detected