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

Method expect

std/re/src/main/parser.rs:41–44  ·  view source on GitHub ↗
(&mut self, c: char)

Source from the content-addressed store, hash-verified

39 fn err(&self, msg: &'static str) -> ParseError { ParseError { msg, pos: self.pos } }
40
41 fn expect(&mut self, c: char) -> Result<(), ParseError> {
42 if self.peek() == Some(c) { self.bump(); Ok(()) }
43 else { Err(self.err("missing closing parenthesis")) }
44 }
45
46 /* Lowest precedence, branches split on the pipe. */
47 fn alternation(&mut self) -> Result<Node, ParseError> {

Callers 4

plugin_methodsFunction · 0.45
groupMethod · 0.45
lookMethod · 0.45
named_groupMethod · 0.45

Calls 3

bumpMethod · 0.80
peekMethod · 0.45
errMethod · 0.45

Tested by

no test coverage detected