srdatalog.ir.mir.print

S-expression emitter for Python MIR, matching the output of src/srdatalog/mir/printer.nim byte-for-byte.

The canonical text form is what Racket will ingest as the final metalang, so S-expr is the target rather than JSON. Indentation uses two spaces per level, matching the Nim printer’s repeat("  ", indent) convention.

Every registered Nim MIR op kind now has a Python emitter case. For ops where Nim’s printer silently returns empty (no of branch — CreateFlatView, ProbeJoin, GatherColumn), the Python formats are new conventions; if byte-diff on those becomes necessary, add matching cases to src/srdatalog/mir/printer.nim first.

Module Contents

Functions

API

srdatalog.ir.mir.print.print_mir_sexpr(node: srdatalog.ir.mir.types.MirNode, indent: int = 0) str[source]