MCPcopy Create free account
hub / github.com/compilets/compilets / pushVariableStatementsToMainFunction

Method pushVariableStatementsToMainFunction

src/cpp-file.ts:91–96  ·  view source on GitHub ↗

* Move the variable statements to main function.

()

Source from the content-addressed store, hash-verified

89 * Move the variable statements to main function.
90 */
91 pushVariableStatementsToMainFunction() {
92 if (this.variableStatements.length == 0)
93 return;
94 this.body!.addStatement(...this.variableStatements);
95 this.variableStatements = [];
96 }
97
98 /**
99 * Move the variable statements to declarations.

Callers 2

addStatementMethod · 0.95
endOfFileMethod · 0.95

Calls 1

addStatementMethod · 0.45

Tested by

no test coverage detected