Commit 3ea53872 authored by Peter Eastman's avatar Peter Eastman
Browse files

Fixed a parsing bug

parent 195a36fe
......@@ -113,7 +113,7 @@ ParseToken Parser::getNextToken(string expression, int start) {
c = expression[pos];
if (c == '(')
return ParseToken(expression.substr(start, pos-start+1), ParseToken::Function);
if (Operators.find(c) != string::npos || c == ',' || c == ')')
if (Operators.find(c) != string::npos || c == ',' || c == ')' || c == ' ')
return ParseToken(expression.substr(start, pos-start), ParseToken::Variable);
}
return ParseToken(expression.substr(start, string::npos), ParseToken::Variable);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment