mirror of
https://github.com/Ed94/metadesk.git
synced 2026-08-04 22:58:44 +00:00
[examples] filling in notes in the parse_check.c example; upgrading the datadesk_like_template a bit
This commit is contained in:
-13
@@ -2903,19 +2903,6 @@ MD_PrintMessageFmt(FILE *file, MD_CodeLoc code_loc, MD_MessageKind kind, char *f
|
||||
MD_ReleaseScratch(scratch);
|
||||
}
|
||||
|
||||
MD_FUNCTION void
|
||||
MD_PrintNodeMessageFmt(FILE *file, MD_Node *node, MD_MessageKind kind, char *fmt, ...){
|
||||
MD_ArenaTemp scratch = MD_GetScratch(0, 0);
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
MD_String8 string = MD_S8FmtV(scratch.arena, fmt, args);
|
||||
va_end(args);
|
||||
MD_CodeLoc code_loc = MD_CodeLocFromNode(node);
|
||||
MD_String8 message = MD_FormatMessage(scratch.arena, code_loc, kind, string);
|
||||
fwrite(message.str, message.size, 1, file);
|
||||
MD_ReleaseScratch(scratch);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
//~ Tree Comparison/Verification
|
||||
|
||||
+2
-2
@@ -2,6 +2,8 @@
|
||||
|
||||
//~ Metadesk Library
|
||||
|
||||
// TODO(allen): Welcome & user directory comment here
|
||||
|
||||
#ifndef MD_H
|
||||
#define MD_H
|
||||
|
||||
@@ -1117,8 +1119,6 @@ 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, ...);
|
||||
MD_FUNCTION void MD_PrintNodeMessageFmt(FILE *file, MD_Node *node, MD_MessageKind kind,
|
||||
char *fmt, ...);
|
||||
#endif
|
||||
|
||||
//~ Tree Comparison/Verification
|
||||
|
||||
Reference in New Issue
Block a user