diff --git a/lib/token.h b/lib/token.h index 39549d6ea..381fa8c83 100644 --- a/lib/token.h +++ b/lib/token.h @@ -309,6 +309,9 @@ public: bool isBoolean() const { return mTokType == eBoolean; } + bool isUnaryOp() const { + return astOperand1() != nullptr && astOperand2() == nullptr; + } bool isUnaryPreOp() const; unsigned int flags() const {