blob: 10e8b6b53c02f2582945527e27591a9ac633b73b (
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
|
#include "parse.h"
#include "lexer.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
sym_t parse(tokenSet_t tokens, int* seek) {
token_t token = tokens.tokens[(*seek)++];
if (token.type == ERR || token.type == EOL) {
exit(1);
}
else if (token.type == NAME) {
return parse_name(seek);
}
}
sym_t parse_name(tokenSet_t tokens, int* seek) {
token_t token = tokens.tokens[(*seek)++];
if (token.type == KEYWORD) {
if (keyword_is_type(token.value)) {
}
}
}
sym_t parse_definition(tokenSet_t tokens, int* seek,
|