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

Method constructor

src/cpp-syntax.ts:577–584  ·  view source on GitHub ↗
(type: Type, expression: Expression, arg: Expression)

Source from the content-addressed store, hash-verified

575 arg: Expression;
576
577 constructor(type: Type, expression: Expression, arg: Expression) {
578 super(type);
579 if (expression instanceof StringLiteral)
580 this.expression = new ToStringExpression(expression);
581 else
582 this.expression = castExpression(expression, expression.type);
583 this.arg = castExpression(arg, new Type('size_t', 'primitive'));
584 }
585
586 override print(ctx: PrintContext) {
587 const accessor = this.expression.type.category == 'array' ? '->value()' : '';

Callers

nothing calls this directly

Calls 1

castExpressionFunction · 0.90

Tested by

no test coverage detected