Porting unicode code
This commit is contained in:
@@ -262,7 +262,9 @@ gen_expr(Ast_Expr *ast, Ast_Type *type_of_var){
|
||||
CASE(INDEX, Index){
|
||||
gen("(");
|
||||
gen_expr(node->expr);
|
||||
if(node->expr->resolved_type == type_string) gen(".str");
|
||||
if(is_string(node->resolved_type))
|
||||
if(!(type_of_var && type_of_var == type_pointer_to_char))
|
||||
gen(".str");
|
||||
gen("[");
|
||||
gen_expr(node->index);
|
||||
gen("]");
|
||||
|
||||
Reference in New Issue
Block a user