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

Method eat_if

compiler/src/modules/parser/mod.rs:449–456  ·  view source on GitHub ↗
(&mut self, kind: TokenType)

Source from the content-addressed store, hash-verified

447 }
448
449 pub(super) fn eat_if(&mut self, kind: TokenType) -> bool {
450 if matches!(self.peek(), Some(k) if k == kind) {
451 self.advance();
452 true
453 } else {
454 false
455 }
456 }
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)) {

Callers 15

stmtMethod · 0.80
emit_name_listMethod · 0.80
compile_block_innerMethod · 0.80
name_stmtMethod · 0.80
parse_del_targetMethod · 0.80
emit_yieldMethod · 0.80
assignMethod · 0.80
brace_literalMethod · 0.80
list_literalMethod · 0.80
dict_tailMethod · 0.80
set_tailMethod · 0.80
list_tailMethod · 0.80

Calls 1

advanceMethod · 0.80

Tested by

no test coverage detected