Skip to content

Commit 4c9dace

Browse files
committed
Make most lexer errors non-fatal
Most errors that arise in the lexer can be recovered from. This allows for more than one syntax error to be reported at a time.
1 parent c329a1f commit 4c9dace

9 files changed

+148
-211
lines changed

src/libsyntax/parse/comments.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ fn read_block_comment(rdr: &mut StringReader,
291291
while level > 0 {
292292
debug!("=== block comment level {}", level);
293293
if is_eof(rdr) {
294-
rdr.fatal("unterminated block comment".to_strbuf());
294+
rdr.fatal("unterminated block comment");
295295
}
296296
if rdr.curr_is('\n') {
297297
trim_whitespace_prefix_and_push_line(&mut lines,

0 commit comments

Comments
 (0)