update code gen
This commit is contained in:
parent
562b44c7aa
commit
279fa1eccb
|
@ -171,7 +171,7 @@ public class GeneralWriter {
|
|||
// write implements
|
||||
for (EnumsHelper.Enum_t enum_t : prog.mEnums) {
|
||||
// write enum desc header
|
||||
indent.printf("g_Annotation_%s: dict[int, AnnotationData] = {", enum_t.mEnumName);
|
||||
indent.printf("g_Annotation_%s: dict[int, EnumAnnotation] = {", enum_t.mEnumName);
|
||||
indent.inc();
|
||||
|
||||
// write enum desc entries
|
||||
|
@ -181,7 +181,7 @@ public class GeneralWriter {
|
|||
comment = CommonHelper.escapeString(enumEntry_t.mEntryComment);
|
||||
}
|
||||
|
||||
indent.printf("%s.%s.value: AnnotationData(\"%s\", \"%s\"),", enum_t.mEnumName, enumEntry_t.mEntryName,
|
||||
indent.printf("%s.%s.value: EnumAnnotation(\"%s\", \"%s\"),", enum_t.mEnumName, enumEntry_t.mEntryName,
|
||||
extractHumanReadableEntryName(enumEntry_t.mEntryName), comment);
|
||||
}
|
||||
|
||||
|
|
|
@ -35,7 +35,8 @@ def GetTmplOperOffset(sname: str, svars: tuple[str]) -> str:
|
|||
\t\t\t{sp.join(map(lambda x: f'case {x}: return {svars[x]};', range(len(svars))))}
|
||||
\t\t\tdefault: return {svars[0]};
|
||||
\t\t}}
|
||||
\t}}\tconst CKFLOAT& operator[](size_t i) const {{
|
||||
\t}}
|
||||
\tconst CKFLOAT& operator[](size_t i) const {{
|
||||
\t\tswitch (i) {{
|
||||
\t\t\t{sp.join(map(lambda x: f'case {x}: return {svars[x]};', range(len(svars))))}
|
||||
\t\t\tdefault: return {svars[0]};
|
||||
|
|
|
@ -36,7 +36,8 @@ namespace LibCmo::VxMath {
|
|||
case 1: return y;
|
||||
default: return x;
|
||||
}
|
||||
} const CKFLOAT& operator[](size_t i) const {
|
||||
}
|
||||
const CKFLOAT& operator[](size_t i) const {
|
||||
switch (i) {
|
||||
case 0: return x;
|
||||
case 1: return y;
|
||||
|
@ -120,7 +121,8 @@ namespace LibCmo::VxMath {
|
|||
case 2: return z;
|
||||
default: return x;
|
||||
}
|
||||
} const CKFLOAT& operator[](size_t i) const {
|
||||
}
|
||||
const CKFLOAT& operator[](size_t i) const {
|
||||
switch (i) {
|
||||
case 0: return x;
|
||||
case 1: return y;
|
||||
|
@ -211,7 +213,8 @@ namespace LibCmo::VxMath {
|
|||
case 3: return w;
|
||||
default: return x;
|
||||
}
|
||||
} const CKFLOAT& operator[](size_t i) const {
|
||||
}
|
||||
const CKFLOAT& operator[](size_t i) const {
|
||||
switch (i) {
|
||||
case 0: return x;
|
||||
case 1: return y;
|
||||
|
|
Loading…
Reference in New Issue
Block a user