Mercurial > projects > dil
diff trunk/src/dil/ast/Expressions.d @ 665:595e902e8624
Added isPos() and isNeg() to SignExpression.
author | Aziz K?ksal <aziz.koeksal@gmail.com> |
---|---|
date | Wed, 16 Jan 2008 18:28:10 +0100 |
parents | 810e6f589d33 |
children | a1f8d8f2db38 |
line wrap: on
line diff
--- a/trunk/src/dil/ast/Expressions.d Wed Jan 16 15:14:34 2008 +0100 +++ b/trunk/src/dil/ast/Expressions.d Wed Jan 16 18:28:10 2008 +0100 @@ -416,6 +416,18 @@ super(e); mixin(set_kind); } + + bool isPos() + { + assert(begin !is null); + return begin.type == TOK.Plus; + } + + bool isNeg() + { + assert(begin !is null); + return begin.type == TOK.Minus; + } } class NotExpression : UnaryExpression