Mercurial > projects > ddmd
view dmd/DebugCondition.d @ 115:6caaf0256da1
+ interpretation of (non-assign) binary expressions
+ BinExp.isunsigned
+ EqualExp.isBit
author | Trass3r |
---|---|
date | Thu, 02 Sep 2010 01:29:29 +0200 |
parents | e28b18c23469 |
children | 010eb8f0e18d |
line wrap: on
line source
module dmd.DebugCondition; import dmd.common; import dmd.DVCondition; import dmd.Module; import dmd.Identifier; import dmd.Scope; import dmd.ScopeDsymbol; import dmd.OutBuffer; import dmd.HdrGenState; import dmd.Array; import dmd.String; import dmd.Global; import dmd.condition.util.findCondition; class DebugCondition : DVCondition { static void setGlobalLevel(uint level) { assert(false); } static void addGlobalIdent(const(char)* ident) { assert(false); } static void addPredefinedGlobalIdent(const(char)* ident) { assert(false); } this(Module mod, uint level, Identifier ident) { super(mod, level, ident); } override bool include(Scope sc, ScopeDsymbol s) { //printf("DebugCondition::include() level = %d, debuglevel = %d\n", level, global.params.debuglevel); if (inc == 0) { inc = 2; if (ident) { if (findCondition(mod.debugids, ident)) inc = 1; else if (findCondition(global.params.debugids, ident)) inc = 1; else { if (!mod.debugidsNot) mod.debugidsNot = new Array(); mod.debugidsNot.push(cast(void*)new String(ident.toChars())); } } else if (level <= global.params.debuglevel || level <= mod.debuglevel) inc = 1; } return (inc == 1); } override void toCBuffer(OutBuffer buf, HdrGenState* hgs) { assert(false); } }