MCPcopy Index your code
hub / github.com/python/cpython / _emit_stmt

Method _emit_stmt

Tools/cases_generator/generators_common.py:531–542  ·  view source on GitHub ↗
(
        self,
        stmt: Stmt,
        uop: CodeSection,
        storage: Storage,
        inst: Instruction | None,
    )

Source from the content-addressed store, hash-verified

529 self.out.start_line()
530
531 def _emit_stmt(
532 self,
533 stmt: Stmt,
534 uop: CodeSection,
535 storage: Storage,
536 inst: Instruction | None,
537 ) -> tuple[bool, Token | None, Storage]:
538 method_name = "emit_" + stmt.__class__.__name__
539 method = getattr(self, method_name, None)
540 if method is None:
541 raise NotImplementedError
542 return method(stmt, uop, storage, inst) # type: ignore[no-any-return]
543
544 def emit_SimpleStmt(
545 self,

Callers 5

emit_MacroIfStmtMethod · 0.95
emit_IfStmtMethod · 0.95
emit_BlockStmtMethod · 0.95
emit_ForStmtMethod · 0.95
emit_WhileStmtMethod · 0.95

Calls 1

methodFunction · 0.85

Tested by

no test coverage detected