One canonicalisation's import + export emitters. Looked up by canon name from `codegen_rules.json[canonicalizations]`. The importer takes (canon_def, element_name) and returns C++ text; the exporter takes (canon_def) and returns C++ text.
| 1034 | |
| 1035 | @dataclass(frozen=True) |
| 1036 | class Canonicalisation: |
| 1037 | """One canonicalisation's import + export emitters. Looked up by |
| 1038 | canon name from `codegen_rules.json[canonicalizations]`. The |
| 1039 | importer takes (canon_def, element_name) and returns C++ text; |
| 1040 | the exporter takes (canon_def) and returns C++ text.""" |
| 1041 | name: str |
| 1042 | import_emitter: Callable[[Dict[str, Any], str], str] |
| 1043 | export_emitter: Callable[[Dict[str, Any]], str] |
| 1044 | |
| 1045 | |
| 1046 | _CANONICALISATIONS: Dict[str, Canonicalisation] = { |
no outgoing calls
no test coverage detected