(mod: ModuleIR)
| 1137 | |
| 1138 | |
| 1139 | def render_module(mod: ModuleIR) -> str: |
| 1140 | blocks: list[str] = [_HEADER, "\n".join(_imports(mod))] |
| 1141 | for e in mod.enums: |
| 1142 | blocks.append(_emit_enum(e)) |
| 1143 | for r in mod.records: |
| 1144 | blocks.append(_emit_record(r)) |
| 1145 | for u in mod.unions: |
| 1146 | blocks.append(_emit_union(u)) |
| 1147 | blocks.append(_emit_domain_class(mod)) |
| 1148 | return "\n\n\n".join(blocks) + "\n" |
| 1149 | |
| 1150 | |
| 1151 | def exception_class_name(code: str) -> str: |
no test coverage detected