Move types to Core_Ctx

This commit is contained in:
Krzosa Karol
2023-01-01 16:27:42 +01:00
parent d441abcddb
commit d120d05eee
8 changed files with 191 additions and 131 deletions

View File

@@ -213,7 +213,7 @@ gen_value(Token *pos, Value a){
gen("%s%Q", string, postfix);
}break;
case TYPE_POINTER:{
if(a.type == type_pointer_to_char){
if(a.type == pctx->type_pointer_to_char){
gen("\"%Q\"", a.intern_val);
}
else{
@@ -377,7 +377,7 @@ gen_expr(Ast_Expr *ast){
CASE(INDEX, Index){
gen("(");
gen_expr(node->expr);
if(node->index_original_type == type_string || node->index_original_type == untyped_string){
if(node->index_original_type == pctx->type_string || node->index_original_type == pctx->untyped_string){
gen(".str");
}
else if(is_slice(node->index_original_type)){