From 7e0edb6c2db17c87415fbd041ef7add9dfb467e5 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 13 Dec 2016 12:46:09 -0700 Subject: Corrected negation and single value parse bugs. Discovered arithmetic bug in the Number class, -4 + 5 is coming back as -1, not 1. It's getting the sign wrong somehow. I'll have to hunt that down. --- src/token.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/token.cpp') diff --git a/src/token.cpp b/src/token.cpp index 0c7bda1..ff04e94 100644 --- a/src/token.cpp +++ b/src/token.cpp @@ -45,8 +45,9 @@ Token::~Token() break; case tVariable: - case tCommand: case tString: + case tCmdExtended: + case tCmdParam: delete sVal; break; @@ -64,8 +65,9 @@ Token &Token::operator=( const Token &rhs ) break; case tVariable: - case tCommand: case tString: + case tCmdExtended: + case tCmdParam: delete sVal; break; @@ -87,7 +89,6 @@ Bu::Formatter &operator<<( Bu::Formatter &f, Token::Type eType ) { case Token::tNumber: return f << "num"; case Token::tVariable: return f << "var"; - case Token::tCommand: return f << "cmd"; case Token::tPlus: return f << "+"; case Token::tMinus: return f << "-"; case Token::tDivide: return f << "/"; -- cgit v1.2.3