Fix hang in date literal parser

This commit is contained in:
Tiffany Bennett 2016-08-13 19:24:28 -04:00
parent 13eabf96c0
commit 74e4510e43

View file

@ -319,6 +319,8 @@ fn parse_term(mut iter: &mut Iter) -> Expr {
loop {
match iter.next().unwrap() {
Token::Hash => break,
Token::Eof | Token::Comment(_) | Token::Newline =>
return Expr::Error(format!("Unterminated date literal")),
x => out.push(x),
}
}