Mercurial > projects > ddmd
view dmd/UAddExp.d @ 187:b0d41ff5e0df
Added expandability scheme outlined in http://www.dsource.org/forums/viewtopic.php?t=5659&sid=6f2150ff5b0bffcd47512a6a7608d218
author | Abscissa |
---|---|
date | Tue, 07 Jun 2011 23:37:34 -0400 |
parents | e3afd1303184 |
children |
line wrap: on
line source
module dmd.UAddExp; import dmd.common; import dmd.Expression; import dmd.Identifier; import dmd.UnaExp; import dmd.Loc; import dmd.Scope; import dmd.TOK; import dmd.Id; import dmd.DDMDExtensions; class UAddExp : UnaExp { mixin insertMemberExtension!(typeof(this)); this(Loc loc, Expression e) { register(); super(loc, TOK.TOKuadd, this.sizeof, e); } override Expression semantic(Scope sc) { Expression e; version (LOGSEMANTIC) { printf("UAddExp.semantic('%s')\n", toChars()); } assert(!type); UnaExp.semantic(sc); e1 = resolveProperties(sc, e1); e = op_overload(sc); if (e) return e; e1.checkNoBool(); e1.checkArithmetic(); return e1; } override Identifier opId() { return Id.uadd; } }