Fixing bugs, pointer arithmetic checking, better for, working on first program
This commit is contained in:
@@ -118,7 +118,9 @@ function Ast_Expr *parse_expr(S64 minbp = 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->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();
|
||||
@@ -359,7 +361,7 @@ binding_power(Binding binding, Token_Kind kind){
|
||||
Postfix: switch(kind){
|
||||
case TK_OpenBracket:
|
||||
case TK_OpenParen:
|
||||
return {20, -2};
|
||||
return {21, -2};
|
||||
default: return{-1,-1};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user