view dmd/AndAssignExp.d @ 12:832f71e6f96c

*Exp and *AssignExp arrayOp implementation added (might be a bit incomplete) Some unittest-specific functions implemented
author korDen
date Mon, 12 Apr 2010 15:13:00 +0400
parents 10317f0c89a5
children cab4c37afb89
line wrap: on
line source

module dmd.AndAssignExp;

import dmd.BinExp;
import dmd.Loc;
import dmd.Expression;
import dmd.Scope;
import dmd.InterState;
import dmd.OutBuffer;
import dmd.ArrayTypes;
import dmd.Identifier;
import dmd.IRState;
import dmd.TOK;
import dmd.Id;

import dmd.backend.elem;
import dmd.backend.OPER;

class AndAssignExp : BinExp
{
    this(Loc loc, Expression e1, Expression e2)
	{
		super(loc, TOK.TOKandass, AndAssignExp.sizeof, e1, e2);
	}
	
    Expression semantic(Scope sc)
	{
		return commonSemanticAssignIntegral(sc);
	}
	
    Expression interpret(InterState* istate)
	{
		assert(false);
	}
	
    void buildArrayIdent(OutBuffer buf, Expressions arguments)
	{
		AssignExp_buildArrayIdent(buf, arguments, "And");
	}
	
    Expression buildArrayLoop(Arguments fparams)
	{
		assert(false);
	}

    Identifier opId()    /* For operator overloading */
	{
		return Id.andass;
	}

    elem* toElem(IRState* irs)
	{
		return toElemBin(irs, OPER.OPandass);
	}
}