diff options
| author | Benjamin Herr <ben@0x539.de> | 2013-09-19 16:11:23 +0200 |
|---|---|---|
| committer | Benjamin Herr <ben@0x539.de> | 2013-09-19 16:58:11 +0200 |
| commit | 101917795898b602340d96a6c0f7815d108af1af (patch) | |
| tree | efac5b3a02dfeea43cc24cdc3db2f10dc0502899 /src/rustllvm/RustWrapper.cpp | |
| parent | d2b0b11aebfe3167bf41f7c6c31cf7b1e396efe7 (diff) | |
| download | rust-101917795898b602340d96a6c0f7815d108af1af.tar.gz rust-101917795898b602340d96a6c0f7815d108af1af.zip | |
lexer: show correct span on lexical errors
Previously, the lexer calling `rdr.fatal(...)` would report the span of the last complete token, instead of a span within the erroneous token (besides one span fixed in 1ac90bb). This commit adds a wrapper around `rdr.fatal(...)` that sets the span explicilty, so that all fatal errors in `libsyntax/parse/lexer.rs` now report the offending code more precisely. A number of tests try to verify that, though the `compile-fail` testing setup can only check that the spans are on the right lines, and the "unterminated string/block comment" errors can't have the line marked at all, so that's incomplete. Closes #9149.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
