MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / consume_identifier

Method consume_identifier

src/sql-parser/src/parser.rs:7374–7386  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

7372 }
7373
7374 fn consume_identifier(&mut self) -> Result<Option<Ident>, ParserError> {
7375 match self.peek_token() {
7376 Some(Token::Keyword(kw)) => {
7377 self.next_token();
7378 Ok(Some(kw.into()))
7379 }
7380 Some(Token::Ident(id)) => {
7381 self.next_token();
7382 Ok(Some(self.new_identifier(id)?))
7383 }
7384 _ => Ok(None),
7385 }
7386 }
7387
7388 fn parse_qualified_identifier(&mut self, id: Ident) -> Result<Expr<Raw>, ParserError> {
7389 let mut id_parts = vec![id];

Callers 3

parse_columnsMethod · 0.80
parse_identifierMethod · 0.80

Calls 3

peek_tokenMethod · 0.80
next_tokenMethod · 0.80
new_identifierMethod · 0.80

Tested by

no test coverage detected