Token* Scanner::GetOperation(char currentChar) { string s = ""; char lastChar = currentChar; int pos = currentPos, line = currentLine; s += currentChar; currentChar = GetChar(); if(!IsSpace(currentChar) && !IsTabulationSymbol(currentChar) && !IsEndOfLine(currentChar)) { if(IsOperation( string(1, lastChar) + string(1, currentChar) )) { s += currentChar; } else BackToPreviousChar(); } return new Token(line, pos, OPERATOR, operation[s], s); }
virtual bool IsValue() const { return IsOperation() == false; }