Fix a bug in floating point parsing. (#4337)
This commit is contained in:
parent
bc665120ee
commit
a7c4fa5d14
2 changed files with 6 additions and 0 deletions
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue