nix repl: Fix handling of multi-line expressions
This commit is contained in:
parent
7cf874c17d
commit
550e11f077
1 changed files with 3 additions and 3 deletions
|
@ -212,7 +212,7 @@ void NixRepl::mainLoop(const std::vector<std::string> & files)
|
||||||
try {
|
try {
|
||||||
if (!removeWhitespace(input).empty() && !processLine(input)) return;
|
if (!removeWhitespace(input).empty() && !processLine(input)) return;
|
||||||
} catch (ParseError & e) {
|
} catch (ParseError & e) {
|
||||||
if (e.msg().find("unexpected $end") != std::string::npos) {
|
if (e.msg().find("unexpected end of file") != std::string::npos) {
|
||||||
// For parse errors on incomplete input, we continue waiting for the next line of
|
// For parse errors on incomplete input, we continue waiting for the next line of
|
||||||
// input without clearing the input so far.
|
// input without clearing the input so far.
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in a new issue