Ink: Change how many nodes we reserve in parser.

This commit is contained in:
2025-09-30 07:39:34 +02:00
parent 344d6b2d31
commit a4b5a7677b

View File

@@ -1475,7 +1475,7 @@ parse :: (ctx : *Compiler_Context, allocator := temp) {
defer clear_context_allocators();
parse_state : Parser;
array_reserve(*ctx.nodes, 4096);
array_reserve(*ctx.nodes, 128); //@Note(niels): This is quite a random number to be honest
parse_state.current_token_index = 0;
parse_state.ctx = ctx;
@@ -1483,7 +1483,6 @@ parse :: (ctx : *Compiler_Context, allocator := temp) {
if !match(*parse_state, .TOKEN_EOF) {
parse_state.ctx.root = make_node(*parse_state, .Program);
array_reserve(*parse_state.ctx.root.children, 1024);
program := parse_state.ctx.root;
while !check(*parse_state, .TOKEN_EOF) {