[examples] generate type info declarations; generate member tables

This commit is contained in:
Allen Webster
2021-09-25 19:26:06 -07:00
parent 35f7d3daf1
commit d383a3122f
5 changed files with 178 additions and 30 deletions
+5 -3
View File
@@ -80,8 +80,8 @@
# define MD_DEFAULT_SPRINTF 1
#endif
#if !defined(MD_ENABLE_PRINT_HELPERS)
# define MD_ENABLE_PRINT_HELPERS 0
#if !defined(MD_DISABLE_PRINT_HELPERS)
# define MD_DISABLE_PRINT_HELPERS 0
#endif
@@ -1119,12 +1119,14 @@ MD_FUNCTION MD_String8 MD_StringFromMessageKind(MD_MessageKind kind);
MD_FUNCTION MD_String8 MD_FormatMessage(MD_Arena *arena, MD_CodeLoc loc, MD_MessageKind kind,
MD_String8 string);
#if MD_ENABLE_PRINT_HELPERS
#if !MD_DISABLE_PRINT_HELPERS
#include <stdio.h>
MD_FUNCTION void MD_PrintMessage(FILE *file, MD_CodeLoc loc, MD_MessageKind kind,
MD_String8 string);
MD_FUNCTION void MD_PrintMessageFmt(FILE *file, MD_CodeLoc code_loc, MD_MessageKind kind,
char *fmt, ...);
#define MD_PrintGenNoteCComment(f) fprintf((f), "// generated by %s:%d\n", __FILE__, __LINE__)
#endif
//~ Tree Comparison/Verification