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

Method next

src/testdrive/src/parser.rs:658–673  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

656 type Item = (usize, String);
657
658 fn next(&mut self) -> Option<Self::Item> {
659 let item = if let Some(next) = self.next.take() {
660 next
661 } else {
662 self.read_one()
663 };
664 if item.is_some() {
665 // Sync `consumed_raw_pos` with `raw_pos` only when the line is
666 // actually returned to an external caller. `peek()` advances
667 // `raw_pos` via `read_one()` without consuming, so updating
668 // `consumed_raw_pos` here keeps it pointing at the end of the most
669 // recently consumed line — even if a later line has been peeked.
670 self.consumed_raw_pos = self.raw_pos;
671 }
672 item
673 }
674}
675
676fn is_sigil(c: Option<char>) -> bool {

Callers 15

pkcs12der_from_pemFunction · 0.45
runMethod · 0.45
updateMethod · 0.45
parseFunction · 0.45
parse_builtinFunction · 0.45
parse_version_constraintFunction · 0.45
parse_sqlFunction · 0.45
parse_explain_sqlFunction · 0.45
parse_fail_sqlFunction · 0.45
slurp_oneFunction · 0.45
read_oneMethod · 0.45
doneMethod · 0.45

Calls 9

read_oneMethod · 0.80
is_someMethod · 0.80
lastMethod · 0.80
takeMethod · 0.45
is_emptyMethod · 0.45
peekMethod · 0.45
pushMethod · 0.45
popMethod · 0.45
lenMethod · 0.45

Tested by 4

mainFunction · 0.36
parse_kafka_optFunction · 0.36
test_string_literalsFunction · 0.36
run_multiview_testcaseFunction · 0.36