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

Method read_name

std/re/src/main/parser.rs:207–218  ·  view source on GitHub ↗
(&mut self, term: char)

Source from the content-addressed store, hash-verified

205 }
206
207 fn read_name(&mut self, term: char) -> Result<String, ParseError> {
208 let mut s = String::new();
209 while let Some(c) = self.peek() {
210 if c == term { break; }
211 s.push(c);
212 self.bump();
213 }
214 if self.peek() != Some(term) { return Err(self.err("missing group name terminator")); }
215 self.bump();
216 if s.is_empty() { return Err(self.err("missing group name")); }
217 Ok(s)
218 }
219
220 fn read_flags(&mut self) -> Result<(), ParseError> {
221 while let Some(c) = self.peek() {

Callers 1

groupMethod · 0.80

Calls 5

pushMethod · 0.80
bumpMethod · 0.80
peekMethod · 0.45
errMethod · 0.45
is_emptyMethod · 0.45

Tested by

no test coverage detected