about summary refs log tree commit diff
path: root/src/comp/syntax/parse
diff options
context:
space:
mode:
Diffstat (limited to 'src/comp/syntax/parse')
-rw-r--r--src/comp/syntax/parse/lexer.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/comp/syntax/parse/lexer.rs b/src/comp/syntax/parse/lexer.rs
index e36b26c559e..f10701ceba5 100644
--- a/src/comp/syntax/parse/lexer.rs
+++ b/src/comp/syntax/parse/lexer.rs
@@ -490,8 +490,15 @@ fn next_token_inner(rdr: reader) -> token::token {
         ret token::LIT_CHAR(c2);
       }
       '"' {
+        let n = rdr.get_chpos();
         rdr.bump();
         while rdr.curr() != '"' {
+            if rdr.is_eof() {
+                rdr.err(#fmt["unterminated double quote string: %s",
+                             rdr.get_str_from(n)]);
+                fail;
+            }
+
             let ch = rdr.curr();
             rdr.bump();
             alt ch {