Search in sources :

Example 1 with SideEffectHelper

use of dyvilx.tools.compiler.transform.SideEffectHelper in project Dyvil by Dyvil.

the class InfixCall method resolveCompound.

protected static IValue resolveCompound(MarkerList markers, IContext context, SourcePosition position, IValue lhs, Name name, ArgumentList arguments) {
    final IValue op = new InfixCall(position, lhs, name, arguments).resolveCall(markers, context, false);
    if (op == null) {
        return null;
    }
    final SideEffectHelper helper = new SideEffectHelper();
    final IValue assignment = lhs.toCompoundAssignment(op, position, markers, context, helper);
    if (assignment != null) {
        return helper.finish(assignment);
    }
    return null;
}
Also used : SideEffectHelper(dyvilx.tools.compiler.transform.SideEffectHelper) IValue(dyvilx.tools.compiler.ast.expression.IValue)

Aggregations

IValue (dyvilx.tools.compiler.ast.expression.IValue)1 SideEffectHelper (dyvilx.tools.compiler.transform.SideEffectHelper)1