about summary refs log tree commit diff
path: root/src/libexpr/lexer.l
diff options
context:
space:
mode:
authorScott Olson <scott@solson.me>2016-02-24T10·32-0600
committerScott Olson <scott@solson.me>2016-02-24T10·32-0600
commit6498adb002bcf7e715afe46c23b8635d4592c156 (patch)
treed01e199673e596332d478b31298b7aff15db7963 /src/libexpr/lexer.l
parent8f71bc33d5af7bc6d4728e5e36e89bcad27d2096 (diff)
Throw a specific error for incomplete parse errors.
`nix-repl` will use this for deciding whether to keep waiting for input or
error out right away.
Diffstat (limited to 'src/libexpr/lexer.l')
-rw-r--r--src/libexpr/lexer.l2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libexpr/lexer.l b/src/libexpr/lexer.l
index 701c01aff9..f3660ab437 100644
--- a/src/libexpr/lexer.l
+++ b/src/libexpr/lexer.l
@@ -195,5 +195,7 @@ or          { return OR_KW; }
 
 }
 
+<<EOF>> { data->atEnd = true; return 0; }
+
 %%