diff --git a/source/md_impl.c b/source/md_impl.c index 809ca9d..a6de8c1 100644 --- a/source/md_impl.c +++ b/source/md_impl.c @@ -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 diff --git a/tests/sanity_tests.c b/tests/sanity_tests.c index 64536a5..c800638 100644 --- a/tests/sanity_tests.c +++ b/tests/sanity_tests.c @@ -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