Fixing bugs, constraining syntax

This commit is contained in:
Krzosa Karol
2022-09-27 11:30:16 +02:00
parent b743ceb2f4
commit 60f794580c
10 changed files with 56 additions and 23 deletions

View File

@@ -323,7 +323,7 @@ gen_expr(Ast_Expr *ast, Ast_Type *type_of_var){
CASE(BINARY, Binary){
if(node->op == TK_Dot){
if(gen_expr(node->left)){
if(node->resolved_type && node->resolved_type->kind == TYPE_POINTER) gen("->");
if(node->dot_access_step_resolution && node->dot_access_step_resolution->kind == TYPE_POINTER) gen("->");
else gen(".");
}
gen_expr(node->right);