Fix a bug in floating point parsing. ()

This commit is contained in:
Mees Delzenne 2024-07-11 21:36:51 +02:00 committed by GitHub
parent bc665120ee
commit a7c4fa5d14
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 0 deletions
core/src/syn/parser

View file

@ -9,6 +9,11 @@ use crate::{
syn::parser::{mac::test_parse, Parser},
};
#[test]
fn parse_coordinate() {
test_parse!(parse_value, "(1.88, -18.0)").unwrap();
}
#[test]
fn parse_large_depth_object() {
let mut text = String::new();

View file

@ -444,6 +444,7 @@ impl Parser<'_> {
let span = start.span.covers(digits_token.span);
unexpected!(@span, self,digits_token.kind, "a floating point number")
}
self.pop_peek();
}
TokenKind::Digits => {
self.pop_peek();