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

Method comma_list

compiler/src/modules/parser/mod.rs:459–466  ·  view source on GitHub ↗

Comma list with forward-progress guard.

(&mut self, is_end: impl Fn(TokenType) -> bool, mut elem: impl FnMut(&mut Self))

Source from the content-addressed store, hash-verified

457
458 // Comma list with forward-progress guard.
459 pub(super) fn comma_list(&mut self, is_end: impl Fn(TokenType) -> bool, mut elem: impl FnMut(&mut Self)) {
460 while !matches!(self.peek(), Some(t) if is_end(t)) && self.peek().is_some() {
461 let progress = self.last_end;
462 elem(self);
463 self.eat_if(TokenType::Comma);
464 if self.last_end == progress { break; }
465 }
466 }
467}
468
469// Parser constructors and parse entry point.

Callers 2

call_rangeMethod · 0.80
parse_argsMethod · 0.80

Calls 2

eat_ifMethod · 0.80
peekMethod · 0.45

Tested by

no test coverage detected