diff options
Diffstat (limited to 'src/parse.c')
-rw-r--r-- | src/parse.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/parse.c b/src/parse.c new file mode 100644 index 0000000..10e8b6b --- /dev/null +++ b/src/parse.c @@ -0,0 +1,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, |