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

Function ClearAstStatement

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

Source from the content-addressed store, hash-verified

76 }
77
78 void ClearAstStatement(AstStatement* stmt, void* dummy) {
79 if (stmt == NULL) {
80 return;
81 }
82 stmt->type = SIMPLE_STMT;
83 stmt->line = 0;
84 stmt->code.clear();
85
86 if (stmt->sub) {
87 ClearList(stmt->sub, (ListItemFn)ClearAstStatement);
88 delete stmt->sub;
89 stmt->sub = nullptr;
90 }
91 stmt->sub_print_count = 0;
92 stmt->comment_print_count = 0;
93 }
94
95 void DeleteAstStatement(AstStatement* stmt) {
96 ClearAstStatement(stmt, NULL);

Callers 1

DeleteAstStatementFunction · 0.85

Calls 2

ClearListFunction · 0.85
clearMethod · 0.45

Tested by

no test coverage detected