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

Method named_backref

std/re/src/main/parser.rs:199–205  ·  view source on GitHub ↗
(&mut self, name: &str)

Source from the content-addressed store, hash-verified

197 }
198
199 fn named_backref(&mut self, name: &str) -> Result<Node, ParseError> {
200 let idx = self.names.iter().find(|(n, _)| n == name).map(|(_, i)| *i);
201 match idx {
202 Some(i) => Ok(Node::Backref(i)),
203 None => Err(self.err("unknown group name")),
204 }
205 }
206
207 fn read_name(&mut self, term: char) -> Result<String, ParseError> {
208 let mut s = String::new();

Callers 1

groupMethod · 0.80

Calls 2

iterMethod · 0.45
errMethod · 0.45

Tested by

no test coverage detected