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

Function lex_to_adjacent_string

src/sql-lexer/src/lexer.rs:338–344  ·  view source on GitHub ↗
(buf: &mut LexBuf)

Source from the content-addressed store, hash-verified

336}
337
338fn lex_to_adjacent_string(buf: &mut LexBuf) -> bool {
339 // Adjacent string literals that are separated by whitespace are
340 // concatenated if and only if that whitespace contains at least one newline
341 // character. This bizarre rule matches PostgreSQL and the SQL standard.
342 let whitespace = buf.take_while(|ch| ch.is_ascii_whitespace());
343 whitespace.contains(&['\n', '\r'][..]) && buf.consume('\'')
344}
345
346fn lex_dollar_string(buf: &mut LexBuf) -> Result<Token, LexerError> {
347 let pos = buf.pos() - 1;

Callers 2

lex_stringFunction · 0.85
lex_extended_stringFunction · 0.85

Calls 3

take_whileMethod · 0.80
containsMethod · 0.45
consumeMethod · 0.45

Tested by

no test coverage detected