diff --git a/core/src/syn/parser/basic/uuid.rs b/core/src/syn/parser/basic/uuid.rs index 7f4976b0..9f4fffad 100644 --- a/core/src/syn/parser/basic/uuid.rs +++ b/core/src/syn/parser/basic/uuid.rs @@ -5,7 +5,7 @@ use crate::{ mac::{expected_whitespace, unexpected}, ParseError, ParseErrorKind, ParseResult, Parser, }, - token::{t, DurationSuffix, NumberSuffix, TokenKind}, + token::{t, DurationSuffix, NumberSuffix, TokenKind, VectorTypeKind}, }, }; @@ -92,7 +92,9 @@ impl Parser<'_> { | TokenKind::NumberSuffix(NumberSuffix::Float) => { cur = self.pop_peek(); } - TokenKind::Language(_) | TokenKind::Keyword(_) => { + TokenKind::Language(_) + | TokenKind::Keyword(_) + | TokenKind::VectorType(VectorTypeKind::F64 | VectorTypeKind::F32) => { // there are some keywords and languages keywords which could be part of the // hex section. if !self.span_bytes(next.span).iter().all(|x| x.is_ascii_hexdigit()) { @@ -166,6 +168,7 @@ mod test { assert_uuid_parses("d0531951-20ec-4575-bb68-3e6b49d813fa"); assert_uuid_parses("e0531951-20ec-4575-bb68-3e6b49d813fa"); assert_uuid_parses("a0531951-20ec-4575-bb68-3e6b49d813fa"); + assert_uuid_parses("b98839b9-0471-4dbb-aae0-14780e848f32"); } #[test] diff --git a/core/src/syn/parser/token.rs b/core/src/syn/parser/token.rs index 962a9ff3..664d8ada 100644 --- a/core/src/syn/parser/token.rs +++ b/core/src/syn/parser/token.rs @@ -87,6 +87,7 @@ impl Parser<'_> { TokenKind::Exponent | TokenKind::NumberSuffix(_) | TokenKind::DurationSuffix(_) + | TokenKind::VectorType(_) | TokenKind::DatetimeChars(_) => self.glue_ident(false), TokenKind::Digits => self.glue_numeric(), t!("\"") | t!("'") => { @@ -128,7 +129,7 @@ impl Parser<'_> { self.span_str(start.span).to_owned() } - TokenKind::DatetimeChars(_) => { + TokenKind::DatetimeChars(_) | TokenKind::VectorType(_) => { self.pop_peek(); self.span_str(start.span).to_owned() diff --git a/core/src/syn/token/mod.rs b/core/src/syn/token/mod.rs index b6d04e26..5680a453 100644 --- a/core/src/syn/token/mod.rs +++ b/core/src/syn/token/mod.rs @@ -456,6 +456,7 @@ impl TokenKind { | TokenKind::Language(_) | TokenKind::Algorithm(_) | TokenKind::DatetimeChars(_) + | TokenKind::VectorType(_) | TokenKind::Distance(_), ) }