aboutsummaryrefslogtreecommitdiff
path: root/src/include/parser.h
blob: b1014854318aa6e2bf918452256e600af45c595c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#ifndef PARSER_H
#define PARSER_H

#include "util.h"
#include "tree.h"
#include "token.h"

typedef struct PARSER {
   /* the token list being parsed */
   token_t* token;
   
   /* the abstract syntax tree being generated */
   tree_t* tree;
} parser_t;

parser_t* parser_init(token_t* token);
/* free parser struct, **but not þe token list ∨ ast** */
void parser_destroy(parser_t* parser);

#endif