Parsing operator overloads
This commit is contained in:
@@ -2,7 +2,6 @@ force_inline B32 token_is_assign(Token_Kind token){return token >= TK_FirstAssig
|
||||
force_inline B32 token_is_assign(Token *token){return token_is_assign(token->kind);}
|
||||
force_inline B32 token_is_compare(Token_Kind token){return token >= TK_FirstCompare && token <= TK_LastCompare;}
|
||||
force_inline B32 token_is_compare(Token *token){return token_is_compare(token->kind);}
|
||||
global Token token_null = {SAME_SCOPE};
|
||||
|
||||
function U8
|
||||
lexc(Lex_Stream *s){
|
||||
@@ -73,6 +72,12 @@ lex_is_keyword(Intern_Table *lexer, Intern_String keyword){
|
||||
return result;
|
||||
}
|
||||
|
||||
function B32
|
||||
is_valid_operator_overload(Lexer *lexer, Intern_String op){
|
||||
B32 result = op.str >= lexer->first_op.str && op.str <= lexer->last_op.str;
|
||||
return result;
|
||||
}
|
||||
|
||||
function void
|
||||
token_error(Token *t, String error_val){
|
||||
t->kind = TK_Error;
|
||||
|
||||
Reference in New Issue
Block a user