summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/main.c b/main.c
index a3fb4ec..923fa68 100644
--- a/main.c
+++ b/main.c
@@ -21,11 +21,16 @@ int main() {
.chunks = make_ChunkVec(256),
.regions = make_RegionVec(256),
};
- TokenPtrVec line_toks = lex(line, &arena);
- /*
- Pipeline pl = parse_tokstream(res.top_tokens);
+ TokenPtrVec line_tok_ptrs = lex(line, &arena);
+ Token* tokstream = malloc(sizeof(Token) * line_tok_ptrs.count);
+ for (int i = 0; i < line_tok_ptrs.count; i++) {
+ tokstream[i] = **get_from_TokenPtrVec(&line_tok_ptrs, i);
+ }
+ Pipeline pl = parse_tokstream(tokstream);
+ /*
run_pipeline(pl, &shstate);
*/
+ free(tokstream);
}
free(line);
}