mirror of
https://codeberg.org/icewind/php-literal-parser.git
synced 2026-06-03 18:44:07 +02:00
fix building without the colors feature
This commit is contained in:
parent
ccc50cb289
commit
261b417be9
1 changed files with 2 additions and 2 deletions
|
|
@ -3,7 +3,7 @@ use crate::num::ParseIntError;
|
||||||
use crate::string::UnescapeError;
|
use crate::string::UnescapeError;
|
||||||
use logos::Span;
|
use logos::Span;
|
||||||
use source_span::{
|
use source_span::{
|
||||||
fmt::{Color, Formatter, Style},
|
fmt::{Formatter, Style},
|
||||||
DefaultMetrics, Position, SourceBuffer, Span as SourceSpan,
|
DefaultMetrics, Position, SourceBuffer, Span as SourceSpan,
|
||||||
};
|
};
|
||||||
use std::error::Error;
|
use std::error::Error;
|
||||||
|
|
@ -113,7 +113,7 @@ impl<'source> Display for SourceSpannedError<'source> {
|
||||||
let end = get_position(self.source, span.end);
|
let end = get_position(self.source, span.end);
|
||||||
let span = SourceSpan::new(start, end, end.next_line());
|
let span = SourceSpan::new(start, end, end.next_line());
|
||||||
|
|
||||||
let mut fmt = Formatter::with_margin_color(Color::Blue);
|
let mut fmt = Formatter::new();
|
||||||
let buffer = SourceBuffer::new(
|
let buffer = SourceBuffer::new(
|
||||||
self.source.chars().map(|char| Result::<char, ()>::Ok(char)),
|
self.source.chars().map(|char| Result::<char, ()>::Ok(char)),
|
||||||
Position::default(),
|
Position::default(),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue