# HG changeset patch # User Aziz K?ksal # Date 1198078035 -3600 # Node ID c0f5b1f78a5500c96c1ca516864270d5bbac9ca7 # Parent 660684f559a4d0b3f1f6c33cf480ae446ce1b752 Added ComplexExpression. diff -r 660684f559a4 -r c0f5b1f78a55 trunk/src/dil/Expressions.d --- a/trunk/src/dil/Expressions.d Tue Dec 18 22:49:52 2007 +0100 +++ b/trunk/src/dil/Expressions.d Wed Dec 19 16:27:15 2007 +0100 @@ -808,6 +808,30 @@ } } +/++ + This expression holds a complex number. + It is only created in the semantic phase. ++/ +class ComplexExpression : Expression +{ + creal number; + + this(creal number, Type type) + { + mixin(set_kind); + this.number = number; + this.type = type; + } + + Expression semantic(Scope) + { + if (type) + return this; + type = Types.Cdouble; + return this; + } +} + class CharExpression : Expression { dchar character;