blob: 6c3c8b9d9c697a1f308f9f57d1a2cb767c72c336 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#pragma once
#include "defs.h"
#include "utils.h"
DECLARE_VEC(Chunk, ChunkVec)
DECLARE_VEC(Token, TokenVec)
typedef struct {
RegionVec regions;
TokenVec tokens;
ChunkVec chunks;
} PreprocArena;
typedef struct {
TokenVec top_tokens;
RegionVec reg_arena;
} LexResult;
TokenPtrVec lex(char* input, PreprocArena* arena);
|