Skip to content

Commit

Permalink
Don't parse 'var == expr' as an assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
edolstra committed Jun 16, 2014
1 parent 1734e8a commit 66b2d18
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nix-repl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 66b2d18

Please sign in to comment.