Skip to content

Commit b15930a

Browse files
wmealingbrson
authored andcommitted
---
yaml --- r: 5585 b: refs/heads/master c: f375391 h: refs/heads/master i: 5583: cde86fa v: v3
1 parent fba1fff commit b15930a

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: a96b16e8c334abb422d85cbd79a15afbe9efc4d1
2+
refs/heads/master: f375391cb61bb0a06f3e2fe80aac070ea4c83fc1

trunk/src/comp/syntax/parse/lexer.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,8 +490,15 @@ fn next_token_inner(rdr: reader) -> token::token {
490490
ret token::LIT_CHAR(c2);
491491
}
492492
'"' {
493+
let n = rdr.get_chpos();
493494
rdr.bump();
494495
while rdr.curr() != '"' {
496+
if rdr.is_eof() {
497+
rdr.err(#fmt["unterminated double quote string: %s",
498+
rdr.get_str_from(n)]);
499+
fail;
500+
}
501+
495502
let ch = rdr.curr();
496503
rdr.bump();
497504
alt ch {
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// -*- rust -*-
2+
3+
// error-pattern: unterminated double quote string
4+
5+
6+
fn main() {
7+
"
8+
}

0 commit comments

Comments
 (0)