aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/parser.y
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2018-05-11 11:39:25 +0200
committerEelco Dolstra <edolstra@gmail.com>2018-05-11 11:40:50 +0200
commitf3c85f9eb395b13790d1fced05665125e2ec81ca (patch)
treed940404b4d215c9b2a6a7fccadcb7f3e6974e418 /src/libexpr/parser.y
parent2b3c1b3a889cf8f2c210b71b208b9e14fc8fb6a6 (diff)
Revert "Throw a specific error for incomplete parse errors."
This reverts commit 6498adb002bcf7e715afe46c23b8635d4592c156. We don't actually use IncompleteParseError in 'nix repl'.
Diffstat (limited to 'src/libexpr/parser.y')
-rw-r--r--src/libexpr/parser.y9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/libexpr/parser.y b/src/libexpr/parser.y
index e3f452184..eee48887d 100644
--- a/src/libexpr/parser.y
+++ b/src/libexpr/parser.y
@@ -31,12 +31,10 @@ namespace nix {
Path basePath;
Symbol path;
string error;
- bool atEnd;
Symbol sLetBody;
ParseData(EvalState & state)
: state(state)
, symbols(state.symbols)
- , atEnd(false)
, sLetBody(symbols.create("<let-body>"))
{ };
};
@@ -541,12 +539,7 @@ Expr * EvalState::parse(const char * text,
int res = yyparse(scanner, &data);
yylex_destroy(scanner);
- if (res) {
- if (data.atEnd)
- throw IncompleteParseError(data.error);
- else
- throw ParseError(data.error);
- }
+ if (res) throw ParseError(data.error);
data.result->bindVars(staticEnv);