mirror of
https://github.com/Ed94/metadesk.git
synced 2026-08-03 22:28:44 +00:00
tidying up naming scheme and parameters in helper inspection API; [examples] sketch of type metadata example
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user