diff dmd/Expression.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 d706d958e4e8
children 460959608115
line wrap: on
line diff
--- a/dmd/Expression.d	Wed Mar 31 16:29:36 2010 +0400
+++ b/dmd/Expression.d	Mon Apr 12 15:13:00 2010 +0400
@@ -2,6 +2,8 @@
 
 import dmd.Loc;
 import dmd.TOK;
+import dmd.Argument;
+import dmd.IdentifierExp;
 import dmd.Type;
 import dmd.WANT;
 import dmd.Scope;
@@ -886,14 +888,23 @@
 	}
     
     // For array ops
+	/******************************************
+	 * Construct the identifier for the array operation function,
+	 * and build the argument list to pass to it.
+	 */
     void buildArrayIdent(OutBuffer buf, Expressions arguments)
 	{
-		assert(false);
+		buf.writestring("Exp");
+		arguments.shift(cast(void*)this);
 	}
     
     Expression buildArrayLoop(Arguments fparams)
 	{
-		assert(false);
+		Identifier id = Identifier.generateId("c", fparams.dim);
+		Argument param = new Argument(STC.STCundefined, type, id, null);
+		fparams.shift(cast(void*)param);
+		Expression e = new IdentifierExp(Loc(0), id);
+		return e;
 	}
     
     // Back end