Adding lvalue rvalue concept, Cleanup
This commit is contained in:
@@ -149,6 +149,7 @@ function Ast_Expr *parse_expr(S64 rbp = 0);
|
||||
function Ast_Expr *
|
||||
parse_init_stmt(Ast_Expr *expr){
|
||||
Token *token = token_get();
|
||||
if(token->kind == TK_ColonAssign && expr->kind != AST_IDENT) parsing_error(expr->pos, "Binding with [:=] to something that is not an identifier");
|
||||
if(token_is_assign(token)){
|
||||
token_next();
|
||||
Ast_Expr *value = parse_expr();
|
||||
|
||||
Reference in New Issue
Block a user