mirror of
https://github.com/tiffany352/rink-rs
synced 2024-09-20 22:21:57 +00:00
Fix hang in date literal parser
This commit is contained in:
parent
13eabf96c0
commit
74e4510e43
1 changed files with 2 additions and 0 deletions
|
@ -319,6 +319,8 @@ fn parse_term(mut iter: &mut Iter) -> Expr {
|
||||||
loop {
|
loop {
|
||||||
match iter.next().unwrap() {
|
match iter.next().unwrap() {
|
||||||
Token::Hash => break,
|
Token::Hash => break,
|
||||||
|
Token::Eof | Token::Comment(_) | Token::Newline =>
|
||||||
|
return Expr::Error(format!("Unterminated date literal")),
|
||||||
x => out.push(x),
|
x => out.push(x),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue