tidying up naming scheme and parameters in helper inspection API; [examples] sketch of type metadata example

This commit is contained in:
Allen Webster
2021-09-17 00:48:06 -07:00
parent fd191a3181
commit b6cbff2eb1
11 changed files with 269 additions and 42 deletions
+5 -5
View File
@@ -550,7 +550,7 @@ int main(void)
MD_ParseResult parse = MD_ParseOneNode(arena, MD_S8Lit("foo:{x y z; a b c}"), 0);
MD_Node *node = parse.node;
MD_Node *group_first = node->first_child;
MD_Node *group_opl = MD_NodeFromFlags(group_first->next, MD_NilNode(), MD_NodeFlag_IsAfterSemicolon);
MD_Node *group_opl = MD_FirstNodeWithFlags(group_first->next, MD_NodeFlag_IsAfterSemicolon);
TestResult(MD_S8Match(group_first->string, MD_S8Lit("x"), 0));
TestResult(MD_S8Match(group_first->next->string, MD_S8Lit("y"), 0));
@@ -558,7 +558,7 @@ int main(void)
TestResult(group_opl == group_first->next->next->next);
group_first = group_opl;
group_opl = MD_NodeFromFlags(group_first->next, MD_NilNode(), MD_NodeFlag_IsAfterSemicolon);
group_opl = MD_FirstNodeWithFlags(group_first->next, MD_NodeFlag_IsAfterSemicolon);
TestResult(MD_S8Match(group_first->string, MD_S8Lit("a"), 0));
TestResult(MD_S8Match(group_first->next->string, MD_S8Lit("b"), 0));
@@ -573,21 +573,21 @@ int main(void)
MD_Node *group_opl = 0;
group_first = node->first_child;
group_opl = MD_NodeFromFlags(group_first->next, MD_NilNode(), MD_NodeFlag_IsAfterComma);
group_opl = MD_FirstNodeWithFlags(group_first->next, MD_NodeFlag_IsAfterComma);
TestResult(MD_S8Match(group_first->string, MD_S8Lit("a"), 0));
TestResult(MD_S8Match(group_first->next->string, MD_S8Lit("b"), 0));
TestResult(MD_S8Match(group_first->next->next->string, MD_S8Lit("c"), 0));
TestResult(group_opl == group_first->next->next->next);
group_first = group_opl;
group_opl = MD_NodeFromFlags(group_first->next, MD_NilNode(), MD_NodeFlag_IsAfterComma);
group_opl = MD_FirstNodeWithFlags(group_first->next, MD_NodeFlag_IsAfterComma);
TestResult(MD_S8Match(group_first->string, MD_S8Lit("d"), 0));
TestResult(MD_S8Match(group_first->next->string, MD_S8Lit("e"), 0));
TestResult(MD_S8Match(group_first->next->next->string, MD_S8Lit("f"), 0));
TestResult(group_opl == group_first->next->next->next);
group_first = group_opl;
group_opl = MD_NodeFromFlags(group_first->next, MD_NilNode(), MD_NodeFlag_IsAfterComma);
group_opl = MD_FirstNodeWithFlags(group_first->next, MD_NodeFlag_IsAfterComma);
TestResult(MD_S8Match(group_first->string, MD_S8Lit("g"), 0));
TestResult(MD_S8Match(group_first->next->string, MD_S8Lit("h"), 0));
TestResult(MD_S8Match(group_first->next->next->string, MD_S8Lit("i"), 0));