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

Method constructor

src/cpp-syntax.ts:696–701  ·  view source on GitHub ↗
(name: string, type: Type, initializer?: Expression)

Source from the content-addressed store, hash-verified

694 initializer?: Expression;
695
696 constructor(name: string, type: Type, initializer?: Expression) {
697 super(name);
698 this.type = type;
699 if (initializer)
700 this.initializer = castExpression(initializer, type);
701 }
702
703 override print(ctx: PrintContext) {
704 let result = `${this.type.print(ctx)} ${this.name}`;

Callers

nothing calls this directly

Calls 1

castExpressionFunction · 0.90

Tested by

no test coverage detected