Mercurial > projects > ddmd
diff dmd/IdentifierExp.d @ 179:cd48cb899aee
Updated to dmd2.040
author | korDen |
---|---|
date | Sun, 17 Oct 2010 20:56:07 +0400 |
parents | e3afd1303184 |
children | b0d41ff5e0df |
line wrap: on
line diff
--- a/dmd/IdentifierExp.d Sun Oct 17 07:42:00 2010 +0400 +++ b/dmd/IdentifierExp.d Sun Oct 17 20:56:07 2010 +0400 @@ -7,6 +7,8 @@ import dmd.TypePointer; import dmd.FuncDeclaration; import dmd.TemplateInstance; +import dmd.Id; +import dmd.VarDeclaration; import dmd.TemplateDeclaration; import dmd.TemplateExp; import dmd.DsymbolExp; @@ -132,6 +134,15 @@ return e.semantic(sc); } + + if (ident == Id.ctfe) + { + // Create the magic __ctfe bool variable + VarDeclaration vd = new VarDeclaration(loc, Type.tbool, Id.ctfe, null); + Expression e = new VarExp(loc, vd); + e = e.semantic(sc); + return e; + } error("undefined identifier %s", ident.toChars()); type = Type.terror;