Don't parse 'var == expr' as an assignment
This commit is contained in:
parent
1734e8a149
commit
66b2d18243
1 changed files with 2 additions and 0 deletions
|
@ -350,6 +350,8 @@ bool NixRepl::processLine(string line)
|
||||||
size_t p = line.find('=');
|
size_t p = line.find('=');
|
||||||
string name;
|
string name;
|
||||||
if (p != string::npos &&
|
if (p != string::npos &&
|
||||||
|
p < line.size() &&
|
||||||
|
line[p + 1] != '=' &&
|
||||||
isVarName(name = removeWhitespace(string(line, 0, p))))
|
isVarName(name = removeWhitespace(string(line, 0, p))))
|
||||||
{
|
{
|
||||||
Expr * e = parseString(string(line, p + 1));
|
Expr * e = parseString(string(line, p + 1));
|
||||||
|
|
Loading…
Reference in a new issue