diff dmd/Parser.d @ 131:206db751bd4c

dmdfe 2.037 compiles now
author Eldar Insafutdinov <e.insafutdinov@gmail.com>
date Fri, 10 Sep 2010 00:27:37 +0100
parents 60bb0fe4563e
children c494af1dba80
line wrap: on
line diff
--- a/dmd/Parser.d	Thu Sep 09 22:51:44 2010 +0100
+++ b/dmd/Parser.d	Fri Sep 10 00:27:37 2010 +0100
@@ -203,6 +203,8 @@
 import dmd.VersionSymbol;
 import dmd.AliasThis;
 import dmd.Global;
+import dmd.TRUST;
+import dmd.PowExp;
 
 import core.stdc.string : memcpy;
 
@@ -313,8 +315,8 @@
 		Dsymbols a;
 		Dsymbols aelse;
 		PROT prot;
-		STC stc;
-		STC storageClass;
+		StorageClass stc;
+		StorageClass storageClass;
 		Condition  condition;
 		string comment;
 
@@ -755,7 +757,7 @@
 	 */
 version (DMDV2)
 {
-    Dsymbols parseAutoDeclarations(STC storageClass, const(char)[] comment)
+    Dsymbols parseAutoDeclarations(StorageClass storageClass, const(char)[] comment)
 	{
 		auto a = new Dsymbols;
 
@@ -840,9 +842,9 @@
 		return a;
 	}
 version(DMDV2) {
-    void composeStorageClass(STC stc)
+    void composeStorageClass(StorageClass stc)
 	{
-		STC u = stc;
+		StorageClass u = stc;
 		u &= STC.STCconst | STC.STCimmutable | STC.STCmanifest;
 		if (u & (u - 1))
 			error("conflicting storage class %s", Token.toChars(token.value));
@@ -863,10 +865,10 @@
  */
 
 version(DMDV2) {
-    STC parseAttribute()
+    StorageClass parseAttribute()
     {
         nextToken();
-        STC stc = STCundefined;
+        StorageClass stc = STCundefined;
         if (token.value != TOKidentifier)
         {
 	        error("identifier expected after @, not %s", token.toChars());
@@ -1804,8 +1806,8 @@
 		Identifier ai = null;
 		Type at;
 		Parameter a;
-		STC storageClass = STC.STCundefined;
-		STC stc;
+		StorageClass storageClass = STC.STCundefined;
+		StorageClass stc;
 		Expression ae;
 
 		for ( ;1; nextToken())
@@ -2557,7 +2559,7 @@
 					else if (token.value == TOK.TOKnothrow)
 					    isnothrow = true;
 		            else if (token.value == TOKat)
-		            {	STC stc = parseAttribute();
+		            {	StorageClass stc = parseAttribute();
 			            switch (cast(uint)(stc >> 32))
 			            {   case STCproperty >> 32:
 				                isproperty = true;
@@ -2752,7 +2754,7 @@
 
 					case TOK.TOKat:
     	            {
-                        STC stc = parseAttribute();
+                        StorageClass stc = parseAttribute();
 	                    auto tfunc = cast(TypeFunction)tf;
 		                switch (cast(uint)(stc >> 32))
 		                {
@@ -2804,9 +2806,9 @@
 		return ts;
 	}
 	
-    Dsymbols parseDeclarations(STC storage_class)
+    Dsymbols parseDeclarations(StorageClass storage_class)
 	{
-		STC stc;
+		StorageClass stc;
 		Type ts;
 		Type t;
 		Type tfirst;
@@ -3297,7 +3299,7 @@
 		        auto a = parseBlock();
 		        Dsymbol d = new StorageClassDeclaration(STCstatic, a);
 		        s = new DeclarationStatement(loc, d);
-		        if (flags & PSscope)
+		        if (flags & ParseStatementFlags.PSscope)
 		            s = new ScopeStatement(loc, s);
 		        break;
 	        }
@@ -3522,7 +3524,7 @@
 			{
 			Identifier ai = null;
 			Type at;
-			STC storageClass = STC.STCundefined;
+			StorageClass storageClass = STC.STCundefined;
 
 			if (token.value == TOK.TOKinout || token.value == TOK.TOKref)
 			{   storageClass = STC.STCref;
@@ -5216,7 +5218,7 @@
 			nextToken();
 			check(TOK.TOKlparen, "typeid");
 	        Object o;
-	        if (isDeclaration(&token, 0, TOKreserved, NULL))
+	        if (isDeclaration(&token, 0, TOKreserved, null))
 	        {	// argument is a type
 		        o = parseType();
 	        }
@@ -5460,7 +5462,7 @@
 				isnothrow = true;
 		        else if (token.value == TOKat)
 		        {
-                    STC stc = parseAttribute();
+                    StorageClass stc = parseAttribute();
 			        switch (cast(uint)(stc >> 32))
 			        {
                         case STCproperty >> 32:
@@ -5761,7 +5763,7 @@
 				else
 					// ident!template_argument
 					tiargs = parseTemplateArgument();
-				e = new DotTemplateInstanceExp(loc, e, tiargs);
+				e = new DotTemplateInstanceExp(loc, e, id, tiargs);
 				}
 				else
 				e = new DotIdExp(loc, e, id);