mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Make log_css_error in parser.rs take a &ParserContext argument and call this method
This commit is contained in:
parent
a8cbc28643
commit
afdc60fa57
5 changed files with 9 additions and 12 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue