Rename StdoutErrorReporter to RustLogReporter.

This commit is contained in:
Simon Sapin 2017-04-24 08:00:20 +02:00
parent de1fe51dc6
commit 7fe57ecaea
7 changed files with 34 additions and 30 deletions

View file

@ -24,11 +24,15 @@ pub trait ParseErrorReporter : Sync + Send {
line_number_offset: u64);
}
/// An error reporter that reports the errors to the `info` log channel.
/// An error reporter that uses [the `log` crate](https://github.com/rust-lang-nursery/log)
/// at `info` level.
///
/// TODO(emilio): The name of this reporter is a lie, and should be renamed!
pub struct StdoutErrorReporter;
impl ParseErrorReporter for StdoutErrorReporter {
/// This logging is silent by default, and can be enabled with a `RUST_LOG=style=info`
/// environment variable.
/// (See [`env_logger`](https://rust-lang-nursery.github.io/log/env_logger/).)
pub struct RustLogReporter;
impl ParseErrorReporter for RustLogReporter {
fn report_error(&self,
input: &mut Parser,
position: SourcePosition,