MCPcopy Create free account
hub / github.com/ASDAlexander77/TypeScript2Cxx / processVariableDeclarationOne

Method processVariableDeclarationOne

src/emitter.ts:609–628  ·  view source on GitHub ↗
(
        name: ts.Identifier, initializer: ts.Expression, next?: { next: boolean })

Source from the content-addressed store, hash-verified

607 }
608
609 private processVariableDeclarationOne(
610 name: ts.Identifier, initializer: ts.Expression, next?: { next: boolean }) {
611 if (next && next.next) {
612 this.writer.writeString(', ');
613 }
614
615 this.writer.writeString(name.text);
616 this.addToDeclaredInGlobalScope(name.text);
617
618 if (initializer) {
619 this.writer.writeString(' = ');
620 this.processExpression(initializer);
621 }
622
623 if (next) {
624 next.next = true;
625 }
626
627 return true;
628 }
629
630 private processVariableStatement(node: ts.VariableStatement): void {
631 const anyVal = this.processVariableDeclarationList(node.declarationList);

Callers 2

processTryStatementMethod · 0.95

Calls 3

processExpressionMethod · 0.95
writeStringMethod · 0.80

Tested by

no test coverage detected