use of dyvilx.tools.compiler.ast.expression.constant.IntValue in project Dyvil by Dyvil.
the class EnumConstant method resolve.
@Override
public void resolve(MarkerList markers, IContext context) {
final ArgumentList arguments = new ArgumentList(new StringValue(this.name.unqualified), new IntValue(this.index));
if (this.value != null) {
if (this.value.valueTag() == IValue.TUPLE) {
arguments.addAll(((TupleExpr) this.value).getValues());
} else {
arguments.add(this.value);
}
}
this.value = new ConstructorCall(this.position, this.enclosingClass.getClassType(), arguments);
super.resolve(markers, context);
}
Aggregations