changeset 621:2ac14bb6b84e

Moved class dil.ast.Expression to its own module.
author Aziz K?ksal <aziz.koeksal@gmail.com>
date Fri, 11 Jan 2008 01:11:12 +0100
parents f15b054bb27e
children 19e08da86123
files trunk/src/dil/ast/Expression.d trunk/src/dil/ast/Expressions.d
diffstat 2 files changed, 47 insertions(+), 35 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/trunk/src/dil/ast/Expression.d	Fri Jan 11 01:11:12 2008 +0100
@@ -0,0 +1,46 @@
+/++
+  Author: Aziz Köksal
+  License: GPL3
++/
+module dil.ast.Expression;
+
+import dil.ast.Node;
+import dil.semantic.Scope;
+import dil.semantic.Types;
+import common;
+
+abstract class Expression : Node
+{
+  Type type; /// The type of this expression.
+
+  this()
+  {
+    super(NodeCategory.Expression);
+  }
+
+  // Semantic analysis:
+
+  Expression semantic(Scope scop)
+  {
+    debug Stdout("SA for "~this.classinfo.name).newline;
+    if (!type)
+      type = Types.Undefined;
+    return this;
+  }
+
+  Expression evaluate()
+  {
+    return null;
+  }
+
+  import dil.Messages;
+  void error(Scope scop, MID mid)
+  {
+    scop.error(this.begin, mid);
+  }
+
+  void error(Scope scop, char[] msg)
+  {
+
+  }
+}
--- a/trunk/src/dil/ast/Expressions.d	Fri Jan 11 00:54:53 2008 +0100
+++ b/trunk/src/dil/ast/Expressions.d	Fri Jan 11 01:11:12 2008 +0100
@@ -4,6 +4,7 @@
 +/
 module dil.ast.Expressions;
 
+public import dil.ast.Expression;
 import dil.ast.Node;
 import dil.ast.Types;
 import dil.ast.Declarations;
@@ -15,41 +16,6 @@
 import dil.semantic.Types;
 import common;
 
-abstract class Expression : Node
-{
-  Type type; /// The type of this expression.
-  this()
-  {
-    super(NodeCategory.Expression);
-  }
-
-  // Semantic analysis:
-
-  Expression semantic(Scope scop)
-  {
-    debug Stdout("SA for "~this.classinfo.name).newline;
-    if (!type)
-      type = Types.Undefined;
-    return this;
-  }
-
-  Expression evaluate()
-  {
-    return null;
-  }
-
-  import dil.Messages;
-  void error(Scope scop, MID mid)
-  {
-    scop.error(this.begin, mid);
-  }
-
-  void error(Scope scop, char[] msg)
-  {
-
-  }
-}
-
 class EmptyExpression : Expression
 {
   this()