MCPcopy Create free account
hub / github.com/dylan-sutton-chavez/edge-python / scan_while

Method scan_while

compiler/src/modules/lexer/scan.rs:42–46  ·  view source on GitHub ↗
(&mut self, pred: impl Fn(u8) -> bool)

Source from the content-addressed store, hash-verified

40 /* All inner scan loops use BYTE_CLASS indexed loads, zero branches per byte. */
41 #[inline]
42 fn scan_while(&mut self, pred: impl Fn(u8) -> bool) {
43 while self.pos < self.src.len() && pred(self.src[self.pos]) {
44 self.pos += 1;
45 }
46 }
47
48 pub fn skip_whitespace(&mut self) {
49 loop {

Callers 6

skip_whitespaceMethod · 0.80
scan_id_restMethod · 0.80
scan_digitsMethod · 0.80
scan_hex_digitsMethod · 0.80
scan_oct_digitsMethod · 0.80
scan_bin_digitsMethod · 0.80

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected