Skip to content

Dialect

FromPythonAST dataclass

FromPythonAST()

Bases: ABC

callee_table class-attribute

callee_table: dict[object, Transform]

a table of lowering transforms for ast.Call based on the callable object if avaiable as a global value.

lower

lower(state: State[ast.AST], node: ast.AST) -> Result

Entry point of dialect specific lowering.

Source code in src/kirin/lowering/python/dialect.py
69
70
71
72
73
def lower(self, state: State[ast.AST], node: ast.AST) -> Result:
    """Entry point of dialect specific lowering."""
    return getattr(self, f"lower_{node.__class__.__name__}", self.unreachable)(
        state, node
    )