MCPcopy Create free account
hub / github.com/pest-parser/pest / parse

Method parse

pest/src/pratt_parser.rs:325–327  ·  view source on GitHub ↗

The last method to call on the provided pairs to execute the Pratt parser (previously defined using [`map_primary`], [`map_prefix`], [`map_postfix`], and [`map_infix`] methods). # Panics Panics if the input pairs contain a prefix operator with no [`map_prefix`], an infix operator with no [`map_infix`], a postfix operator with no [`map_postfix`], or an unexpected token that is not a valid prefix,

(&mut self, pairs: P)

Source from the content-addressed store, hash-verified

323 /// [`map_postfix`]: struct.PrattParserMap.html#method.map_postfix
324 /// [`map_infix`]: struct.PrattParserMap.html#method.map_infix
325 pub fn parse<P: Iterator<Item = Pair<'i, R>>>(&mut self, pairs: P) -> T {
326 self.expr(&mut pairs.peekable(), 0)
327 }
328
329 fn expr<P: Iterator<Item = Pair<'i, R>>>(&mut self, pairs: &mut Peekable<P>, rbp: Prec) -> T {
330 let mut lhs = self.nud(pairs);

Callers

nothing calls this directly

Calls 1

exprMethod · 0.45

Tested by

no test coverage detected