lang: ast: re-factor parser into multiple files
This commit is contained in:
22
lang/ast/parse.c
Normal file
22
lang/ast/parse.c
Normal 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,
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user