use of stanhebben.zenscript.expression.partial.IPartialExpression in project ZenScript by CraftTweaker.
the class ParsedExpressionOpAssign method compile.
@Override
public IPartialExpression compile(IEnvironmentMethod environment, ZenType predictedType) {
// TODO: validate if the prediction rules are sound
Expression cLeft = left.compile(environment, predictedType).eval(environment);
Expression cRight = right.compile(environment, cLeft.getType()).eval(environment);
Expression value = cLeft.getType().binary(getPosition(), environment, cLeft, cRight, operator);
return left.compile(environment, predictedType).assign(getPosition(), environment, value);
}
Aggregations