diff parser/Action.d @ 88:eb5b2c719a39 new_gen

Major change to locations, tokens and expressions. A location (now SourceLocation or SLoc) is only 32 bit in size - disadvantage is that it can't find its own text. You have to go through the new SourceManager to do that. This has caused changes to a lot of stuff and removal of DataSource and the old Location Additionally Exp has gotten some location stuff, so we can give proper error messages. Not in Decl and Stmt yet, but thats coming too.
author Anders Halager <halager@gmail.com>
date Sun, 04 May 2008 18:13:46 +0200
parents 9e90694f5da0
children 48bb2287c035
line wrap: on
line diff
--- a/parser/Action.d	Sun May 04 12:58:02 2008 +0200
+++ b/parser/Action.d	Sun May 04 18:13:46 2008 +0200
@@ -31,11 +31,6 @@
         return id;
     }
     Token tok;
-
-    char[] toString()
-    {
-        return tok.get;
-    }
 }
 
 class PointerId : Id
@@ -248,7 +243,7 @@
     /**
       Binary operator.
      */
-    ExprT actOnBinaryOp(Operator op, ExprT l, ExprT r)
+    ExprT actOnBinaryOp(SLoc op_loc, Operator op, ExprT l, ExprT r)
     {
         return null;
     }
@@ -258,7 +253,7 @@
       The left hand side can be any expression, but its only possible to look
       up an identifier.
      */
-    ExprT actOnMemberReference(ExprT lhs, Location op, Id member)
+    ExprT actOnMemberReference(ExprT lhs, SourceLocation op, Id member)
     {
         return null;
     }
@@ -287,7 +282,7 @@
     /**
       Cast expression.
      */
-    ExprT actOnCastExpr(Id type, ExprT exp)
+    ExprT actOnCastExpr(ref Token _cast, Id type, ExprT exp)
     {
         return null;
     }