diff trunk/src/dil/parser/Parser.d @ 673:64fec49651cf

Renamed VariableDeclaration to VariablesDeclaration. Removed TryCast and CastTo template functions. Renamed Node.iS() to Node.Is().
author Aziz K?ksal <aziz.koeksal@gmail.com>
date Fri, 18 Jan 2008 16:44:20 +0100
parents f1325a4506de
children e7811328e6c7
line wrap: on
line diff
--- a/trunk/src/dil/parser/Parser.d	Fri Jan 18 00:30:14 2008 +0100
+++ b/trunk/src/dil/parser/Parser.d	Fri Jan 18 16:44:20 2008 +0100
@@ -298,7 +298,7 @@
     case T.Import:
     case_Import:
       decl = parseImportDeclaration();
-      imports ~= CastTo!(ImportDeclaration)(decl);
+      imports ~= decl.to!(ImportDeclaration);
       // Handle specially. StorageClass mustn't be set.
       decl.setProtection(this.protection);
       return set(decl, begin);
@@ -538,7 +538,7 @@
         values ~= null;
     }
     require(T.Semicolon);
-    auto d = new VariableDeclaration(type, idents, values);
+    auto d = new VariablesDeclaration(type, idents, values);
     d.setStorageClass(stc);
     d.setLinkageType(linkType);
     d.setProtection(protection);
@@ -1817,7 +1817,7 @@
       ident = requireIdentifier(MSG.ExpectedVariableName);
       require(T.Assign);
       auto init = parseExpression();
-      auto v = new VariableDeclaration(null, [ident], [init]);
+      auto v = new VariablesDeclaration(null, [ident], [init]);
       set(v, begin.nextNWS);
       auto d = new StorageClassDeclaration(StorageClass.Auto, v);
       set(d, begin);
@@ -1838,7 +1838,7 @@
       if (success)
       {
         auto init = parseExpression();
-        auto v = new VariableDeclaration(type, [ident], [init]);
+        auto v = new VariablesDeclaration(type, [ident], [init]);
         set(v, begin);
         variable = new DeclarationStatement(v);
         set(variable, begin);