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

Method parse_literal_string

src/sql-parser/src/parser.rs:6991–6996  ·  view source on GitHub ↗

Parse a literal string

(&mut self)

Source from the content-addressed store, hash-verified

6989
6990 /// Parse a literal string
6991 fn parse_literal_string(&mut self) -> Result<String, ParserError> {
6992 match self.next_token() {
6993 Some(Token::String(ref s)) => Ok(s.clone()),
6994 other => self.expected(self.peek_prev_pos(), "literal string", other),
6995 }
6996 }
6997
6998 /// Parse a SQL datatype (in the context of a CREATE TABLE statement for example)
6999 fn parse_data_type(&mut self) -> Result<RawDataType, ParserError> {

Calls 4

next_tokenMethod · 0.80
expectedMethod · 0.80
peek_prev_posMethod · 0.80
cloneMethod · 0.45

Tested by

no test coverage detected