better span when missing expression

This commit is contained in:
Connor Skees 2022-12-29 00:21:17 -05:00
parent 39c992a2eb
commit e237fb1f6d

View File

@ -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()),
}
}