making tcc happier

This commit is contained in:
2024-12-27 12:34:08 +02:00
parent 6ae7d7320d
commit 6006a802e1
10 changed files with 416 additions and 274 deletions

View File

@@ -3,16 +3,10 @@
#define _ZIG1_PARSE_H__
#include "ast.h"
#include "common.h"
#include <stdbool.h>
#include <stdint.h>
// Standard slice
typedef struct {
uint32_t len;
uint32_t cap;
AstNodeIndex* arr;
} ParserNodeIndexSlice;
typedef struct {
uint32_t len;
AstNodeIndex lhs;
@@ -20,7 +14,7 @@ typedef struct {
bool trailing;
} Members;
typedef struct Parser {
typedef struct {
const char* source;
uint32_t source_len;
@@ -31,8 +25,8 @@ typedef struct Parser {
AstTokenIndex tok_i;
AstNodeList nodes;
ParserNodeIndexSlice extra_data;
ParserNodeIndexSlice scratch;
AstNodeIndexSlice extra_data;
AstNodeIndexSlice scratch;
} Parser;
Parser* parserInit(const char* source, uint32_t len);