aboutsummaryrefslogtreecommitdiff
path: root/src/parser/ast.h
blob: 7079305629eeb8f3e4a2e13bcb8f43590bd51ae2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#pragma once

#include <stddef.h>

#include "lexer/lexer.h"

struct ConstDecl
{
	struct Token name;
	struct Token value;
};

struct Program
{
	struct ConstDecl* consts;
	size_t const_count;
	size_t const_capacity;
};

struct Program create_program(void);
void free_program(struct Program* program);
void add_const(struct Program* program, struct ConstDecl decl);