pre- and post- comment parsing for nodes

This commit is contained in:
ryanfleury
2021-02-09 08:50:06 -07:00
parent 47fe753411
commit ba6286f379
3 changed files with 102 additions and 8 deletions
+8
View File
@@ -399,5 +399,13 @@ int main(void)
TestResult(match);
}
Test("Node Comments")
{
MD_ParseResult parse = MD_ParseOneNode(MD_S8Lit(""), MD_S8Lit("/*foobar*/ (a b c)"));
fprintf(stderr, "\n\"%.*s\"\n", MD_StringExpand(parse.node->comment_before));
TestResult(parse.node->kind == MD_NodeKind_Label &&
MD_StringMatch(parse.node->comment_before, MD_S8Lit("foobar"), 0));
}
return 0;
}