Don't parse 'var == expr' as an assignment

This commit is contained in:
Eelco Dolstra 2014-06-16 10:05:09 -04:00
parent 1734e8a149
commit 66b2d18243

View file

@ -350,6 +350,8 @@ bool NixRepl::processLine(string line)
size_t p = line.find('=');
string name;
if (p != string::npos &&
p < line.size() &&
line[p + 1] != '=' &&
isVarName(name = removeWhitespace(string(line, 0, p))))
{
Expr * e = parseString(string(line, p + 1));