comparison dmd/IdentifierExp.d @ 179:cd48cb899aee

Updated to dmd2.040
author korDen
date Sun, 17 Oct 2010 20:56:07 +0400
parents e3afd1303184
children b0d41ff5e0df
comparison
equal deleted inserted replaced
178:e3afd1303184 179:cd48cb899aee
5 import dmd.Declaration; 5 import dmd.Declaration;
6 import dmd.TY; 6 import dmd.TY;
7 import dmd.TypePointer; 7 import dmd.TypePointer;
8 import dmd.FuncDeclaration; 8 import dmd.FuncDeclaration;
9 import dmd.TemplateInstance; 9 import dmd.TemplateInstance;
10 import dmd.Id;
11 import dmd.VarDeclaration;
10 import dmd.TemplateDeclaration; 12 import dmd.TemplateDeclaration;
11 import dmd.TemplateExp; 13 import dmd.TemplateExp;
12 import dmd.DsymbolExp; 14 import dmd.DsymbolExp;
13 import dmd.Identifier; 15 import dmd.Identifier;
14 import dmd.OutBuffer; 16 import dmd.OutBuffer;
130 e = new DsymbolExp(loc, s, 1); 132 e = new DsymbolExp(loc, s, 1);
131 } 133 }
132 134
133 return e.semantic(sc); 135 return e.semantic(sc);
134 } 136 }
137
138 if (ident == Id.ctfe)
139 {
140 // Create the magic __ctfe bool variable
141 VarDeclaration vd = new VarDeclaration(loc, Type.tbool, Id.ctfe, null);
142 Expression e = new VarExp(loc, vd);
143 e = e.semantic(sc);
144 return e;
145 }
135 146
136 error("undefined identifier %s", ident.toChars()); 147 error("undefined identifier %s", ident.toChars());
137 type = Type.terror; 148 type = Type.terror;
138 return this; 149 return this;
139 } 150 }