diff dmd/ExpStatement.d @ 63:cab4c37afb89

A bunch of implementations
author korDen
date Mon, 23 Aug 2010 16:52:24 +0400
parents 5c9b78899f5d
children 2e2a5c3f943a
line wrap: on
line diff
--- a/dmd/ExpStatement.d	Mon Aug 23 03:21:32 2010 +0400
+++ b/dmd/ExpStatement.d	Mon Aug 23 16:52:24 2010 +0400
@@ -14,6 +14,7 @@
 import dmd.IRState;
 import dmd.BE;
 import dmd.TOK;
+import dmd.GlobalExpressions;
 import dmd.DeclarationStatement;
 import dmd.Util : printf;
 
@@ -65,9 +66,22 @@
 		return this;
 	}
 
-    Expression interpret(InterState* istate)
+    Expression interpret(InterState istate)
 	{
-		assert(false);
+version (LOG) {
+		printf("ExpStatement.interpret(%s)\n", exp ? exp.toChars() : "");
+}
+		mixin(START!());
+		if (exp)
+		{
+			Expression e = exp.interpret(istate);
+			if (e is EXP_CANT_INTERPRET)
+			{
+				//printf("-ExpStatement.interpret(): %p\n", e);
+				return EXP_CANT_INTERPRET;
+			}
+		}
+		return null;
 	}
 
     BE blockExit()