Skip to content

generators

Lower the initial IRx generator MVP as factory functions plus internal resume state machines consumed through the iterable lowering path.

Classes:

GeneratorVisitorMixin

Bases: VisitorMixinBase

Methods:

visit

visit(node: GeneratorExpr) -> None
Source code in packages/irx/src/irx/builder/lowering/generators.py
836
837
838
839
840
841
842
843
844
845
846
847
848
@VisitorCore.visit.dispatch
def visit(self, node: astx.GeneratorExpr) -> None:
    """
    title: Visit GeneratorExpr nodes.
    parameters:
      node:
        type: astx.GeneratorExpr
    """
    raise_lowering_error(
        "generator expression lowering is not supported yet",
        node=node,
        code=DiagnosticCodes.LOWERING_INVALID_CONTROL_FLOW,
    )