linters, some ast headers

This commit is contained in:
2024-12-18 22:34:22 +02:00
parent c2915d2eaa
commit 7361b6058d
8 changed files with 184 additions and 48 deletions

30
parse.h Normal file
View File

@@ -0,0 +1,30 @@
#ifndef _ZIG1_PARSE_H__
#define _ZIG1_PARSE_H__
#include <stdbool.h>
#include <stdint.h>
#include "ast.h"
typedef struct {
uint32_t len;
uint32_t cap;
ast_node_index* arr;
} parser_node_index_slice;
typedef struct {
const char* source;
const uint32_t source_len;
tokenizer_tag* token_tags;
ast_index* token_starts;
uint32_t tokens_len;
ast_token_index tok_i;
ast_node_list nodes;
parser_node_index_slice extra_data;
parser_node_index_slice scratch;
} parser;
#endif