From e237fb1f6d6594157ba023342b84f524b8c25be1 Mon Sep 17 00:00:00 2001 From: Connor Skees Date: Thu, 29 Dec 2022 00:21:17 -0500 Subject: [PATCH] better span when missing expression --- src/parse/value.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/parse/value.rs b/src/parse/value.rs index 83c57d7..23dbafe 100644 --- a/src/parse/value.rs +++ b/src/parse/value.rs @@ -509,7 +509,11 @@ impl<'a, 'c, P: StylesheetParser<'a>> ValueParser<'a, 'c, P> { kind: '\u{80}'..=std::char::MAX, .. }) => self.parse_identifier_like(parser), - Some(..) | None => Err(("Expected expression.", parser.toks().current_span()).into()), + Some(..) | None => Err(( + "Expected expression.", + parser.toks_mut().span_from(self.start), + ) + .into()), } }