minor declr parser

This commit is contained in:
2025-11-17 15:49:06 +09:00
parent 1e15ec36d2
commit 3682559a56
3 changed files with 92 additions and 2 deletions

View File

@@ -1,7 +1,10 @@
#pragma once
#include <stdint.h>
#include <stddef.h>
#include <stdint.h>
/**
* Token Definitions
*/
typedef enum {
LBRACK,
RBRACK,
@@ -33,7 +36,7 @@ typedef enum {
typedef struct {
size_t len;
char* string;
char *string;
} TokenString;
typedef struct {
@@ -42,3 +45,11 @@ typedef struct {
TokenString data;
} Token;
/**
* AST Node Definitions
*/
typedef struct ASTNode {
Token token;
struct ASTNode **children;
size_t child_count;
} ASTNode;