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

Method addStatement

src/cpp-file.ts:81–86  ·  view source on GitHub ↗

* Add statements to the main body.

(statement: syntax.Statement)

Source from the content-addressed store, hash-verified

79 * Add statements to the main body.
80 */
81 addStatement(statement: syntax.Statement) {
82 // When adding a statement to main function, the variable statements before
83 // should belong to the main function.
84 this.pushVariableStatementsToMainFunction();
85 this.body!.addStatement(statement);
86 }
87
88 /**
89 * Move the variable statements to main function.

Callers 4

parseSourceFileMethod · 0.95
addVariableStatementMethod · 0.95
endOfFileMethod · 0.45

Tested by

no test coverage detected