MCPcopy Index your code
hub / github.com/RustPython/RustPython / unparse_comp

Method unparse_comp

crates/codegen/src/unparse.rs:520–536  ·  view source on GitHub ↗
(&mut self, generators: &[ast::Comprehension])

Source from the content-addressed store, hash-verified

518 }
519
520 fn unparse_comp(&mut self, generators: &[ast::Comprehension]) -> fmt::Result {
521 for comp in generators {
522 self.p(if comp.is_async {
523 " async for "
524 } else {
525 " for "
526 })?;
527 self.unparse_expr(&comp.target, precedence::TUPLE)?;
528 self.p(" in ")?;
529 self.unparse_expr(&comp.iter, precedence::TEST + 1)?;
530 for cond in &comp.ifs {
531 self.p(" if ")?;
532 self.unparse_expr(cond, precedence::TEST + 1)?;
533 }
534 }
535 Ok(())
536 }
537
538 fn unparse_fstring_body(&mut self, elements: &[ast::InterpolatedStringElement]) -> fmt::Result {
539 for elem in elements {

Callers 1

unparse_exprMethod · 0.80

Calls 2

unparse_exprMethod · 0.80
pMethod · 0.45

Tested by

no test coverage detected