adding arena (p1)

This commit is contained in:
Allen Webster committed 2021-07-20 21:30:22 -07:00
1 parent d937a99b51
commit 5e39bc8f2e
10 files changed
+35 -31

No files matched your search

+3 -1
View File
@@ -62,11 +62,13 @@ static void PrintNode(MD_Node* node, FILE* file, int indent_count) {
int main(int argument_count, char **arguments)
{
MD_Arena *arena = MD_ArenaNew(1ull << 40);
// NOTE(pmh): Parse all the files passed in via command line.
MD_Node *list = MD_MakeList();
for(int i = 1; i < argument_count; i += 1)
{
MD_Node *root = MD_ParseWholeFile(MD_S8CString(arguments[i])).node;
MD_Node *root = MD_ParseWholeFile(arena, MD_S8CString(arguments[i])).node;
MD_PushNewReference(list, root);
}