# HG changeset patch # User Aziz K?ksal # Date 1200504490 -3600 # Node ID 595e902e862492ef932ea83d2b0e73d7f2bc3c61 # Parent b5a828a9f9e35630fa48bb29261e20e6b04982cb Added isPos() and isNeg() to SignExpression. diff -r b5a828a9f9e3 -r 595e902e8624 trunk/src/dil/ast/Expressions.d --- 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