mirror of
https://github.com/Ed94/metadesk.git
synced 2026-06-23 04:04:59 -07:00
copy over docs from the wrong repo; take out error/warning wrappers
This commit is contained in:
+1093
File diff suppressed because it is too large
Load Diff
@@ -19,7 +19,7 @@ int main(int argument_count, char **arguments)
|
||||
{
|
||||
for(MD_EachNode(node, root->first_child))
|
||||
{
|
||||
MD_NodeErrorF(node, "This node has an error!");
|
||||
MD_NodeMessageF(node, MD_MessageKind_Error, "This node has an error!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-3
@@ -375,7 +375,7 @@ struct MD_CodeLoc
|
||||
int column;
|
||||
};
|
||||
|
||||
//~ Warning Levels
|
||||
//~ Message Levels
|
||||
|
||||
typedef enum MD_MessageKind
|
||||
{
|
||||
@@ -749,8 +749,6 @@ MD_FUNCTION void MD_NodeError(MD_Node *node, MD_String8 str);
|
||||
MD_FUNCTION void MD_NodeWarning(MD_Node *node, MD_String8 str);
|
||||
MD_FUNCTION void MD_NodeMessageF(MD_Node *node, MD_MessageKind kind, char *fmt, ...);
|
||||
MD_FUNCTION void MD_NodeErrorF(MD_Node *node, char *fmt, ...);
|
||||
MD_FUNCTION void MD_NodeWarningF(MD_Node *node, char *fmt, ...);
|
||||
MD_FUNCTION void MD_OutputError(FILE *f, MD_Error *error);
|
||||
|
||||
//~ Tree Comparison/Verification
|
||||
MD_FUNCTION MD_b32 MD_NodeMatch(MD_Node *a, MD_Node *b, MD_StringMatchFlags str_flags, MD_NodeMatchFlags node_flags);
|
||||
|
||||
+2
-22
@@ -266,7 +266,7 @@ MD_FindLastSubstring(MD_String8 str, MD_String8 substring, MD_StringMatchFlags f
|
||||
}
|
||||
|
||||
MD_FUNCTION_IMPL MD_String8
|
||||
MD_TrimExtension(MD_String8 string)
|
||||
MD_ChopExtension(MD_String8 string)
|
||||
{
|
||||
MD_u64 period_pos = MD_FindLastSubstring(string, MD_S8Lit("."), 0);
|
||||
if(period_pos < string.size)
|
||||
@@ -277,7 +277,7 @@ MD_TrimExtension(MD_String8 string)
|
||||
}
|
||||
|
||||
MD_FUNCTION_IMPL MD_String8
|
||||
MD_TrimFolder(MD_String8 string)
|
||||
MD_SkipFolder(MD_String8 string)
|
||||
{
|
||||
MD_u64 slash_pos = MD_FindLastSubstring(string, MD_S8Lit("/"), MD_StringMatchFlag_SlashInsensitive);
|
||||
if(slash_pos < string.size)
|
||||
@@ -2341,26 +2341,6 @@ MD_NodeErrorF(MD_Node *node, char *fmt, ...)
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
MD_FUNCTION_IMPL void
|
||||
MD_NodeWarningF(MD_Node *node, char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
MD_NodeWarning(node, MD_PushStringFV(fmt, args));
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
MD_FUNCTION_IMPL void
|
||||
MD_OutputError(FILE *f, MD_Error *error)
|
||||
{
|
||||
const char *kind_name = "error";
|
||||
fprintf(stderr, "%.*s:%i:%i: %s: %.*s\n",
|
||||
MD_StringExpand(error->location.filename),
|
||||
error->location.line, error->location.column,
|
||||
kind_name,
|
||||
MD_StringExpand(error->string));
|
||||
}
|
||||
|
||||
MD_GLOBAL MD_Expr _md_nil_expr =
|
||||
{
|
||||
&_md_nil_node,
|
||||
|
||||
Reference in New Issue
Block a user