Add the ability to parse types.
This ability is not integrated with the rest of the parser - in fact, the grammar for things like function declarations (where type declarations are necessary) is not yet determined.
This commit is contained in:
@@ -14,7 +14,8 @@ libab_result libab_lexer_init(libab_lexer* lexer) {
|
||||
"if",
|
||||
"else",
|
||||
"while",
|
||||
"do"
|
||||
"do",
|
||||
"->"
|
||||
};
|
||||
libab_lexer_token tokens[] = {
|
||||
TOKEN_CHAR,
|
||||
@@ -23,7 +24,8 @@ libab_result libab_lexer_init(libab_lexer* lexer) {
|
||||
TOKEN_KW_IF,
|
||||
TOKEN_KW_ELSE,
|
||||
TOKEN_KW_WHILE,
|
||||
TOKEN_KW_DO
|
||||
TOKEN_KW_DO,
|
||||
TOKEN_KW_ARROW
|
||||
};
|
||||
const size_t count = sizeof(tokens)/sizeof(libab_lexer_token);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user