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

Method scan_triple_string

compiler/src/modules/lexer/scan.rs:176–188  ·  view source on GitHub ↗
(&mut self, quote: u8, start: usize)

Source from the content-addressed store, hash-verified

174 }
175
176 fn scan_triple_string(&mut self, quote: u8, start: usize) {
177 while self.pos < self.src.len() {
178 let b = self.src[self.pos];
179 if b == quote && self.at(1) == Some(quote) && self.at(2) == Some(quote) {
180 self.pos += 3; return;
181 }
182 if b == b'\\' && self.at(1).is_some() { self.pos += 1; }
183 if b == b'\n' { self.line += 1; }
184 self.pos += 1;
185 }
186 // EOF inside triple-quoted string.
187 self.report(start, start + 3, "unterminated triple-quoted string literal");
188 }
189
190 // F-strings: emits Start/Middle/End and suspends at `{`.
191

Callers 1

scan_stringMethod · 0.80

Calls 3

reportMethod · 0.80
lenMethod · 0.45
atMethod · 0.45

Tested by

no test coverage detected