use crate::rule::shape::{one_to_one, part_of};
use seesaw_tgg::rules::format::RuleFile;
const CATALOGUE_NAME: &str = "python";
#[must_use]
pub fn catalogue() -> RuleFile {
RuleFile {
format: 3,
name: CATALOGUE_NAME.to_string(),
rules: vec![
one_to_one(
"struct-to-dataclass",
"Structure",
"PythonStruct",
"PythonStructCorr",
),
part_of(
"member-to-field",
("Member", "Structure", "PythonStructCorr"),
("PythonField", "PythonStruct", "PythonFieldCorr"),
),
one_to_one(
"enum-to-intenum",
"Enumeration",
"PythonEnum",
"PythonEnumCorr",
),
part_of(
"enumerator-to-member",
("Enumerator", "Enumeration", "PythonEnumCorr"),
("PythonEnumerator", "PythonEnum", "PythonEnumeratorCorr"),
),
one_to_one(
"alias-to-comment",
"Alias",
"PythonAlias",
"PythonAliasCorr",
),
one_to_one(
"union-to-dataclass",
"Union",
"PythonUnion",
"PythonUnionCorr",
),
part_of(
"case-to-field",
("Case", "Union", "PythonUnionCorr"),
("PythonCase", "PythonUnion", "PythonCaseCorr"),
),
one_to_one(
"bitmask-to-intflag",
"Bitmask",
"PythonBitmask",
"PythonBitmaskCorr",
),
part_of(
"bit-to-member",
("BitValue", "Bitmask", "PythonBitmaskCorr"),
("PythonBitConst", "PythonBitmask", "PythonBitCorr"),
),
one_to_one(
"bitset-to-dataclass",
"Bitset",
"PythonBitset",
"PythonBitsetCorr",
),
one_to_one(
"valuetype-to-dataclass",
"Valuetype",
"PythonValue",
"PythonValueCorr",
),
one_to_one(
"module-to-class",
"Module",
"PythonModule",
"PythonModuleCorr",
),
one_to_one("const-to-final", "Const", "PythonConst", "PythonConstCorr"),
one_to_one(
"exception-to-dataclass",
"Exception",
"PythonError",
"PythonErrorCorr",
),
one_to_one(
"interface-to-protocol",
"Interface",
"PythonInterface",
"PythonInterfaceCorr",
),
one_to_one(
"native-to-comment",
"Native",
"PythonNative",
"PythonNativeCorr",
),
],
}
}