lang: ast: re-factor parser into multiple files

This commit is contained in:
2024-11-24 11:10:42 +00:00
parent a25683ddc9
commit f1ea916155
12 changed files with 423 additions and 276 deletions

22
lang/ast/parse.c Normal file
View File

@@ -0,0 +1,22 @@
#include "parse.h"
#include <ivy/lang/ast.h>
#include <ivy/lang/lex.h>
static token_parse_function token_parsers[IVY_AST_TYPE_COUNT][IVY_TOK_TYPE_COUNT] = {
[IVY_AST_UNIT] = {
[IVY_TOK_KEYWORD] = NULL,
},
};
static token_parse_function keyword_parsers[IVY_AST_TYPE_COUNT][IVY_KW_TYPE_COUNT] = {
[IVY_AST_UNIT] = {
[IVY_KW_PACKAGE] = NULL,
},
};
static token_parse_function symbol_parsers[IVY_AST_TYPE_COUNT][IVY_SYM_TYPE_COUNT] = {
[IVY_AST_UNIT] = {
[IVY_SYM_NONE] = NULL,
},
};