minor declr parser
This commit is contained in:
@@ -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;
|
||||
Reference in New Issue
Block a user