mirror of
https://github.com/Ed94/metadesk.git
synced 2026-07-18 23:31:30 -07:00
bugfix; build dummy root node for error marker nodes, to ensure that they have an accurate way to tell their location
This commit is contained in:
@@ -1234,9 +1234,11 @@ MD_PushNodeErrorF(MD_ParseCtx *ctx, MD_Node *node, MD_MessageKind kind, char *fm
|
||||
|
||||
MD_FUNCTION void
|
||||
MD_PushTokenError(MD_ParseCtx *ctx, MD_Token token, MD_MessageKind kind, MD_String8 str){
|
||||
MD_Node *stub_file = MD_MakeNode(MD_NodeKind_ErrorMarker, ctx->file_contents, ctx->file_contents, ctx->file_contents.str);
|
||||
MD_Node *stub = _MD_MakeNode_Ctx(ctx, MD_NodeKind_ErrorMarker,
|
||||
token.string, token.outer_string, token.outer_string.str);
|
||||
MD_PushNodeError(ctx, stub, kind, str);
|
||||
MD_PushChild(stub_file, stub);
|
||||
}
|
||||
|
||||
MD_FUNCTION void
|
||||
|
||||
@@ -31,6 +31,13 @@ TestResult(MD_b32 result)
|
||||
test_ctx.number_of_tests += 1;
|
||||
test_ctx.number_passed += !!result;
|
||||
printf(result ? "." : "X");
|
||||
|
||||
#if 0
|
||||
if(result == 0)
|
||||
{
|
||||
__debugbreak();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
Reference in New Issue
Block a user