use of dyvilx.tools.compiler.ast.parameter.ArgumentList 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);
}
use of dyvilx.tools.compiler.ast.parameter.ArgumentList in project Dyvil by Dyvil.
the class StatementList method resolveApplyStatement.
private static IValue resolveApplyStatement(MarkerList markers, IContext context, IValue resolvedValue) {
final ArgumentList arguments = new ArgumentList(resolvedValue);
final IValue implicitValue = context.resolveImplicit(null);
if (implicitValue != null) {
final IValue call = resolveApplyStatement(markers, context, arguments, implicitValue);
if (call != null) {
return call;
}
}
return resolveApplyStatement(markers, context, arguments, null);
}
Aggregations