Skip to content

Commit

Permalink
Make most lexer errors non-fatal
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
lilyball committed May 24, 2014
1 parent c329a1f commit 4c9dace
Show file tree
Hide file tree
Showing 9 changed files with 148 additions and 211 deletions.
2 changes: 1 addition & 1 deletion src/libsyntax/parse/comments.rs
Expand Up @@ -291,7 +291,7 @@ fn read_block_comment(rdr: &mut StringReader,
while level > 0 {
debug!("=== block comment level {}", level);
if is_eof(rdr) {
rdr.fatal("unterminated block comment".to_strbuf());
rdr.fatal("unterminated block comment");
}
if rdr.curr_is('\n') {
trim_whitespace_prefix_and_push_line(&mut lines,
Expand Down

5 comments on commit 4c9dace

@bors
Copy link
Contributor

@bors bors commented on 4c9dace May 24, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from alexcrichton
at lilyball@4c9dace

@bors
Copy link
Contributor

@bors bors commented on 4c9dace May 24, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging kballard/rust/nonfatal_lexer_errors = 4c9dace into auto

@bors
Copy link
Contributor

@bors bors commented on 4c9dace May 24, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kballard/rust/nonfatal_lexer_errors = 4c9dace merged ok, testing candidate = 6cf4301

@bors
Copy link
Contributor

@bors bors commented on 4c9dace May 24, 2014

@bors
Copy link
Contributor

@bors bors commented on 4c9dace May 24, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 6cf4301

Please sign in to comment.