diff --git a/src/parser/error.rs b/src/parser/error.rs index 57c669d..8a9771c 100644 --- a/src/parser/error.rs +++ b/src/parser/error.rs @@ -1,9 +1,5 @@ -use std::fmt::Debug; -use std::ops::Deref; - use super::{IErr, Span}; use ariadne::{Label, Report, ReportKind}; -use nom::error::ErrorKind; use nom_greedyerror::{GreedyErrorKind, Position}; fn span_to_range(input: Span) -> std::ops::Range { @@ -19,7 +15,8 @@ pub fn convert_error(input: Span, e: IErr) -> Report { } GreedyErrorKind::Char(c) => Label::new(err.0.position()..err.0.position()) .with_message(format!("expected {c:?}")), - GreedyErrorKind::Nom(_) => todo!(), + GreedyErrorKind::Nom(kind) => Label::new(err.0.position()..err.0.position()) + .with_message(format!("nom error {kind:?}")), }; labels.push(label); }