update codegen

This commit is contained in:
yyc12345 2023-10-12 20:52:22 +08:00
parent 09fd67fb5e
commit e4a67a50a5

View File

@ -171,7 +171,7 @@ public class GeneralWriter {
// write implements // write implements
for (EnumsHelper.Enum_t enum_t : prog.mEnums) { for (EnumsHelper.Enum_t enum_t : prog.mEnums) {
// write enum desc header // write enum desc header
indent.printf("g_Annotation_%s: dict[int, tuple[str, str]] = {", enum_t.mEnumName); indent.printf("g_Annotation_%s: dict[int, AnnotationData] = {", enum_t.mEnumName);
indent.inc(); indent.inc();
// write enum desc entries // write enum desc entries
@ -181,7 +181,7 @@ public class GeneralWriter {
comment = CommonHelper.escapeString(enumEntry_t.mEntryComment); comment = CommonHelper.escapeString(enumEntry_t.mEntryComment);
} }
indent.printf("%s.%s.value: (\"%s\", \"%s\", ),", enum_t.mEnumName, enumEntry_t.mEntryName, indent.printf("%s.%s.value: AnnotationData(\"%s\", \"%s\"),", enum_t.mEnumName, enumEntry_t.mEntryName,
extractHumanReadableEntryName(enumEntry_t.mEntryName), comment); extractHumanReadableEntryName(enumEntry_t.mEntryName), comment);
} }