diff parser/Parser.d @ 194:08f68d684047

Rename some files. Hopefully we can get a more iterative sema pass, that's a lot easier to "get startet with". Also added support for alias.
author Anders Johnsen <skabet@gmail.com>
date Tue, 29 Jul 2008 13:54:44 +0200
parents 85e492318bb6
children
line wrap: on
line diff
--- a/parser/Parser.d	Fri Jul 25 15:31:16 2008 +0200
+++ b/parser/Parser.d	Tue Jul 29 13:54:44 2008 +0200
@@ -91,6 +91,11 @@
                 Id iden = Id(require(Tok.Identifier));
                 return parseInterface(type, iden, att);
 
+            case Tok.Alias:
+                next();
+                auto decl = parseDecl(Attribute());
+                return action.actOnAliasDecl(decl, att);
+
             case Tok.Identifier:
                 Id type = parseType;
                 Id iden = Id(require(Tok.Identifier));
@@ -126,6 +131,7 @@
                 messages.report(UnexpectedTok, peek.location)
                     .arg(sm.getText(peek.asRange));
 
+                next();
                 return null;
         }
         messages.report(UnexpectedTok, peek.location)
@@ -961,6 +967,8 @@
                     return iden;
             }
         }
+        else if (n.type == Tok.Null)
+            return action.actOnNullExpr(n.location);
         else if (n.type == Tok.Cast)
             return parseCast(n);
         else if (n.type == Tok.Integer)