mirror of
https://github.com/Ed94/metadesk.git
synced 2026-08-04 06:38:45 +00:00
thread context scratch system; converge on transition idiom in sample code
This commit is contained in:
@@ -1,9 +1,14 @@
|
||||
#include "md.h"
|
||||
#include "md.c"
|
||||
|
||||
static MD_Arena *arena = 0;
|
||||
|
||||
int main(void)
|
||||
{
|
||||
MD_Arena *arena = MD_ArenaNew(1ull << 40);
|
||||
MD_ThreadContext tctx;
|
||||
MD_ThreadInit(&tctx);
|
||||
|
||||
arena = MD_ArenaNew(1ull << 40);
|
||||
|
||||
printf("%d\n", MD_CPP_VERSION);
|
||||
|
||||
|
||||
@@ -120,6 +120,9 @@ TokenMatch(MD_Token token, MD_String8 string, MD_TokenKind kind)
|
||||
|
||||
int main(void)
|
||||
{
|
||||
MD_ThreadContext tctx;
|
||||
MD_ThreadInit(&tctx);
|
||||
|
||||
arena = MD_ArenaNew(1ull << 40);
|
||||
|
||||
Test("Lexer")
|
||||
|
||||
@@ -16,6 +16,9 @@ void run_test_on_string(MD_String8 string)
|
||||
|
||||
int main(void)
|
||||
{
|
||||
MD_ThreadContext tctx;
|
||||
MD_ThreadInit(&tctx);
|
||||
|
||||
arena = MD_ArenaNew(1ull << 40);
|
||||
|
||||
// TODO(allen): throw more at this.
|
||||
|
||||
Reference in New Issue
Block a user