Make log_css_error in parser.rs take a &ParserContext argument and call this method

This commit is contained in:
GauriGNaik 2015-11-07 20:14:57 -05:00 committed by Josh Matthews
parent a8cbc28643
commit afdc60fa57
5 changed files with 9 additions and 12 deletions

View file

@ -43,10 +43,6 @@ impl<'a> ParserContext<'a> {
/// Defaults to a no-op.
/// Set a `RUST_LOG=style::errors` environment variable
/// to log CSS parse errors to stderr.
pub fn log_css_error(input: &mut Parser, position: SourcePosition, message: &str) {
if log_enabled!(log::LogLevel::Info) {
let location = input.source_location(position);
// TODO eventually this will got into a "web console" or something.
info!("{}:{} {}", location.line, location.column, message)
}
pub fn log_css_error(input: &mut Parser, position: SourcePosition, message: &str, parsercontext: &ParserContext) {
parsercontext.error_reporter.report_error(input, position, message);
}