diff src/dil/ast/Parameters.d @ 821:09a64d96967a

Started the interpreter. Made a couple changes in other parts -- CharExpression now has an IntExpression of a character type as its value member and its type is set accordingly.
author Jarrett Billingsley <jarrett.billingsley@gmail.com>
date Fri, 14 Mar 2008 11:01:05 -0400
parents bcb74c9b895c
children 451ede0105e0
line wrap: on
line diff
--- a/src/dil/ast/Parameters.d	Thu Mar 13 18:59:54 2008 +0100
+++ b/src/dil/ast/Parameters.d	Fri Mar 14 11:01:05 2008 -0400
@@ -53,6 +53,12 @@
   {
     return !!(stc & StorageClass.Variadic);
   }
+  
+  /// Returns true if this parameter is lazy.
+  bool isLazy()
+  {
+    return !!(stc & StorageClass.Lazy);
+  }
 
   mixin(copyMethod);
 }
@@ -72,6 +78,14 @@
       return items[$-1].isVariadic();
     return false;
   }
+  
+  bool hasLazy()
+  {
+    foreach(param; items)
+      if(param.isLazy())
+        return true;
+    return false;
+  }
 
   void opCatAssign(Parameter param)
   { addChild(param); }