Add support for the return keyword.
This commit is contained in:
@@ -16,7 +16,8 @@ libab_result libab_lexer_init(libab_lexer* lexer) {
|
||||
"while",
|
||||
"do",
|
||||
"->",
|
||||
"fun"
|
||||
"fun",
|
||||
"return"
|
||||
};
|
||||
libab_lexer_token tokens[] = {
|
||||
TOKEN_CHAR,
|
||||
@@ -27,7 +28,8 @@ libab_result libab_lexer_init(libab_lexer* lexer) {
|
||||
TOKEN_KW_WHILE,
|
||||
TOKEN_KW_DO,
|
||||
TOKEN_KW_ARROW,
|
||||
TOKEN_KW_FUN
|
||||
TOKEN_KW_FUN,
|
||||
TOKEN_KW_RETURN
|
||||
};
|
||||
const size_t count = sizeof(tokens)/sizeof(libab_lexer_token);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user