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

Method constructor

src/cpp-syntax.ts:148–156  ·  view source on GitHub ↗
(expression: Expression)

Source from the content-addressed store, hash-verified

146 expression: Expression;
147
148 constructor(expression: Expression) {
149 if (expression.type.isStdOptional()) {
150 super(expression.type.noOptional());
151 this.expression = castOptional(expression, this.type, expression.type);
152 } else {
153 super(expression.type);
154 this.expression = expression;
155 }
156 }
157
158 override print(ctx: PrintContext) {
159 return this.expression.print(ctx);

Callers

nothing calls this directly

Calls 3

castOptionalFunction · 0.90
isStdOptionalMethod · 0.80
noOptionalMethod · 0.80

Tested by

no test coverage detected