File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5210,12 +5210,9 @@ impl<'a> Parser<'a> {
52105210 // To check whether the first token is a name or a type, we need to
52115211 // peek the next token, which if it is another type keyword, then the
52125212 // first token is a name and not a type in itself.
5213- let potential_tokens = [Token::Eq, Token::RParen, Token::Comma];
5214- if !self.peek_keyword(Keyword::DEFAULT)
5215- && !potential_tokens.contains(&self.peek_token().token)
5216- {
5213+ if let Some(next_data_type) = self.maybe_parse(|parser| parser.parse_data_type())? {
52175214 name = Some(Ident::new(next_token.to_string()));
5218- data_type = self.parse_data_type()? ;
5215+ data_type = next_data_type ;
52195216 }
52205217
52215218 let default_expr = if self.parse_keyword(Keyword::DEFAULT) || self.consume_token(&Token::Eq)
You can’t perform that action at this time.
0 commit comments