1
0

update codegen. add python code gen

This commit is contained in:
2023-10-10 10:39:27 +08:00
parent d003b28b2e
commit 0071e001fd
7 changed files with 226 additions and 73 deletions

View File

@ -4,8 +4,9 @@ import java.io.OutputStreamWriter;
* The nameof values writer for CKERROR
*/
public class ErrorsWriter {
public static void writeAccVals(OutputStreamWriter writer, EnumsHelper.Enum_t errors) throws Exception {
IndentHelper indent = new IndentHelper(writer);
public static void writeAccVal(String filename, EnumsHelper.Enum_t errors) throws Exception {
OutputStreamWriter writer = CommonHelper.openOutputFile(filename);
IndentHelper indent = new IndentHelper(writer, CommonHelper.LangType.CPP);
indent.puts("const CkErrorReflectionArray CKERROR {");
indent.inc();
@ -20,5 +21,6 @@ public class ErrorsWriter {
indent.dec();
indent.puts("};");
writer.close();
}
}