blob: 144e88ce8c666721e3c0a174bcf5252269fb11db (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#include "lexer.h"
#ifndef PARSE
#define PARSE
typedef enum PrimitiveType {
VOID,
INT,
FLOAT,
STRING
} primitive_t;
typedef enum AbstractType {
FUNCTION,
ARRAY
} abstract_t;
typedef struct Type {
primitive_t primitive;
abstract_t abstract;
struct Type* referent;
} type_t;
typedef struct Symbol {
type_t type;
void* name;
struct Symbol* args;
} sym_t;
sym_t parse(tokenSet_t tokens)
#endif
|