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

Method call_range

compiler/src/modules/parser/literals.rs:413–426  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

411 }
412
413 pub(super) fn call_range(&mut self) {
414 let call_pos = self.last_end as u32;
415 self.advance();
416 let mut argc = 0u16;
417 self.comma_list(|t| t == TokenType::Rpar, |s| {
418 // Allow `range(*args)`; UnpackArgs spreads the iterable at runtime.
419 if s.eat_if(TokenType::Star) { s.expr(); s.chunk.emit(OpCode::UnpackArgs, 1); }
420 else { s.expr(); }
421 argc = argc.saturating_add(1);
422 });
423 self.eat(TokenType::Rpar);
424 self.chunk.emit(OpCode::CallRange, argc);
425 self.chunk.record_call_pos(call_pos);
426 }
427
428 pub(super) fn parse_args(&mut self) -> (u16, u16) {
429 self.advance();

Callers 1

callMethod · 0.45

Calls 7

advanceMethod · 0.80
comma_listMethod · 0.80
eat_ifMethod · 0.80
exprMethod · 0.80
emitMethod · 0.80
eatMethod · 0.80
record_call_posMethod · 0.80

Tested by

no test coverage detected