use of stanhebben.zenscript.type.ZenType in project ZenScript by CraftTweaker.
the class TypeExpansion method compileAnyUnary.
public boolean compileAnyUnary(MethodOutput output, OperatorType type, IEnvironmentMethod environment) {
for (ZenNativeOperator operator : unaryOperators) {
if (operator.getOperator() == type) {
ZenType returnType = operator.getMethod().getReturnType();
output.loadObject(0);
operator.getMethod().invokeStatic(output);
output.invokeStatic(returnType.getAnyClassName(environment), "valueOf", "(" + returnType.getSignature() + ")" + ZenType.ANY.getSignature());
output.returnObject();
return true;
}
}
return false;
}
Aggregations