Mercurial > projects > dil
changeset 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 | b5a828a9f9e3 |
children | 8d96a7b50982 |
files | trunk/src/dil/ast/Expressions.d |
diffstat | 1 files changed, 12 insertions(+), 0 deletions(-) [+] |
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