diff --git a/v.c b/v.c index 6d82b25..499f798 100644 --- a/v.c +++ b/v.c @@ -1,11 +1,11 @@ -#define V_COMMIT_HASH "07cab64d1" +#define V_COMMIT_HASH "32d7ae783" #ifndef V_COMMIT_HASH - #define V_COMMIT_HASH "38cceeafe" + #define V_COMMIT_HASH "07cab64d1" #endif #ifndef V_CURRENT_COMMIT_HASH - #define V_CURRENT_COMMIT_HASH "07cab64" + #define V_CURRENT_COMMIT_HASH "32d7ae7" #endif // V comptime_definitions: @@ -3362,6 +3362,7 @@ struct v__ast__TypeSymbol { struct v__ast__Aggregate { Array_v__ast__StructField fields; + v__ast__Type sum_type; Array_v__ast__Type types; }; @@ -7289,13 +7290,12 @@ v__token__Pos v__token__Pos_extend_with_last_line(v__token__Pos pos, v__token__P void v__token__Pos_update_last_line(v__token__Pos* pos, int last_line); v__token__Pos v__token__Token_pos(v__token__Token* tok); Array_v__token__Kind _const_v__token__assign_tokens; // inited later -int _const_v__token__nr_tokens; // inited later Array_string _const_v__token__valid_at_tokens; // inited later -VV_LOCAL_SYMBOL Map_string_v__token__Kind v__token__build_keys(void); -VV_LOCAL_SYMBOL Array_string v__token__build_token_str(void); Array_string _const_v__token__token_str; // inited later Map_string_v__token__Kind _const_v__token__keywords; // inited later v__token__KeywordsMatcher _const_v__token__matcher; // inited later +VV_LOCAL_SYMBOL Map_string_v__token__Kind v__token__build_keys(void); +VV_LOCAL_SYMBOL Array_string v__token__build_token_str(void); bool v__token__is_key(string key); bool v__token__is_decl(v__token__Kind t); bool v__token__Kind_is_assign(v__token__Kind t); @@ -10665,13 +10665,16 @@ static string indent_v__ast__OrExpr_str(v__ast__OrExpr it, int indent_count) { static string indent_v__ast__Aggregate_str(v__ast__Aggregate it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); string _t39 = indent_Array_v__ast__StructField_str(it.fields, indent_count + 1); - string _t40 = indent_Array_v__ast__Type_str(it.types, indent_count + 1); - string res = str_intp( 11, _MOV((StrIntpData[]){ + string _t40 = v__ast__Type_str(it.sum_type); + string _t41 = indent_Array_v__ast__Type_str(it.types, indent_count + 1); + string res = str_intp( 15, _MOV((StrIntpData[]){ {_SLIT("v.ast.Aggregate{\n"), 0, {.d_c=0}}, {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" fields: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t39}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t40}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" sum_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t40}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t41}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); + string_free(&_t41); string_free(&_t40); string_free(&_t39); string_free(&indents); @@ -10680,88 +10683,74 @@ static string indent_v__ast__Aggregate_str(v__ast__Aggregate it, int indent_coun static string indent_v__ast__Alias_str(v__ast__Alias it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); - string _t41 = v__ast__Type_str(it.parent_type); - string _t42 = v__ast__Language_str(it.language); + string _t42 = v__ast__Type_str(it.parent_type); + string _t43 = v__ast__Language_str(it.language); string res = str_intp( 15, _MOV((StrIntpData[]){ {_SLIT("v.ast.Alias{\n"), 0, {.d_c=0}}, - {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" parent_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t41}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" language: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t42}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" parent_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t42}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" language: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t43}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_import: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_import ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); + string_free(&_t43); string_free(&_t42); - string_free(&_t41); string_free(&indents); return res; } static string indent_v__ast__Array_str(v__ast__Array it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); - string _t43 = v__ast__Type_str(it.elem_type); + string _t44 = v__ast__Type_str(it.elem_type); string res = str_intp( 11, _MOV((StrIntpData[]){ {_SLIT("v.ast.Array{\n"), 0, {.d_c=0}}, {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" nr_dims: "), 0, {.d_c=0}}, {_SLIT(""), 7, {.d_i32=it.nr_dims}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" elem_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t43}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" elem_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t44}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); - string_free(&_t43); + string_free(&_t44); string_free(&indents); return res; } static string indent_v__ast__ArrayFixed_str(v__ast__ArrayFixed it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); - string _t44 = v__ast__Expr_str(it.size_expr); - string _t45 = v__ast__Type_str(it.elem_type); + string _t45 = v__ast__Expr_str(it.size_expr); + string _t46 = v__ast__Type_str(it.elem_type); string res = str_intp( 15, _MOV((StrIntpData[]){ {_SLIT("v.ast.ArrayFixed{\n"), 0, {.d_c=0}}, {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" size: "), 0, {.d_c=0}}, {_SLIT(""), 7, {.d_i32=it.size}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" size_expr: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t44}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" elem_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t45}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" size_expr: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t45}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" elem_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t46}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); + string_free(&_t46); string_free(&_t45); - string_free(&_t44); string_free(&indents); return res; } static string indent_v__ast__Chan_str(v__ast__Chan it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); - string _t46 = v__ast__Type_str(it.elem_type); + string _t47 = v__ast__Type_str(it.elem_type); string res = str_intp( 11, _MOV((StrIntpData[]){ {_SLIT("v.ast.Chan{\n"), 0, {.d_c=0}}, - {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" elem_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t46}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" elem_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t47}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_mut: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_mut ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); - string_free(&_t46); - string_free(&indents); - return res; -} - -static string indent_v__ast__FnType_str(v__ast__FnType it, int indent_count) { - string indents = string_repeat(_SLIT(" "), indent_count); - string _t47 = indent_v__ast__Fn_str(it.func, indent_count + 1); - string res = str_intp( 15, _MOV((StrIntpData[]){ - {_SLIT("v.ast.FnType{\n"), 0, {.d_c=0}}, - {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" is_anon: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_anon ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" has_decl: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.has_decl ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" func: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t47}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, - })); string_free(&_t47); string_free(&indents); return res; } -static string indent_v__ast__GenericInst_str(v__ast__GenericInst it, int indent_count) { +static string indent_v__ast__FnType_str(v__ast__FnType it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); - string _t48 = indent_Array_v__ast__Type_str(it.concrete_types, indent_count + 1); - string res = str_intp( 11, _MOV((StrIntpData[]){ - {_SLIT("v.ast.GenericInst{\n"), 0, {.d_c=0}}, - {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" parent_idx: "), 0, {.d_c=0}}, {_SLIT(""), 7, {.d_i32=it.parent_idx}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" concrete_types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t48}}, {_SLIT(""), 0, {.d_c=0}}, + string _t48 = indent_v__ast__Fn_str(it.func, indent_count + 1); + string res = str_intp( 15, _MOV((StrIntpData[]){ + {_SLIT("v.ast.FnType{\n"), 0, {.d_c=0}}, + {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" is_anon: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_anon ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" has_decl: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.has_decl ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" func: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t48}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); string_free(&_t48); @@ -10769,29 +10758,44 @@ static string indent_v__ast__GenericInst_str(v__ast__GenericInst it, int indent_ return res; } -static string indent_v__ast__Interface_str(v__ast__Interface it, int indent_count) { +static string indent_v__ast__GenericInst_str(v__ast__GenericInst it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); - string _t49 = indent_Array_v__ast__Type_str(it.types, indent_count + 1); - string _t50 = indent_Array_v__ast__StructField_str(it.fields, indent_count + 1); - string _t51 = indent_Array_v__ast__Fn_str(it.methods, indent_count + 1); - string _t52 = indent_Array_v__ast__Type_str(it.embeds, indent_count + 1); - string _t53 = indent_Map_int_Array_v__ast__Type_str(it.conversions, indent_count + 1); - string _t54 = indent_Array_v__ast__Type_str(it.generic_types, indent_count + 1); - string _t55 = indent_Array_v__ast__Type_str(it.concrete_types, indent_count + 1); - string _t56 = v__ast__Type_str(it.parent_type); - string res = str_intp( 39, _MOV((StrIntpData[]){ - {_SLIT("v.ast.Interface{\n"), 0, {.d_c=0}}, - {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t49}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" fields: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t50}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" methods: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t51}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" embeds: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t52}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" conversions: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t53}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_generic: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_generic ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" generic_types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t54}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" concrete_types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t55}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" parent_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t56}}, {_SLIT(""), 0, {.d_c=0}}, + string _t49 = indent_Array_v__ast__Type_str(it.concrete_types, indent_count + 1); + string res = str_intp( 11, _MOV((StrIntpData[]){ + {_SLIT("v.ast.GenericInst{\n"), 0, {.d_c=0}}, + {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" parent_idx: "), 0, {.d_c=0}}, {_SLIT(""), 7, {.d_i32=it.parent_idx}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" concrete_types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t49}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); + string_free(&_t49); + string_free(&indents); + return res; +} + +static string indent_v__ast__Interface_str(v__ast__Interface it, int indent_count) { + string indents = string_repeat(_SLIT(" "), indent_count); + string _t50 = indent_Array_v__ast__Type_str(it.types, indent_count + 1); + string _t51 = indent_Array_v__ast__StructField_str(it.fields, indent_count + 1); + string _t52 = indent_Array_v__ast__Fn_str(it.methods, indent_count + 1); + string _t53 = indent_Array_v__ast__Type_str(it.embeds, indent_count + 1); + string _t54 = indent_Map_int_Array_v__ast__Type_str(it.conversions, indent_count + 1); + string _t55 = indent_Array_v__ast__Type_str(it.generic_types, indent_count + 1); + string _t56 = indent_Array_v__ast__Type_str(it.concrete_types, indent_count + 1); + string _t57 = v__ast__Type_str(it.parent_type); + string res = str_intp( 39, _MOV((StrIntpData[]){ + {_SLIT("v.ast.Interface{\n"), 0, {.d_c=0}}, + {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t50}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" fields: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t51}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" methods: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t52}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" embeds: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t53}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" conversions: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t54}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_generic: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_generic ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" generic_types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t55}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" concrete_types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t56}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" parent_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t57}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, + })); + string_free(&_t57); string_free(&_t56); string_free(&_t55); string_free(&_t54); @@ -10799,109 +10803,108 @@ static string indent_v__ast__Interface_str(v__ast__Interface it, int indent_coun string_free(&_t52); string_free(&_t51); string_free(&_t50); - string_free(&_t49); string_free(&indents); return res; } static string indent_v__ast__Map_str(v__ast__Map it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); - string _t57 = v__ast__Type_str(it.key_type); - string _t58 = v__ast__Type_str(it.value_type); + string _t58 = v__ast__Type_str(it.key_type); + string _t59 = v__ast__Type_str(it.value_type); string res = str_intp( 11, _MOV((StrIntpData[]){ {_SLIT("v.ast.Map{\n"), 0, {.d_c=0}}, - {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" key_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t57}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" value_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t58}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" key_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t58}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" value_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t59}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); + string_free(&_t59); string_free(&_t58); - string_free(&_t57); string_free(&indents); return res; } static string indent_v__ast__MultiReturn_str(v__ast__MultiReturn it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); - string _t59 = indent_Array_v__ast__Type_str(it.types, indent_count + 1); + string _t60 = indent_Array_v__ast__Type_str(it.types, indent_count + 1); string res = str_intp( 7, _MOV((StrIntpData[]){ {_SLIT("v.ast.MultiReturn{\n"), 0, {.d_c=0}}, - {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t59}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t60}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); - string_free(&_t59); + string_free(&_t60); string_free(&indents); return res; } static string indent_v__ast__Struct_str(v__ast__Struct it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); - string _t60 = indent_Array_v__ast__Attr_str(it.attrs, indent_count + 1); - string _t61 = indent_Array_v__ast__Type_str(it.embeds, indent_count + 1); - string _t62 = indent_Array_v__ast__StructField_str(it.fields, indent_count + 1); - string _t63 = indent_Array_v__ast__Type_str(it.generic_types, indent_count + 1); - string _t64 = indent_Array_v__ast__Type_str(it.concrete_types, indent_count + 1); - string _t65 = v__ast__Type_str(it.parent_type); + string _t61 = indent_Array_v__ast__Attr_str(it.attrs, indent_count + 1); + string _t62 = indent_Array_v__ast__Type_str(it.embeds, indent_count + 1); + string _t63 = indent_Array_v__ast__StructField_str(it.fields, indent_count + 1); + string _t64 = indent_Array_v__ast__Type_str(it.generic_types, indent_count + 1); + string _t65 = indent_Array_v__ast__Type_str(it.concrete_types, indent_count + 1); + string _t66 = v__ast__Type_str(it.parent_type); string res = str_intp( 43, _MOV((StrIntpData[]){ {_SLIT("v.ast.Struct{\n"), 0, {.d_c=0}}, - {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" attrs: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t60}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" embeds: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t61}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" fields: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t62}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" attrs: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t61}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" embeds: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t62}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" fields: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t63}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_typedef: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_typedef ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_union: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_union ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_heap: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_heap ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_generic: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_generic ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" generic_types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t63}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" concrete_types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t64}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" parent_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t65}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" generic_types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t64}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" concrete_types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t65}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" parent_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t66}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); + string_free(&_t66); string_free(&_t65); string_free(&_t64); string_free(&_t63); string_free(&_t62); string_free(&_t61); - string_free(&_t60); string_free(&indents); return res; } static string indent_v__ast__SumType_str(v__ast__SumType it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); - string _t66 = indent_Array_v__ast__StructField_str(it.fields, indent_count + 1); - string _t67 = indent_Array_v__ast__Type_str(it.variants, indent_count + 1); - string _t68 = indent_Array_v__ast__Type_str(it.generic_types, indent_count + 1); - string _t69 = indent_Array_v__ast__Type_str(it.concrete_types, indent_count + 1); - string _t70 = v__ast__Type_str(it.parent_type); + string _t67 = indent_Array_v__ast__StructField_str(it.fields, indent_count + 1); + string _t68 = indent_Array_v__ast__Type_str(it.variants, indent_count + 1); + string _t69 = indent_Array_v__ast__Type_str(it.generic_types, indent_count + 1); + string _t70 = indent_Array_v__ast__Type_str(it.concrete_types, indent_count + 1); + string _t71 = v__ast__Type_str(it.parent_type); string res = str_intp( 35, _MOV((StrIntpData[]){ {_SLIT("v.ast.SumType{\n"), 0, {.d_c=0}}, - {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" fields: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t66}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" fields: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t67}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" found_fields: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.found_fields ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_anon: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_anon ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_generic: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_generic ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" variants: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t67}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" generic_types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t68}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" concrete_types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t69}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" parent_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t70}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" variants: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t68}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" generic_types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t69}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" concrete_types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t70}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" parent_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t71}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); + string_free(&_t71); string_free(&_t70); string_free(&_t69); string_free(&_t68); string_free(&_t67); - string_free(&_t66); string_free(&indents); return res; } static string indent_v__ast__Thread_str(v__ast__Thread it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); - string _t71 = v__ast__Type_str(it.return_type); + string _t72 = v__ast__Type_str(it.return_type); string res = str_intp( 7, _MOV((StrIntpData[]){ {_SLIT("v.ast.Thread{\n"), 0, {.d_c=0}}, - {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" return_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t71}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" return_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t72}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); - string_free(&_t71); + string_free(&_t72); string_free(&indents); return res; } @@ -10919,77 +10922,77 @@ static string indent_v__ast__EmptyExpr_str(v__ast__EmptyExpr it, int indent_coun static string indent_v__ast__Comment_str(v__ast__Comment it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); - string _t72 = indent_v__token__Pos_str(it.pos, indent_count + 1); + string _t73 = indent_v__token__Pos_str(it.pos, indent_count + 1); string res = str_intp( 19, _MOV((StrIntpData[]){ {_SLIT("v.ast.Comment{\n"), 0, {.d_c=0}}, {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" text: "), 0, {.d_c=0}}, {_SLIT("'"), 16, {.d_s=it.text}}, {_SLIT("'"), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_multi: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_multi ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_inline: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_inline ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" pos: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t72}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" pos: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t73}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); - string_free(&_t72); + string_free(&_t73); string_free(&indents); return res; } static string indent_v__ast__Param_str(v__ast__Param it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); - string _t73 = indent_v__token__Pos_str(it.pos, indent_count + 1); - string _t74 = indent_v__token__Pos_str(it.type_pos, indent_count + 1); - string _t75 = v__ast__Type_str(it.typ); + string _t74 = indent_v__token__Pos_str(it.pos, indent_count + 1); + string _t75 = indent_v__token__Pos_str(it.type_pos, indent_count + 1); + string _t76 = v__ast__Type_str(it.typ); string res = str_intp( 31, _MOV((StrIntpData[]){ {_SLIT("v.ast.Param{\n"), 0, {.d_c=0}}, - {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" pos: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t73}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" pos: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t74}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" name: "), 0, {.d_c=0}}, {_SLIT("'"), 16, {.d_s=it.name}}, {_SLIT("'"), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_mut: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_mut ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_auto_rec: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_auto_rec ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" type_pos: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t74}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" type_pos: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t75}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_hidden: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_hidden ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" typ: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t75}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" typ: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t76}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); + string_free(&_t76); string_free(&_t75); string_free(&_t74); - string_free(&_t73); string_free(&indents); return res; } static string indent_v__ast__StructField_str(v__ast__StructField it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); - string _t76 = indent_v__token__Pos_str(it.pos, indent_count + 1); - string _t77 = indent_v__token__Pos_str(it.type_pos, indent_count + 1); - string _t78 = indent_Array_v__ast__Comment_str(it.comments, indent_count + 1); - string _t79 = indent_Array_v__ast__Attr_str(it.attrs, indent_count + 1); - string _t80 = v__ast__Expr_str(it.default_expr); - string _t81 = v__ast__Type_str(it.default_expr_typ); - string _t82 = v__ast__Type_str(it.typ); + string _t77 = indent_v__token__Pos_str(it.pos, indent_count + 1); + string _t78 = indent_v__token__Pos_str(it.type_pos, indent_count + 1); + string _t79 = indent_Array_v__ast__Comment_str(it.comments, indent_count + 1); + string _t80 = indent_Array_v__ast__Attr_str(it.attrs, indent_count + 1); + string _t81 = v__ast__Expr_str(it.default_expr); + string _t82 = v__ast__Type_str(it.default_expr_typ); + string _t83 = v__ast__Type_str(it.typ); string res = str_intp( 59, _MOV((StrIntpData[]){ {_SLIT("v.ast.StructField{\n"), 0, {.d_c=0}}, - {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" pos: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t76}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" type_pos: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t77}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" comments: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t78}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" pos: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t77}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" type_pos: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t78}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" comments: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t79}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" has_default_expr: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.has_default_expr ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" attrs: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t79}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" attrs: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t80}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_pub: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_pub ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" default_val: "), 0, {.d_c=0}}, {_SLIT("'"), 16, {.d_s=it.default_val}}, {_SLIT("'"), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_mut: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_mut ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_global: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_global ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_volatile: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_volatile ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" default_expr: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t80}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" default_expr_typ: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t81}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" default_expr: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t81}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" default_expr_typ: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t82}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" name: "), 0, {.d_c=0}}, {_SLIT("'"), 16, {.d_s=it.name}}, {_SLIT("'"), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" typ: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t82}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" typ: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t83}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); + string_free(&_t83); string_free(&_t82); string_free(&_t81); string_free(&_t80); string_free(&_t79); string_free(&_t78); string_free(&_t77); - string_free(&_t76); string_free(&indents); return res; } @@ -27190,7 +27193,7 @@ VV_LOCAL_SYMBOL Map_string_v__token__Kind v__token__build_keys(void) { } VV_LOCAL_SYMBOL Array_string v__token__build_token_str(void) { - Array_string s = __new_array_with_default(_const_v__token__nr_tokens, 0, sizeof(string), &(string[]){_SLIT("")}); + Array_string s = __new_array_with_default(((int)(v__token__Kind___end_)), 0, sizeof(string), &(string[]){_SLIT("")}); array_set(&s, v__token__Kind__unknown, &(string[]) { _SLIT("unknown") }); array_set(&s, v__token__Kind__eof, &(string[]) { _SLIT("eof") }); array_set(&s, v__token__Kind__name, &(string[]) { _SLIT("name") }); @@ -28049,586 +28052,358 @@ string v__token__kind_to_string(v__token__Kind k) { } Option_v__token__Kind v__token__kind_from_string(string s) { - + Option_v__token__Kind _t2 = {0}; + if (string__eq(s, _SLIT("unknown"))) { - Option_v__token__Kind _t1; - opt_ok(&(v__token__Kind[]) { v__token__Kind__unknown }, (Option*)(&_t1), sizeof(v__token__Kind)); - return _t1; + opt_ok(&(v__token__Kind[]) { v__token__Kind__unknown }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("eof"))) { - Option_v__token__Kind _t2; opt_ok(&(v__token__Kind[]) { v__token__Kind__eof }, (Option*)(&_t2), sizeof(v__token__Kind)); - return _t2; } else if (string__eq(s, _SLIT("name"))) { - Option_v__token__Kind _t3; - opt_ok(&(v__token__Kind[]) { v__token__Kind__name }, (Option*)(&_t3), sizeof(v__token__Kind)); - return _t3; + opt_ok(&(v__token__Kind[]) { v__token__Kind__name }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("number"))) { - Option_v__token__Kind _t4; - opt_ok(&(v__token__Kind[]) { v__token__Kind__number }, (Option*)(&_t4), sizeof(v__token__Kind)); - return _t4; + opt_ok(&(v__token__Kind[]) { v__token__Kind__number }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("string"))) { - Option_v__token__Kind _t5; - opt_ok(&(v__token__Kind[]) { v__token__Kind__string }, (Option*)(&_t5), sizeof(v__token__Kind)); - return _t5; + opt_ok(&(v__token__Kind[]) { v__token__Kind__string }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("str_inter"))) { - Option_v__token__Kind _t6; - opt_ok(&(v__token__Kind[]) { v__token__Kind__str_inter }, (Option*)(&_t6), sizeof(v__token__Kind)); - return _t6; + opt_ok(&(v__token__Kind[]) { v__token__Kind__str_inter }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("chartoken"))) { - Option_v__token__Kind _t7; - opt_ok(&(v__token__Kind[]) { v__token__Kind__chartoken }, (Option*)(&_t7), sizeof(v__token__Kind)); - return _t7; + opt_ok(&(v__token__Kind[]) { v__token__Kind__chartoken }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("plus"))) { - Option_v__token__Kind _t8; - opt_ok(&(v__token__Kind[]) { v__token__Kind__plus }, (Option*)(&_t8), sizeof(v__token__Kind)); - return _t8; + opt_ok(&(v__token__Kind[]) { v__token__Kind__plus }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("minus"))) { - Option_v__token__Kind _t9; - opt_ok(&(v__token__Kind[]) { v__token__Kind__minus }, (Option*)(&_t9), sizeof(v__token__Kind)); - return _t9; + opt_ok(&(v__token__Kind[]) { v__token__Kind__minus }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("mul"))) { - Option_v__token__Kind _t10; - opt_ok(&(v__token__Kind[]) { v__token__Kind__mul }, (Option*)(&_t10), sizeof(v__token__Kind)); - return _t10; + opt_ok(&(v__token__Kind[]) { v__token__Kind__mul }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("div"))) { - Option_v__token__Kind _t11; - opt_ok(&(v__token__Kind[]) { v__token__Kind__div }, (Option*)(&_t11), sizeof(v__token__Kind)); - return _t11; + opt_ok(&(v__token__Kind[]) { v__token__Kind__div }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("mod"))) { - Option_v__token__Kind _t12; - opt_ok(&(v__token__Kind[]) { v__token__Kind__mod }, (Option*)(&_t12), sizeof(v__token__Kind)); - return _t12; + opt_ok(&(v__token__Kind[]) { v__token__Kind__mod }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("xor"))) { - Option_v__token__Kind _t13; - opt_ok(&(v__token__Kind[]) { v__token__Kind__xor }, (Option*)(&_t13), sizeof(v__token__Kind)); - return _t13; + opt_ok(&(v__token__Kind[]) { v__token__Kind__xor }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("pipe"))) { - Option_v__token__Kind _t14; - opt_ok(&(v__token__Kind[]) { v__token__Kind__pipe }, (Option*)(&_t14), sizeof(v__token__Kind)); - return _t14; + opt_ok(&(v__token__Kind[]) { v__token__Kind__pipe }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("inc"))) { - Option_v__token__Kind _t15; - opt_ok(&(v__token__Kind[]) { v__token__Kind__inc }, (Option*)(&_t15), sizeof(v__token__Kind)); - return _t15; + opt_ok(&(v__token__Kind[]) { v__token__Kind__inc }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("dec"))) { - Option_v__token__Kind _t16; - opt_ok(&(v__token__Kind[]) { v__token__Kind__dec }, (Option*)(&_t16), sizeof(v__token__Kind)); - return _t16; + opt_ok(&(v__token__Kind[]) { v__token__Kind__dec }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("and"))) { - Option_v__token__Kind _t17; - opt_ok(&(v__token__Kind[]) { v__token__Kind__and }, (Option*)(&_t17), sizeof(v__token__Kind)); - return _t17; + opt_ok(&(v__token__Kind[]) { v__token__Kind__and }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("logical_or"))) { - Option_v__token__Kind _t18; - opt_ok(&(v__token__Kind[]) { v__token__Kind__logical_or }, (Option*)(&_t18), sizeof(v__token__Kind)); - return _t18; + opt_ok(&(v__token__Kind[]) { v__token__Kind__logical_or }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("not"))) { - Option_v__token__Kind _t19; - opt_ok(&(v__token__Kind[]) { v__token__Kind__not }, (Option*)(&_t19), sizeof(v__token__Kind)); - return _t19; + opt_ok(&(v__token__Kind[]) { v__token__Kind__not }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("bit_not"))) { - Option_v__token__Kind _t20; - opt_ok(&(v__token__Kind[]) { v__token__Kind__bit_not }, (Option*)(&_t20), sizeof(v__token__Kind)); - return _t20; + opt_ok(&(v__token__Kind[]) { v__token__Kind__bit_not }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("question"))) { - Option_v__token__Kind _t21; - opt_ok(&(v__token__Kind[]) { v__token__Kind__question }, (Option*)(&_t21), sizeof(v__token__Kind)); - return _t21; + opt_ok(&(v__token__Kind[]) { v__token__Kind__question }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("comma"))) { - Option_v__token__Kind _t22; - opt_ok(&(v__token__Kind[]) { v__token__Kind__comma }, (Option*)(&_t22), sizeof(v__token__Kind)); - return _t22; + opt_ok(&(v__token__Kind[]) { v__token__Kind__comma }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("semicolon"))) { - Option_v__token__Kind _t23; - opt_ok(&(v__token__Kind[]) { v__token__Kind__semicolon }, (Option*)(&_t23), sizeof(v__token__Kind)); - return _t23; + opt_ok(&(v__token__Kind[]) { v__token__Kind__semicolon }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("colon"))) { - Option_v__token__Kind _t24; - opt_ok(&(v__token__Kind[]) { v__token__Kind__colon }, (Option*)(&_t24), sizeof(v__token__Kind)); - return _t24; + opt_ok(&(v__token__Kind[]) { v__token__Kind__colon }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("arrow"))) { - Option_v__token__Kind _t25; - opt_ok(&(v__token__Kind[]) { v__token__Kind__arrow }, (Option*)(&_t25), sizeof(v__token__Kind)); - return _t25; + opt_ok(&(v__token__Kind[]) { v__token__Kind__arrow }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("amp"))) { - Option_v__token__Kind _t26; - opt_ok(&(v__token__Kind[]) { v__token__Kind__amp }, (Option*)(&_t26), sizeof(v__token__Kind)); - return _t26; + opt_ok(&(v__token__Kind[]) { v__token__Kind__amp }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("hash"))) { - Option_v__token__Kind _t27; - opt_ok(&(v__token__Kind[]) { v__token__Kind__hash }, (Option*)(&_t27), sizeof(v__token__Kind)); - return _t27; + opt_ok(&(v__token__Kind[]) { v__token__Kind__hash }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("dollar"))) { - Option_v__token__Kind _t28; - opt_ok(&(v__token__Kind[]) { v__token__Kind__dollar }, (Option*)(&_t28), sizeof(v__token__Kind)); - return _t28; + opt_ok(&(v__token__Kind[]) { v__token__Kind__dollar }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("at"))) { - Option_v__token__Kind _t29; - opt_ok(&(v__token__Kind[]) { v__token__Kind__at }, (Option*)(&_t29), sizeof(v__token__Kind)); - return _t29; + opt_ok(&(v__token__Kind[]) { v__token__Kind__at }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("str_dollar"))) { - Option_v__token__Kind _t30; - opt_ok(&(v__token__Kind[]) { v__token__Kind__str_dollar }, (Option*)(&_t30), sizeof(v__token__Kind)); - return _t30; + opt_ok(&(v__token__Kind[]) { v__token__Kind__str_dollar }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("left_shift"))) { - Option_v__token__Kind _t31; - opt_ok(&(v__token__Kind[]) { v__token__Kind__left_shift }, (Option*)(&_t31), sizeof(v__token__Kind)); - return _t31; + opt_ok(&(v__token__Kind[]) { v__token__Kind__left_shift }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("right_shift"))) { - Option_v__token__Kind _t32; - opt_ok(&(v__token__Kind[]) { v__token__Kind__right_shift }, (Option*)(&_t32), sizeof(v__token__Kind)); - return _t32; + opt_ok(&(v__token__Kind[]) { v__token__Kind__right_shift }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("unsigned_right_shift"))) { - Option_v__token__Kind _t33; - opt_ok(&(v__token__Kind[]) { v__token__Kind__unsigned_right_shift }, (Option*)(&_t33), sizeof(v__token__Kind)); - return _t33; + opt_ok(&(v__token__Kind[]) { v__token__Kind__unsigned_right_shift }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("not_in"))) { - Option_v__token__Kind _t34; - opt_ok(&(v__token__Kind[]) { v__token__Kind__not_in }, (Option*)(&_t34), sizeof(v__token__Kind)); - return _t34; + opt_ok(&(v__token__Kind[]) { v__token__Kind__not_in }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("not_is"))) { - Option_v__token__Kind _t35; - opt_ok(&(v__token__Kind[]) { v__token__Kind__not_is }, (Option*)(&_t35), sizeof(v__token__Kind)); - return _t35; + opt_ok(&(v__token__Kind[]) { v__token__Kind__not_is }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("assign"))) { - Option_v__token__Kind _t36; - opt_ok(&(v__token__Kind[]) { v__token__Kind__assign }, (Option*)(&_t36), sizeof(v__token__Kind)); - return _t36; + opt_ok(&(v__token__Kind[]) { v__token__Kind__assign }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("decl_assign"))) { - Option_v__token__Kind _t37; - opt_ok(&(v__token__Kind[]) { v__token__Kind__decl_assign }, (Option*)(&_t37), sizeof(v__token__Kind)); - return _t37; + opt_ok(&(v__token__Kind[]) { v__token__Kind__decl_assign }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("plus_assign"))) { - Option_v__token__Kind _t38; - opt_ok(&(v__token__Kind[]) { v__token__Kind__plus_assign }, (Option*)(&_t38), sizeof(v__token__Kind)); - return _t38; + opt_ok(&(v__token__Kind[]) { v__token__Kind__plus_assign }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("minus_assign"))) { - Option_v__token__Kind _t39; - opt_ok(&(v__token__Kind[]) { v__token__Kind__minus_assign }, (Option*)(&_t39), sizeof(v__token__Kind)); - return _t39; + opt_ok(&(v__token__Kind[]) { v__token__Kind__minus_assign }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("div_assign"))) { - Option_v__token__Kind _t40; - opt_ok(&(v__token__Kind[]) { v__token__Kind__div_assign }, (Option*)(&_t40), sizeof(v__token__Kind)); - return _t40; + opt_ok(&(v__token__Kind[]) { v__token__Kind__div_assign }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("mult_assign"))) { - Option_v__token__Kind _t41; - opt_ok(&(v__token__Kind[]) { v__token__Kind__mult_assign }, (Option*)(&_t41), sizeof(v__token__Kind)); - return _t41; + opt_ok(&(v__token__Kind[]) { v__token__Kind__mult_assign }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("xor_assign"))) { - Option_v__token__Kind _t42; - opt_ok(&(v__token__Kind[]) { v__token__Kind__xor_assign }, (Option*)(&_t42), sizeof(v__token__Kind)); - return _t42; + opt_ok(&(v__token__Kind[]) { v__token__Kind__xor_assign }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("mod_assign"))) { - Option_v__token__Kind _t43; - opt_ok(&(v__token__Kind[]) { v__token__Kind__mod_assign }, (Option*)(&_t43), sizeof(v__token__Kind)); - return _t43; + opt_ok(&(v__token__Kind[]) { v__token__Kind__mod_assign }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("or_assign"))) { - Option_v__token__Kind _t44; - opt_ok(&(v__token__Kind[]) { v__token__Kind__or_assign }, (Option*)(&_t44), sizeof(v__token__Kind)); - return _t44; + opt_ok(&(v__token__Kind[]) { v__token__Kind__or_assign }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("and_assign"))) { - Option_v__token__Kind _t45; - opt_ok(&(v__token__Kind[]) { v__token__Kind__and_assign }, (Option*)(&_t45), sizeof(v__token__Kind)); - return _t45; + opt_ok(&(v__token__Kind[]) { v__token__Kind__and_assign }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("right_shift_assign"))) { - Option_v__token__Kind _t46; - opt_ok(&(v__token__Kind[]) { v__token__Kind__right_shift_assign }, (Option*)(&_t46), sizeof(v__token__Kind)); - return _t46; + opt_ok(&(v__token__Kind[]) { v__token__Kind__right_shift_assign }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("left_shift_assign"))) { - Option_v__token__Kind _t47; - opt_ok(&(v__token__Kind[]) { v__token__Kind__left_shift_assign }, (Option*)(&_t47), sizeof(v__token__Kind)); - return _t47; + opt_ok(&(v__token__Kind[]) { v__token__Kind__left_shift_assign }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("unsigned_right_shift_assign"))) { - Option_v__token__Kind _t48; - opt_ok(&(v__token__Kind[]) { v__token__Kind__unsigned_right_shift_assign }, (Option*)(&_t48), sizeof(v__token__Kind)); - return _t48; + opt_ok(&(v__token__Kind[]) { v__token__Kind__unsigned_right_shift_assign }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("lcbr"))) { - Option_v__token__Kind _t49; - opt_ok(&(v__token__Kind[]) { v__token__Kind__lcbr }, (Option*)(&_t49), sizeof(v__token__Kind)); - return _t49; + opt_ok(&(v__token__Kind[]) { v__token__Kind__lcbr }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("rcbr"))) { - Option_v__token__Kind _t50; - opt_ok(&(v__token__Kind[]) { v__token__Kind__rcbr }, (Option*)(&_t50), sizeof(v__token__Kind)); - return _t50; + opt_ok(&(v__token__Kind[]) { v__token__Kind__rcbr }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("lpar"))) { - Option_v__token__Kind _t51; - opt_ok(&(v__token__Kind[]) { v__token__Kind__lpar }, (Option*)(&_t51), sizeof(v__token__Kind)); - return _t51; + opt_ok(&(v__token__Kind[]) { v__token__Kind__lpar }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("rpar"))) { - Option_v__token__Kind _t52; - opt_ok(&(v__token__Kind[]) { v__token__Kind__rpar }, (Option*)(&_t52), sizeof(v__token__Kind)); - return _t52; + opt_ok(&(v__token__Kind[]) { v__token__Kind__rpar }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("lsbr"))) { - Option_v__token__Kind _t53; - opt_ok(&(v__token__Kind[]) { v__token__Kind__lsbr }, (Option*)(&_t53), sizeof(v__token__Kind)); - return _t53; + opt_ok(&(v__token__Kind[]) { v__token__Kind__lsbr }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("nilsbr"))) { - Option_v__token__Kind _t54; - opt_ok(&(v__token__Kind[]) { v__token__Kind__nilsbr }, (Option*)(&_t54), sizeof(v__token__Kind)); - return _t54; + opt_ok(&(v__token__Kind[]) { v__token__Kind__nilsbr }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("rsbr"))) { - Option_v__token__Kind _t55; - opt_ok(&(v__token__Kind[]) { v__token__Kind__rsbr }, (Option*)(&_t55), sizeof(v__token__Kind)); - return _t55; + opt_ok(&(v__token__Kind[]) { v__token__Kind__rsbr }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("eq"))) { - Option_v__token__Kind _t56; - opt_ok(&(v__token__Kind[]) { v__token__Kind__eq }, (Option*)(&_t56), sizeof(v__token__Kind)); - return _t56; + opt_ok(&(v__token__Kind[]) { v__token__Kind__eq }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("ne"))) { - Option_v__token__Kind _t57; - opt_ok(&(v__token__Kind[]) { v__token__Kind__ne }, (Option*)(&_t57), sizeof(v__token__Kind)); - return _t57; + opt_ok(&(v__token__Kind[]) { v__token__Kind__ne }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("gt"))) { - Option_v__token__Kind _t58; - opt_ok(&(v__token__Kind[]) { v__token__Kind__gt }, (Option*)(&_t58), sizeof(v__token__Kind)); - return _t58; + opt_ok(&(v__token__Kind[]) { v__token__Kind__gt }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("lt"))) { - Option_v__token__Kind _t59; - opt_ok(&(v__token__Kind[]) { v__token__Kind__lt }, (Option*)(&_t59), sizeof(v__token__Kind)); - return _t59; + opt_ok(&(v__token__Kind[]) { v__token__Kind__lt }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("ge"))) { - Option_v__token__Kind _t60; - opt_ok(&(v__token__Kind[]) { v__token__Kind__ge }, (Option*)(&_t60), sizeof(v__token__Kind)); - return _t60; + opt_ok(&(v__token__Kind[]) { v__token__Kind__ge }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("le"))) { - Option_v__token__Kind _t61; - opt_ok(&(v__token__Kind[]) { v__token__Kind__le }, (Option*)(&_t61), sizeof(v__token__Kind)); - return _t61; + opt_ok(&(v__token__Kind[]) { v__token__Kind__le }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("comment"))) { - Option_v__token__Kind _t62; - opt_ok(&(v__token__Kind[]) { v__token__Kind__comment }, (Option*)(&_t62), sizeof(v__token__Kind)); - return _t62; + opt_ok(&(v__token__Kind[]) { v__token__Kind__comment }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("nl"))) { - Option_v__token__Kind _t63; - opt_ok(&(v__token__Kind[]) { v__token__Kind__nl }, (Option*)(&_t63), sizeof(v__token__Kind)); - return _t63; + opt_ok(&(v__token__Kind[]) { v__token__Kind__nl }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("dot"))) { - Option_v__token__Kind _t64; - opt_ok(&(v__token__Kind[]) { v__token__Kind__dot }, (Option*)(&_t64), sizeof(v__token__Kind)); - return _t64; + opt_ok(&(v__token__Kind[]) { v__token__Kind__dot }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("dotdot"))) { - Option_v__token__Kind _t65; - opt_ok(&(v__token__Kind[]) { v__token__Kind__dotdot }, (Option*)(&_t65), sizeof(v__token__Kind)); - return _t65; + opt_ok(&(v__token__Kind[]) { v__token__Kind__dotdot }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("ellipsis"))) { - Option_v__token__Kind _t66; - opt_ok(&(v__token__Kind[]) { v__token__Kind__ellipsis }, (Option*)(&_t66), sizeof(v__token__Kind)); - return _t66; + opt_ok(&(v__token__Kind[]) { v__token__Kind__ellipsis }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("keyword_beg"))) { - Option_v__token__Kind _t67; - opt_ok(&(v__token__Kind[]) { v__token__Kind__keyword_beg }, (Option*)(&_t67), sizeof(v__token__Kind)); - return _t67; + opt_ok(&(v__token__Kind[]) { v__token__Kind__keyword_beg }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_as"))) { - Option_v__token__Kind _t68; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_as }, (Option*)(&_t68), sizeof(v__token__Kind)); - return _t68; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_as }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_asm"))) { - Option_v__token__Kind _t69; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_asm }, (Option*)(&_t69), sizeof(v__token__Kind)); - return _t69; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_asm }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_assert"))) { - Option_v__token__Kind _t70; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_assert }, (Option*)(&_t70), sizeof(v__token__Kind)); - return _t70; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_assert }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_atomic"))) { - Option_v__token__Kind _t71; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_atomic }, (Option*)(&_t71), sizeof(v__token__Kind)); - return _t71; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_atomic }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_break"))) { - Option_v__token__Kind _t72; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_break }, (Option*)(&_t72), sizeof(v__token__Kind)); - return _t72; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_break }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_const"))) { - Option_v__token__Kind _t73; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_const }, (Option*)(&_t73), sizeof(v__token__Kind)); - return _t73; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_const }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_continue"))) { - Option_v__token__Kind _t74; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_continue }, (Option*)(&_t74), sizeof(v__token__Kind)); - return _t74; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_continue }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_defer"))) { - Option_v__token__Kind _t75; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_defer }, (Option*)(&_t75), sizeof(v__token__Kind)); - return _t75; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_defer }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_else"))) { - Option_v__token__Kind _t76; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_else }, (Option*)(&_t76), sizeof(v__token__Kind)); - return _t76; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_else }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_enum"))) { - Option_v__token__Kind _t77; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_enum }, (Option*)(&_t77), sizeof(v__token__Kind)); - return _t77; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_enum }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_false"))) { - Option_v__token__Kind _t78; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_false }, (Option*)(&_t78), sizeof(v__token__Kind)); - return _t78; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_false }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_for"))) { - Option_v__token__Kind _t79; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_for }, (Option*)(&_t79), sizeof(v__token__Kind)); - return _t79; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_for }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_fn"))) { - Option_v__token__Kind _t80; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_fn }, (Option*)(&_t80), sizeof(v__token__Kind)); - return _t80; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_fn }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_global"))) { - Option_v__token__Kind _t81; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_global }, (Option*)(&_t81), sizeof(v__token__Kind)); - return _t81; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_global }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_go"))) { - Option_v__token__Kind _t82; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_go }, (Option*)(&_t82), sizeof(v__token__Kind)); - return _t82; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_go }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_goto"))) { - Option_v__token__Kind _t83; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_goto }, (Option*)(&_t83), sizeof(v__token__Kind)); - return _t83; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_goto }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_if"))) { - Option_v__token__Kind _t84; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_if }, (Option*)(&_t84), sizeof(v__token__Kind)); - return _t84; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_if }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_import"))) { - Option_v__token__Kind _t85; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_import }, (Option*)(&_t85), sizeof(v__token__Kind)); - return _t85; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_import }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_in"))) { - Option_v__token__Kind _t86; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_in }, (Option*)(&_t86), sizeof(v__token__Kind)); - return _t86; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_in }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_interface"))) { - Option_v__token__Kind _t87; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_interface }, (Option*)(&_t87), sizeof(v__token__Kind)); - return _t87; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_interface }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_is"))) { - Option_v__token__Kind _t88; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_is }, (Option*)(&_t88), sizeof(v__token__Kind)); - return _t88; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_is }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_match"))) { - Option_v__token__Kind _t89; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_match }, (Option*)(&_t89), sizeof(v__token__Kind)); - return _t89; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_match }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_module"))) { - Option_v__token__Kind _t90; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_module }, (Option*)(&_t90), sizeof(v__token__Kind)); - return _t90; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_module }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_mut"))) { - Option_v__token__Kind _t91; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_mut }, (Option*)(&_t91), sizeof(v__token__Kind)); - return _t91; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_mut }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_shared"))) { - Option_v__token__Kind _t92; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_shared }, (Option*)(&_t92), sizeof(v__token__Kind)); - return _t92; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_shared }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_lock"))) { - Option_v__token__Kind _t93; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_lock }, (Option*)(&_t93), sizeof(v__token__Kind)); - return _t93; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_lock }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_rlock"))) { - Option_v__token__Kind _t94; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_rlock }, (Option*)(&_t94), sizeof(v__token__Kind)); - return _t94; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_rlock }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_none"))) { - Option_v__token__Kind _t95; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_none }, (Option*)(&_t95), sizeof(v__token__Kind)); - return _t95; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_none }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_return"))) { - Option_v__token__Kind _t96; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_return }, (Option*)(&_t96), sizeof(v__token__Kind)); - return _t96; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_return }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_select"))) { - Option_v__token__Kind _t97; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_select }, (Option*)(&_t97), sizeof(v__token__Kind)); - return _t97; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_select }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_sizeof"))) { - Option_v__token__Kind _t98; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_sizeof }, (Option*)(&_t98), sizeof(v__token__Kind)); - return _t98; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_sizeof }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_isreftype"))) { - Option_v__token__Kind _t99; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_isreftype }, (Option*)(&_t99), sizeof(v__token__Kind)); - return _t99; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_isreftype }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_likely"))) { - Option_v__token__Kind _t100; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_likely }, (Option*)(&_t100), sizeof(v__token__Kind)); - return _t100; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_likely }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_unlikely"))) { - Option_v__token__Kind _t101; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_unlikely }, (Option*)(&_t101), sizeof(v__token__Kind)); - return _t101; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_unlikely }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_offsetof"))) { - Option_v__token__Kind _t102; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_offsetof }, (Option*)(&_t102), sizeof(v__token__Kind)); - return _t102; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_offsetof }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_struct"))) { - Option_v__token__Kind _t103; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_struct }, (Option*)(&_t103), sizeof(v__token__Kind)); - return _t103; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_struct }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_true"))) { - Option_v__token__Kind _t104; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_true }, (Option*)(&_t104), sizeof(v__token__Kind)); - return _t104; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_true }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_type"))) { - Option_v__token__Kind _t105; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_type }, (Option*)(&_t105), sizeof(v__token__Kind)); - return _t105; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_type }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_typeof"))) { - Option_v__token__Kind _t106; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_typeof }, (Option*)(&_t106), sizeof(v__token__Kind)); - return _t106; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_typeof }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_dump"))) { - Option_v__token__Kind _t107; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_dump }, (Option*)(&_t107), sizeof(v__token__Kind)); - return _t107; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_dump }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_orelse"))) { - Option_v__token__Kind _t108; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_orelse }, (Option*)(&_t108), sizeof(v__token__Kind)); - return _t108; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_orelse }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_union"))) { - Option_v__token__Kind _t109; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_union }, (Option*)(&_t109), sizeof(v__token__Kind)); - return _t109; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_union }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_pub"))) { - Option_v__token__Kind _t110; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_pub }, (Option*)(&_t110), sizeof(v__token__Kind)); - return _t110; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_pub }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_static"))) { - Option_v__token__Kind _t111; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_static }, (Option*)(&_t111), sizeof(v__token__Kind)); - return _t111; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_static }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_volatile"))) { - Option_v__token__Kind _t112; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_volatile }, (Option*)(&_t112), sizeof(v__token__Kind)); - return _t112; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_volatile }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_unsafe"))) { - Option_v__token__Kind _t113; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_unsafe }, (Option*)(&_t113), sizeof(v__token__Kind)); - return _t113; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_unsafe }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("keyword_end"))) { - Option_v__token__Kind _t114; - opt_ok(&(v__token__Kind[]) { v__token__Kind__keyword_end }, (Option*)(&_t114), sizeof(v__token__Kind)); - return _t114; + opt_ok(&(v__token__Kind[]) { v__token__Kind__keyword_end }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("_end_"))) { - Option_v__token__Kind _t115; - opt_ok(&(v__token__Kind[]) { v__token__Kind___end_ }, (Option*)(&_t115), sizeof(v__token__Kind)); - return _t115; + opt_ok(&(v__token__Kind[]) { v__token__Kind___end_ }, (Option*)(&_t2), sizeof(v__token__Kind)); } else { - return (Option_v__token__Kind){ .state=2, .err=_v_error(_SLIT("unknown")), .data={EMPTY_STRUCT_INITIALIZATION} }; - }; - return (Option_v__token__Kind){0}; + _t2.state = 2; + _t2.err = _v_error(_SLIT("unknown")); + }Option_v__token__Kind _t1 = _t2; + return _t1; } // Attr: [inline] @@ -33238,7 +33013,7 @@ multi_return_Array_string_Array_string_Array_string Array_v__cflag__CFlag_define Array_string libs = __new_array_with_default(0, 0, sizeof(string), 0); for (int _t1 = 0; _t1 < copts_without_obj_files.len; ++_t1) { string copt = ((string*)copts_without_obj_files.data)[_t1]; - if (string_starts_with(copt, _SLIT("-l"))) { + if (string_starts_with(copt, _SLIT("-l")) || string_ends_with(copt, _SLIT(".a"))) { array_push((array*)&libs, _MOV((string[]){ string_clone(copt) })); continue; } @@ -34712,7 +34487,7 @@ void v__pref__Preferences_fill_with_defaults(v__pref__Preferences* p) { } #endif } - string vhash = _SLIT("38cceeafe"); + string vhash = _SLIT("07cab64d1"); p->cache_manager = v__vcache__new_cache_manager(new_array_from_c_array(7, 7, sizeof(string), _MOV((string[7]){string_clone(vhash), str_intp(6, _MOV((StrIntpData[]){{_SLIT0, 0xfe10, {.d_s = v__pref__Backend_str(p->backend)}}, {_SLIT(" | "), 0xfe10, {.d_s = v__pref__OS_str(p->os)}}, {_SLIT(" | "), 0xfe10, {.d_s = p->ccompiler}}, {_SLIT(" | "), 0xfe10, {.d_s = p->is_prod ? _SLIT("true") : _SLIT("false")}}, {_SLIT(" | "), 0xfe10, {.d_s = p->sanitize ? _SLIT("true") : _SLIT("false")}}, {_SLIT0, 0, { .d_c = 0 }}})), string_clone(string_trim_space(p->cflags)), string_clone(string_trim_space(p->third_party_option)), string_clone(Array_string_str(p->compile_defines_all)), string_clone(Array_string_str(p->compile_defines)), string_clone(Array_string_str(p->lookup_path))}))); if (string__eq(os__user_os(), _SLIT("windows"))) { p->use_cache = false; @@ -41436,7 +41211,7 @@ multi_return_string_bool v__ast__StringInterLiteral_get_fspec_braces(v__ast__Str break; } else if (sub_expr._typ == 252 /* v.ast.CallExpr */) { - if ((*sub_expr._v__ast__CallExpr).args.len != 0 || (*sub_expr._v__ast__CallExpr).concrete_types.len != 0) { + if ((*sub_expr._v__ast__CallExpr).args.len != 0 || (*sub_expr._v__ast__CallExpr).concrete_types.len != 0 || (*sub_expr._v__ast__CallExpr).or_block.kind == v__ast__OrKind__propagate || (*sub_expr._v__ast__CallExpr).or_block.stmts.len > 0) { needs_braces = true; } else if (((*sub_expr._v__ast__CallExpr).left)._typ == 252 /* v.ast.CallExpr */) { sub_expr = (*sub_expr._v__ast__CallExpr).left; @@ -41705,9 +41480,9 @@ string v__ast__Expr_str(v__ast__Expr x) { break; } strings__Builder_write_string(&res, _SLIT("$")); - multi_return_string_bool mr_10038 = v__ast__StringInterLiteral_get_fspec_braces(&(*x._v__ast__StringInterLiteral), i); - string fspec_str = mr_10038.arg0; - bool needs_braces = mr_10038.arg1; + multi_return_string_bool mr_10119 = v__ast__StringInterLiteral_get_fspec_braces(&(*x._v__ast__StringInterLiteral), i); + string fspec_str = mr_10119.arg0; + bool needs_braces = mr_10119.arg1; if (needs_braces) { strings__Builder_write_string(&res, _SLIT("{")); strings__Builder_write_string(&res, v__ast__Expr_str((*(v__ast__Expr*)/*ee elem_sym */array_get((*x._v__ast__StringInterLiteral).exprs, i)))); @@ -48303,12 +48078,6 @@ v__ast__Type former_expected_type; string rt = v__ast__Table_sym(c->table, right_type)->name; v__checker__Checker_error(c, str_intp(2, _MOV((StrIntpData[]){{_SLIT("negative value cannot be compared with `"), 0xfe10, {.d_s = rt}}, {_SLIT("`"), 0, { .d_c = 0 }}})), (*node->left._v__ast__IntegerLiteral).pos); } - } else if (is_left_type_signed != is_right_type_signed && !v__ast__Type_alias_eq(v__ast__Type_flip_signedness(left_type), right_type)) { - if ((is_right_type_signed && Array_int_contains(_const_v__ast__int_promoted_type_idxs, left_type)) || (is_left_type_signed && Array_int_contains(_const_v__ast__int_promoted_type_idxs, right_type))) { - string lt = v__ast__Table_sym(c->table, left_type)->name; - string rt = v__ast__Table_sym(c->table, right_type)->name; - v__checker__Checker_error(c, str_intp(3, _MOV((StrIntpData[]){{_SLIT("`"), 0xfe10, {.d_s = lt}}, {_SLIT("` cannot be compared with `"), 0xfe10, {.d_s = rt}}, {_SLIT("`"), 0, { .d_c = 0 }}})), node->pos); - } } } break; @@ -48561,8 +48330,8 @@ v__ast__Type former_expected_type; v__checker__Checker_error(c, _SLIT("array append cannot be used in an expression"), node->pos); } v__checker__Checker_check_expr_opt_call(c, node->right, right_type); - multi_return_string_v__token__Pos mr_33252 = v__checker__Checker_fail_if_immutable(c, node->left); - node->auto_locked = mr_33252.arg0; + multi_return_string_v__token__Pos mr_32778 = v__checker__Checker_fail_if_immutable(c, node->left); + node->auto_locked = mr_32778.arg0; v__ast__Type left_value_type = v__ast__Table_value_type(c->table, v__checker__Checker_unwrap_generic(c, left_type)); v__ast__TypeSymbol* left_value_sym = v__ast__Table_sym(c->table, v__checker__Checker_unwrap_generic(c, left_value_type)); if (left_value_sym->kind == v__ast__Kind__interface_) { @@ -48721,6 +48490,10 @@ v__ast__Type former_expected_type; if (typ_sym->kind == v__ast__Kind__placeholder) { v__checker__Checker_error(c, str_intp(3, _MOV((StrIntpData[]){{_SLIT0, 0xfe10, {.d_s = op}}, {_SLIT(": type `"), 0xfe10, {.d_s = typ_sym->name}}, {_SLIT("` does not exist"), 0, { .d_c = 0 }}})), v__ast__Expr_pos(right_expr)); } + if (left_sym->kind == v__ast__Kind__aggregate) { + v__ast__Type parent_left_type = (/* as */ *(v__ast__Aggregate*)__as_cast((left_sym->info)._v__ast__Aggregate,(left_sym->info)._typ, 429) /*expected idx: 429, name: v.ast.Aggregate */ ).sum_type; + left_sym = v__ast__Table_sym(c->table, parent_left_type); + } if (!(left_sym->kind == v__ast__Kind__interface_ || left_sym->kind == v__ast__Kind__sum_type)) { v__checker__Checker_error(c, str_intp(2, _MOV((StrIntpData[]){{_SLIT("`"), 0xfe10, {.d_s = op}}, {_SLIT("` can only be used with interfaces and sum types"), 0, { .d_c = 0 }}})), node->pos); } else if ((left_sym->info)._typ == 435 /* v.ast.SumType */) { @@ -48994,19 +48767,19 @@ VV_LOCAL_SYMBOL multi_return_string_v__token__Pos v__checker__Checker_fail_if_im if (v__ast__Type_has_flag(elem_type, v__ast__TypeFlag__shared_f)) { v__checker__Checker_error(c, str_intp(2, _MOV((StrIntpData[]){{_SLIT("you have to create a handle and `lock` it to modify `shared` "), 0xfe10, {.d_s = kind}}, {_SLIT(" element"), 0, { .d_c = 0 }}})), v__token__Pos_extend(v__ast__Expr_pos((*expr._v__ast__IndexExpr).left), (*expr._v__ast__IndexExpr).pos)); } - multi_return_string_v__token__Pos mr_43472 = v__checker__Checker_fail_if_immutable(c, (*expr._v__ast__IndexExpr).left); - to_lock = mr_43472.arg0; - pos = mr_43472.arg1; + multi_return_string_v__token__Pos mr_43154 = v__checker__Checker_fail_if_immutable(c, (*expr._v__ast__IndexExpr).left); + to_lock = mr_43154.arg0; + pos = mr_43154.arg1; } else if (expr._typ == 281 /* v.ast.ParExpr */) { - multi_return_string_v__token__Pos mr_43541 = v__checker__Checker_fail_if_immutable(c, (*expr._v__ast__ParExpr).expr); - to_lock = mr_43541.arg0; - pos = mr_43541.arg1; + multi_return_string_v__token__Pos mr_43223 = v__checker__Checker_fail_if_immutable(c, (*expr._v__ast__ParExpr).expr); + to_lock = mr_43223.arg0; + pos = mr_43223.arg1; } else if (expr._typ == 283 /* v.ast.PrefixExpr */) { - multi_return_string_v__token__Pos mr_43613 = v__checker__Checker_fail_if_immutable(c, (*expr._v__ast__PrefixExpr).right); - to_lock = mr_43613.arg0; - pos = mr_43613.arg1; + multi_return_string_v__token__Pos mr_43295 = v__checker__Checker_fail_if_immutable(c, (*expr._v__ast__PrefixExpr).right); + to_lock = mr_43295.arg0; + pos = mr_43295.arg1; } else if (expr._typ == 286 /* v.ast.SelectorExpr */) { if ((*expr._v__ast__SelectorExpr).expr_type == 0) { @@ -49056,9 +48829,9 @@ VV_LOCAL_SYMBOL multi_return_string_v__token__Pos v__checker__Checker_fail_if_im string type_str = v__ast__Table_type_to_str(c->table, (*expr._v__ast__SelectorExpr).expr_type); v__checker__Checker_error(c, str_intp(3, _MOV((StrIntpData[]){{_SLIT("field `"), 0xfe10, {.d_s = (*expr._v__ast__SelectorExpr).field_name}}, {_SLIT("` of struct `"), 0xfe10, {.d_s = type_str}}, {_SLIT("` is immutable"), 0, { .d_c = 0 }}})), (*expr._v__ast__SelectorExpr).pos); } - multi_return_string_v__token__Pos mr_45077 = v__checker__Checker_fail_if_immutable(c, (*expr._v__ast__SelectorExpr).expr); - to_lock = mr_45077.arg0; - pos = mr_45077.arg1; + multi_return_string_v__token__Pos mr_44759 = v__checker__Checker_fail_if_immutable(c, (*expr._v__ast__SelectorExpr).expr); + to_lock = mr_44759.arg0; + pos = mr_44759.arg1; } if ((to_lock).len != 0) { explicit_lock_needed = true; @@ -49164,9 +48937,9 @@ VV_LOCAL_SYMBOL multi_return_string_v__token__Pos v__checker__Checker_fail_if_im } else if (expr._typ == 252 /* v.ast.CallExpr */) { if (string__eq((*expr._v__ast__CallExpr).name, _SLIT("slice"))) { - multi_return_string_v__token__Pos mr_46900 = v__checker__Checker_fail_if_immutable(c, (*expr._v__ast__CallExpr).left); - to_lock = mr_46900.arg0; - pos = mr_46900.arg1; + multi_return_string_v__token__Pos mr_46582 = v__checker__Checker_fail_if_immutable(c, (*expr._v__ast__CallExpr).left); + to_lock = mr_46582.arg0; + pos = mr_46582.arg1; if ((to_lock).len != 0) { explicit_lock_needed = true; } @@ -49571,9 +49344,9 @@ v__ast__Type v__checker__Checker_selector_expr(v__checker__Checker* c, v__ast__S *(multi_return_v__ast__StructField_Array_v__ast__Type*) _t13.data = (multi_return_v__ast__StructField_Array_v__ast__Type){.arg0=((v__ast__StructField){.pos = (v__token__Pos){.len = 0,.line_nr = 0,.pos = 0,.col = 0,.last_line = 0,},.type_pos = (v__token__Pos){.len = 0,.line_nr = 0,.pos = 0,.col = 0,.last_line = 0,},.comments = __new_array(0, 0, sizeof(v__ast__Comment)),.has_default_expr = 0,.attrs = __new_array(0, 0, sizeof(v__ast__Attr)),.is_pub = 0,.default_val = (string){.str=(byteptr)"", .is_lit=1},.is_mut = 0,.is_global = 0,.is_volatile = 0,.default_expr = {0},.default_expr_typ = 0,.name = (string){.str=(byteptr)"", .is_lit=1},.typ = 0,}),.arg1=__new_array_with_default(0, 0, sizeof(v__ast__Type), 0)}; } - multi_return_v__ast__StructField_Array_v__ast__Type mr_60008 = (*(multi_return_v__ast__StructField_Array_v__ast__Type*)_t13.data); - field = mr_60008.arg0; - embed_types = mr_60008.arg1; + multi_return_v__ast__StructField_Array_v__ast__Type mr_59690 = (*(multi_return_v__ast__StructField_Array_v__ast__Type*)_t13.data); + field = mr_59690.arg0; + embed_types = mr_59690.arg1; node->from_embed_types = embed_types; if (sym->kind == v__ast__Kind__aggregate || sym->kind == v__ast__Kind__sum_type) { unknown_field_msg = IError_name_table[err._typ]._method_msg(err._object); @@ -49607,9 +49380,9 @@ v__ast__Type v__checker__Checker_selector_expr(v__checker__Checker* c, v__ast__S *(multi_return_v__ast__StructField_Array_v__ast__Type*) _t15.data = (multi_return_v__ast__StructField_Array_v__ast__Type){.arg0=((v__ast__StructField){.pos = (v__token__Pos){.len = 0,.line_nr = 0,.pos = 0,.col = 0,.last_line = 0,},.type_pos = (v__token__Pos){.len = 0,.line_nr = 0,.pos = 0,.col = 0,.last_line = 0,},.comments = __new_array(0, 0, sizeof(v__ast__Comment)),.has_default_expr = 0,.attrs = __new_array(0, 0, sizeof(v__ast__Attr)),.is_pub = 0,.default_val = (string){.str=(byteptr)"", .is_lit=1},.is_mut = 0,.is_global = 0,.is_volatile = 0,.default_expr = {0},.default_expr_typ = 0,.name = (string){.str=(byteptr)"", .is_lit=1},.typ = 0,}),.arg1=__new_array_with_default(0, 0, sizeof(v__ast__Type), 0)}; } - multi_return_v__ast__StructField_Array_v__ast__Type mr_60839 = (*(multi_return_v__ast__StructField_Array_v__ast__Type*)_t15.data); - field = mr_60839.arg0; - embed_types = mr_60839.arg1; + multi_return_v__ast__StructField_Array_v__ast__Type mr_60521 = (*(multi_return_v__ast__StructField_Array_v__ast__Type*)_t15.data); + field = mr_60521.arg0; + embed_types = mr_60521.arg1; node->from_embed_types = embed_types; } } @@ -51813,8 +51586,8 @@ v__ast__Type v__checker__Checker_postfix_expr(v__checker__Checker* c, v__ast__Po string typ_str = v__ast__Table_type_to_str(c->table, typ); v__checker__Checker_error(c, str_intp(3, _MOV((StrIntpData[]){{_SLIT("invalid operation: "), 0xfe10, {.d_s = v__token__Kind_str(node->op)}}, {_SLIT(" (non-numeric type `"), 0xfe10, {.d_s = typ_str}}, {_SLIT("`)"), 0, { .d_c = 0 }}})), node->pos); } else { - multi_return_string_v__token__Pos mr_114290 = v__checker__Checker_fail_if_immutable(c, node->expr); - node->auto_locked = mr_114290.arg0; + multi_return_string_v__token__Pos mr_113972 = v__checker__Checker_fail_if_immutable(c, node->expr); + node->auto_locked = mr_113972.arg0; } v__ast__Type _t1 = typ; return _t1; @@ -54800,6 +54573,9 @@ v__ast__Scope* prev_fn_scope; if (Array_string_contains(_const_v__checker__reserved_type_names, param->name)) { v__checker__Checker_error(c, str_intp(2, _MOV((StrIntpData[]){{_SLIT("invalid use of reserved type `"), 0xfe10, {.d_s = param->name}}, {_SLIT("` as a parameter name"), 0, { .d_c = 0 }}})), param->pos); } + if (v__ast__Type_has_flag(param->typ, v__ast__TypeFlag__optional)) { + v__checker__Checker_error(c, _SLIT("optional type argument is not supported currently"), param->type_pos); + } if (!v__ast__Type_is_ptr(param->typ)) { v__ast__TypeSymbol* arg_typ_sym = v__ast__Table_sym(c->table, param->typ); if (arg_typ_sym->kind == v__ast__Kind__struct_) { @@ -55449,9 +55225,9 @@ v__ast__Type v__checker__Checker_fn_call(v__checker__Checker* c, v__ast__CallExp v__checker__Checker_error(c, _SLIT("function with `shared` arguments cannot be called inside `lock`/`rlock` block"), call_arg->pos); } if (call_arg->is_mut) { - multi_return_string_v__token__Pos mr_28446 = v__checker__Checker_fail_if_immutable(c, call_arg->expr); - string to_lock = mr_28446.arg0; - v__token__Pos pos = mr_28446.arg1; + multi_return_string_v__token__Pos mr_28570 = v__checker__Checker_fail_if_immutable(c, call_arg->expr); + string to_lock = mr_28570.arg0; + v__token__Pos pos = mr_28570.arg1; if (!v__ast__Expr_is_lvalue(call_arg->expr)) { v__checker__Checker_error(c, _SLIT("cannot pass expression as `mut`"), v__ast__Expr_pos(call_arg->expr)); } @@ -55794,9 +55570,9 @@ v__ast__Type v__checker__Checker_method_call(v__checker__Checker* c, v__ast__Cal *(multi_return_v__ast__Fn_Array_v__ast__Type*) _t22.data = (multi_return_v__ast__Fn_Array_v__ast__Type){.arg0=((v__ast__Fn){.is_variadic = 0,.language = 0,.is_pub = 0,.is_ctor_new = 0,.is_deprecated = 0,.is_noreturn = 0,.is_unsafe = 0,.is_placeholder = 0,.is_main = 0,.is_test = 0,.is_keep_alive = 0,.is_method = 0,.no_body = 0,.mod = (string){.str=(byteptr)"", .is_lit=1},.file = (string){.str=(byteptr)"", .is_lit=1},.file_mode = 0,.pos = (v__token__Pos){.len = 0,.line_nr = 0,.pos = 0,.col = 0,.last_line = 0,},.return_type_pos = (v__token__Pos){.len = 0,.line_nr = 0,.pos = 0,.col = 0,.last_line = 0,},.return_type = 0,.receiver_type = 0,.name = (string){.str=(byteptr)"", .is_lit=1},.params = __new_array(0, 0, sizeof(v__ast__Param)),.source_fn = 0,.usages = 0,.generic_names = __new_array(0, 0, sizeof(string)),.attrs = __new_array(0, 0, sizeof(v__ast__Attr)),.is_conditional = 0,.ctdefine_idx = 0,}),.arg1=__new_array_with_default(0, 0, sizeof(v__ast__Type), 0)}; } - multi_return_v__ast__Fn_Array_v__ast__Type mr_41665 = (*(multi_return_v__ast__Fn_Array_v__ast__Type*)_t22.data); - method = mr_41665.arg0; - embed_types = mr_41665.arg1; + multi_return_v__ast__Fn_Array_v__ast__Type mr_41789 = (*(multi_return_v__ast__Fn_Array_v__ast__Type*)_t22.data); + method = mr_41789.arg0; + embed_types = mr_41789.arg1; if (embed_types.len != 0) { is_method_from_embed = true; node->from_embed_types = embed_types; @@ -55817,9 +55593,9 @@ v__ast__Type v__checker__Checker_method_call(v__checker__Checker* c, v__ast__Cal v__checker__Checker_error(c, _SLIT("method with `shared` receiver cannot be called inside `lock`/`rlock` block"), node->pos); } if ((*(v__ast__Param*)/*ee elem_sym */array_get(method.params, 0)).is_mut) { - multi_return_string_v__token__Pos mr_42796 = v__checker__Checker_fail_if_immutable(c, node->left); - string to_lock = mr_42796.arg0; - v__token__Pos pos = mr_42796.arg1; + multi_return_string_v__token__Pos mr_42920 = v__checker__Checker_fail_if_immutable(c, node->left); + string to_lock = mr_42920.arg0; + v__token__Pos pos = mr_42920.arg1; if (!v__ast__Expr_is_lvalue(node->left)) { v__checker__Checker_error(c, _SLIT("cannot pass expression as `mut`"), v__ast__Expr_pos(node->left)); } @@ -55921,9 +55697,9 @@ v__ast__Type v__checker__Checker_method_call(v__checker__Checker* c, v__ast__Cal v__checker__Checker_error(c, _SLIT("method with `shared` arguments cannot be called inside `lock`/`rlock` block"), arg->pos); } if (arg->is_mut) { - multi_return_string_v__token__Pos mr_46810 = v__checker__Checker_fail_if_immutable(c, arg->expr); - string to_lock = mr_46810.arg0; - v__token__Pos pos = mr_46810.arg1; + multi_return_string_v__token__Pos mr_46934 = v__checker__Checker_fail_if_immutable(c, arg->expr); + string to_lock = mr_46934.arg0; + v__token__Pos pos = mr_46934.arg1; if (!param_is_mut) { string tok = v__ast__ShareType_str(arg->share); v__checker__Checker_error(c, str_intp(5, _MOV((StrIntpData[]){{_SLIT("`"), 0xfe10, {.d_s = node->name}}, {_SLIT("` parameter `"), 0xfe10, {.d_s = param.name}}, {_SLIT("` is not `"), 0xfe10, {.d_s = tok}}, {_SLIT("`, `"), 0xfe10, {.d_s = tok}}, {_SLIT("` is not needed`"), 0, { .d_c = 0 }}})), v__ast__Expr_pos(arg->expr)); @@ -56105,8 +55881,8 @@ v__ast__Type v__checker__Checker_method_call(v__checker__Checker* c, v__ast__Cal return _t43; } - multi_return_v__ast__StructField_Array_v__ast__Type mr_53710 = (*(multi_return_v__ast__StructField_Array_v__ast__Type*)_t42.data); - node->from_embed_types = mr_53710.arg1; + multi_return_v__ast__StructField_Array_v__ast__Type mr_53834 = (*(multi_return_v__ast__StructField_Array_v__ast__Type*)_t42.data); + node->from_embed_types = mr_53834.arg1; v__ast__Type _t44 = info.func.return_type; return _t44; } @@ -56963,6 +56739,9 @@ VV_LOCAL_SYMBOL void v__checker__Checker_smartcast_if_conds(v__checker__Checker* v__ast__TypeSymbol* left_sym = v__ast__Table_sym(c->table, (*node._v__ast__InfixExpr).left_type); v__ast__TypeSymbol* right_sym = v__ast__Table_sym(c->table, right_type); v__ast__Type expr_type = v__checker__Checker_unwrap_generic(c, v__checker__Checker_expr(c, (*node._v__ast__InfixExpr).left)); + if (left_sym->kind == v__ast__Kind__aggregate) { + expr_type = (/* as */ *(v__ast__Aggregate*)__as_cast((left_sym->info)._v__ast__Aggregate,(left_sym->info)._typ, 429) /*expected idx: 429, name: v.ast.Aggregate */ ).sum_type; + } if (left_sym->kind == v__ast__Kind__interface_) { if (right_sym->kind != v__ast__Kind__interface_) { v__checker__Checker_type_implements(c, right_type, expr_type, (*node._v__ast__InfixExpr).pos); @@ -57601,7 +57380,7 @@ VV_LOCAL_SYMBOL void v__checker__Checker_match_exprs(v__checker__Checker* c, v__ v__ast__Type ti = it.typ; array_push((array*)&_t4, &ti); } - expr_type = v__ast__Table_register_sym(c->table, ((v__ast__TypeSymbol){.parent_idx = 0,.info = v__ast__Aggregate_to_sumtype_v__ast__TypeInfo(ADDR(v__ast__Aggregate, (((v__ast__Aggregate){.fields = __new_array(0, 0, sizeof(v__ast__StructField)),.types =_t4,})))),.kind = v__ast__Kind__aggregate,.name = name,.cname = strings__Builder_str(&agg_cname),.methods = __new_array(0, 0, sizeof(v__ast__Fn)),.mod = c->mod,.is_pub = 0,.language = 0,.idx = 0,})); + expr_type = v__ast__Table_register_sym(c->table, ((v__ast__TypeSymbol){.parent_idx = 0,.info = v__ast__Aggregate_to_sumtype_v__ast__TypeInfo(ADDR(v__ast__Aggregate, (((v__ast__Aggregate){.fields = __new_array(0, 0, sizeof(v__ast__StructField)),.sum_type = node->cond_type,.types =_t4,})))),.kind = v__ast__Kind__aggregate,.name = name,.cname = strings__Builder_str(&agg_cname),.methods = __new_array(0, 0, sizeof(v__ast__Fn)),.mod = c->mod,.is_pub = 0,.language = 0,.idx = 0,})); } } else { expr_type = (*(v__ast__TypeNode*)/*ee elem_sym */array_get(expr_types, 0)).typ; @@ -57977,20 +57756,23 @@ void v__checker__Checker_return_stmt(v__checker__Checker* c, v__ast__Return* nod } } Array_v__ast__Type got_types = __new_array_with_default(0, 0, sizeof(v__ast__Type), 0); - for (int _t3 = 0; _t3 < node->exprs.len; ++_t3) { - v__ast__Expr expr = ((v__ast__Expr*)node->exprs.data)[_t3]; + Array_int expr_idxs = __new_array_with_default(0, 0, sizeof(int), 0); + for (int i = 0; i < node->exprs.len; ++i) { + v__ast__Expr expr = ((v__ast__Expr*)node->exprs.data)[i]; v__ast__Type typ = v__checker__Checker_expr(c, expr); if (v__ast__Type_alias_eq(typ, _const_v__ast__void_type)) { v__checker__Checker_error(c, str_intp(2, _MOV((StrIntpData[]){{_SLIT("`"), 0xfe10, {.d_s = v__ast__Expr_str(expr)}}, {_SLIT("` used as value"), 0, { .d_c = 0 }}})), node->pos); } v__ast__TypeSymbol* sym = v__ast__Table_sym(c->table, typ); if (sym->kind == v__ast__Kind__multi_return) { - for (int _t4 = 0; _t4 < v__ast__TypeSymbol_mr_info(sym).types.len; ++_t4) { - v__ast__Type t = ((v__ast__Type*)v__ast__TypeSymbol_mr_info(sym).types.data)[_t4]; + for (int _t3 = 0; _t3 < v__ast__TypeSymbol_mr_info(sym).types.len; ++_t3) { + v__ast__Type t = ((v__ast__Type*)v__ast__TypeSymbol_mr_info(sym).types.data)[_t3]; array_push((array*)&got_types, _MOV((v__ast__Type[]){ t })); + array_push((array*)&expr_idxs, _MOV((int[]){ i })); } } else { array_push((array*)&got_types, _MOV((v__ast__Type[]){ typ })); + array_push((array*)&expr_idxs, _MOV((int[]){ i })); } } node->types = got_types; @@ -57998,19 +57780,19 @@ void v__checker__Checker_return_stmt(v__checker__Checker* c, v__ast__Return* nod { v__ast__FnDecl* cfn = c->table->cur_fn; if (cfn->is_manualfree) { - Array_string _t7 = {0}; - Array_v__ast__Param _t7_orig = cfn->params; - int _t7_len = _t7_orig.len; - _t7 = __new_array(0, _t7_len, sizeof(string)); + Array_string _t8 = {0}; + Array_v__ast__Param _t8_orig = cfn->params; + int _t8_len = _t8_orig.len; + _t8 = __new_array(0, _t8_len, sizeof(string)); - for (int _t8 = 0; _t8 < _t7_len; ++_t8) { - v__ast__Param it = ((v__ast__Param*) _t7_orig.data)[_t8]; + for (int _t9 = 0; _t9 < _t8_len; ++_t9) { + v__ast__Param it = ((v__ast__Param*) _t8_orig.data)[_t9]; string ti = it.name; - array_push((array*)&_t7, &ti); + array_push((array*)&_t8, &ti); } - Array_string pnames =_t7; - for (int _t9 = 0; _t9 < node->exprs.len; ++_t9) { - v__ast__Expr expr = ((v__ast__Expr*)node->exprs.data)[_t9]; + Array_string pnames =_t8; + for (int _t10 = 0; _t10 < node->exprs.len; ++_t10) { + v__ast__Expr expr = ((v__ast__Expr*)node->exprs.data)[_t10]; if ((expr)._typ == 266 /* v.ast.Ident */) { if (Array_string_contains(pnames, (*expr._v__ast__Ident).name)) { v__checker__Checker_note(c, _SLIT("returning a parameter in a fn marked with `[manualfree]` can cause double freeing in the caller"), node->pos); @@ -58037,7 +57819,7 @@ void v__checker__Checker_return_stmt(v__checker__Checker* c, v__ast__Return* nod v__ast__Type exp_type = ((v__ast__Type*)expected_types.data)[i]; v__ast__Type got_typ = v__checker__Checker_unwrap_generic(c, (*(v__ast__Type*)/*ee elem_sym */array_get(got_types, i))); if (v__ast__Type_has_flag(got_typ, v__ast__TypeFlag__optional) && (!v__ast__Type_has_flag(exp_type, v__ast__TypeFlag__optional) || !string__eq(v__ast__Table_type_to_str(c->table, got_typ), v__ast__Table_type_to_str(c->table, exp_type)))) { - v__token__Pos pos = v__ast__Expr_pos((*(v__ast__Expr*)/*ee elem_sym */array_get(node->exprs, i))); + v__token__Pos pos = v__ast__Expr_pos((*(v__ast__Expr*)/*ee elem_sym */array_get(node->exprs, (*(int*)/*ee elem_sym */array_get(expr_idxs, i))))); v__checker__Checker_error(c, str_intp(3, _MOV((StrIntpData[]){{_SLIT("cannot use `"), 0xfe10, {.d_s = v__ast__Table_type_to_str(c->table, got_typ)}}, {_SLIT("` as type `"), 0xfe10, {.d_s = v__ast__Table_type_to_str(c->table, exp_type)}}, {_SLIT("` in return argument"), 0, { .d_c = 0 }}})), pos); } if (!v__checker__Checker_check_types(c, got_typ, exp_type)) { @@ -58046,24 +57828,24 @@ void v__checker__Checker_return_stmt(v__checker__Checker* c, v__ast__Return* nod if (exp_typ_sym->kind == v__ast__Kind__interface_) { if (v__checker__Checker_type_implements(c, got_typ, exp_type, node->pos)) { if (!v__ast__Type_is_ptr(got_typ) && !v__ast__Type_is_pointer(got_typ) && got_typ_sym->kind != v__ast__Kind__interface_ && !c->inside_unsafe) { - v__checker__Checker_mark_as_referenced(c, &(*(v__ast__Expr*)/*ee elem_sym */array_get(node->exprs, i)), true); + v__checker__Checker_mark_as_referenced(c, &(*(v__ast__Expr*)/*ee elem_sym */array_get(node->exprs, (*(int*)/*ee elem_sym */array_get(expr_idxs, i)))), true); } } continue; } - v__token__Pos pos = v__ast__Expr_pos((*(v__ast__Expr*)/*ee elem_sym */array_get(node->exprs, i))); + v__token__Pos pos = v__ast__Expr_pos((*(v__ast__Expr*)/*ee elem_sym */array_get(node->exprs, (*(int*)/*ee elem_sym */array_get(expr_idxs, i))))); v__checker__Checker_error(c, str_intp(3, _MOV((StrIntpData[]){{_SLIT("cannot use `"), 0xfe10, {.d_s = got_typ_sym->name}}, {_SLIT("` as type `"), 0xfe10, {.d_s = v__ast__Table_type_to_str(c->table, exp_type)}}, {_SLIT("` in return argument"), 0, { .d_c = 0 }}})), pos); } if ((v__ast__Type_is_ptr(got_typ) || v__ast__Type_is_pointer(got_typ)) && (!v__ast__Type_is_ptr(exp_type) && !v__ast__Type_is_pointer(exp_type))) { - v__token__Pos pos = v__ast__Expr_pos((*(v__ast__Expr*)/*ee elem_sym */array_get(node->exprs, i))); - if (v__ast__Expr_is_auto_deref_var((*(v__ast__Expr*)/*ee elem_sym */array_get(node->exprs, i)))) { + v__token__Pos pos = v__ast__Expr_pos((*(v__ast__Expr*)/*ee elem_sym */array_get(node->exprs, (*(int*)/*ee elem_sym */array_get(expr_idxs, i))))); + if (v__ast__Expr_is_auto_deref_var((*(v__ast__Expr*)/*ee elem_sym */array_get(node->exprs, (*(int*)/*ee elem_sym */array_get(expr_idxs, i)))))) { continue; } v__checker__Checker_error(c, str_intp(4, _MOV((StrIntpData[]){{_SLIT("fn `"), 0xfe10, {.d_s = c->table->cur_fn->name}}, {_SLIT("` expects you to return a non reference type `"), 0xfe10, {.d_s = v__ast__Table_type_to_str(c->table, exp_type)}}, {_SLIT("`, but you are returning `"), 0xfe10, {.d_s = v__ast__Table_type_to_str(c->table, got_typ)}}, {_SLIT("` instead"), 0, { .d_c = 0 }}})), pos); } if ((v__ast__Type_is_ptr(exp_type) || v__ast__Type_is_pointer(exp_type)) && (!v__ast__Type_is_ptr(got_typ) && !v__ast__Type_is_pointer(got_typ)) && !v__ast__Type_alias_eq(got_typ, _const_v__ast__int_literal_type) && !c->pref->translated && !c->file->is_translated) { - v__token__Pos pos = v__ast__Expr_pos((*(v__ast__Expr*)/*ee elem_sym */array_get(node->exprs, i))); - if (v__ast__Expr_is_auto_deref_var((*(v__ast__Expr*)/*ee elem_sym */array_get(node->exprs, i)))) { + v__token__Pos pos = v__ast__Expr_pos((*(v__ast__Expr*)/*ee elem_sym */array_get(node->exprs, (*(int*)/*ee elem_sym */array_get(expr_idxs, i))))); + if (v__ast__Expr_is_auto_deref_var((*(v__ast__Expr*)/*ee elem_sym */array_get(node->exprs, (*(int*)/*ee elem_sym */array_get(expr_idxs, i)))))) { continue; } v__checker__Checker_error(c, str_intp(4, _MOV((StrIntpData[]){{_SLIT("fn `"), 0xfe10, {.d_s = c->table->cur_fn->name}}, {_SLIT("` expects you to return a reference type `"), 0xfe10, {.d_s = v__ast__Table_type_to_str(c->table, exp_type)}}, {_SLIT("`, but you are returning `"), 0xfe10, {.d_s = v__ast__Table_type_to_str(c->table, got_typ)}}, {_SLIT("` instead"), 0, { .d_c = 0 }}})), pos); @@ -58074,13 +57856,13 @@ void v__checker__Checker_return_stmt(v__checker__Checker* c, v__ast__Return* nod if (((*r_expr->_v__ast__Ident).obj)._typ == 324 /* v.ast.Var */) { v__ast__Var* obj = &(*(*r_expr->_v__ast__Ident).obj._v__ast__Var); if (c->fn_scope != ((voidptr)(0))) { - Option_v__ast__Var_ptr _t10 = v__ast__Scope_find_var(c->fn_scope, (*(*r_expr->_v__ast__Ident).obj._v__ast__Var).name); - if (_t10.state != 0) { /*or block*/ - IError err = _t10.err; - *(v__ast__Var**) _t10.data = obj; + Option_v__ast__Var_ptr _t11 = v__ast__Scope_find_var(c->fn_scope, (*(*r_expr->_v__ast__Ident).obj._v__ast__Var).name); + if (_t11.state != 0) { /*or block*/ + IError err = _t11.err; + *(v__ast__Var**) _t11.data = obj; } - obj = (*(v__ast__Var**)_t10.data); + obj = (*(v__ast__Var**)_t11.data); } if (obj->is_stack_obj && !c->inside_unsafe) { v__ast__TypeSymbol* type_sym = v__ast__Table_sym(c->table, v__ast__Type_set_nr_muls(obj->typ, 0)); @@ -76593,22 +76375,31 @@ VV_LOCAL_SYMBOL void v__gen__c__Gen_infix_expr_in_optimization(v__gen__c__Gen* g } VV_LOCAL_SYMBOL void v__gen__c__Gen_infix_expr_is_op(v__gen__c__Gen* g, v__ast__InfixExpr node) { - v__ast__TypeSymbol* sym = v__ast__Table_sym(g->table, node.left_type); + v__ast__TypeSymbol* left_sym = v__ast__Table_sym(g->table, node.left_type); + bool is_aggregate = left_sym->kind == v__ast__Kind__aggregate; + if (is_aggregate) { + v__ast__Type parent_left_type = (/* as */ *(v__ast__Aggregate*)__as_cast((left_sym->info)._v__ast__Aggregate,(left_sym->info)._typ, 429) /*expected idx: 429, name: v.ast.Aggregate */ ).sum_type; + left_sym = v__ast__Table_sym(g->table, parent_left_type); + } v__ast__TypeSymbol* right_sym = v__ast__Table_sym(g->table, node.right_type); - if (sym->kind == v__ast__Kind__interface_ && right_sym->kind == v__ast__Kind__interface_) { + if (left_sym->kind == v__ast__Kind__interface_ && right_sym->kind == v__ast__Kind__interface_) { v__gen__c__Gen_gen_interface_is_op(g, node); return; } string cmp_op = (node.op == v__token__Kind__key_is ? (_SLIT("==")) : (_SLIT("!="))); v__gen__c__Gen_write(g, _SLIT("(")); - v__gen__c__Gen_expr(g, node.left); + if (is_aggregate) { + v__gen__c__Gen_write(g, str_intp(2, _MOV((StrIntpData[]){{_SLIT0, 0xfe10, {.d_s = v__ast__Expr_str(node.left)}}, {_SLIT0, 0, { .d_c = 0 }}}))); + } else { + v__gen__c__Gen_expr(g, node.left); + } v__gen__c__Gen_write(g, _SLIT(")")); if (v__ast__Type_is_ptr(node.left_type)) { v__gen__c__Gen_write(g, _SLIT("->")); } else { v__gen__c__Gen_write(g, _SLIT(".")); } - if (sym->kind == v__ast__Kind__interface_) { + if (left_sym->kind == v__ast__Kind__interface_) { v__gen__c__Gen_write(g, str_intp(2, _MOV((StrIntpData[]){{_SLIT("_typ "), 0xfe10, {.d_s = cmp_op}}, {_SLIT(" "), 0, { .d_c = 0 }}}))); v__ast__Type _t1 = 0; if (node.right._typ == 292 /* v.ast.TypeNode */) { @@ -76623,9 +76414,9 @@ VV_LOCAL_SYMBOL void v__gen__c__Gen_infix_expr_is_op(v__gen__c__Gen* g, v__ast__ } v__ast__Type sub_type = _t1; v__ast__TypeSymbol* sub_sym = v__ast__Table_sym(g->table, sub_type); - v__gen__c__Gen_write(g, str_intp(3, _MOV((StrIntpData[]){{_SLIT("_"), 0xfe10, {.d_s = sym->cname}}, {_SLIT("_"), 0xfe10, {.d_s = sub_sym->cname}}, {_SLIT("_index"), 0, { .d_c = 0 }}}))); + v__gen__c__Gen_write(g, str_intp(3, _MOV((StrIntpData[]){{_SLIT("_"), 0xfe10, {.d_s = left_sym->cname}}, {_SLIT("_"), 0xfe10, {.d_s = sub_sym->cname}}, {_SLIT("_index"), 0, { .d_c = 0 }}}))); return; - } else if (sym->kind == v__ast__Kind__sum_type) { + } else if (left_sym->kind == v__ast__Kind__sum_type) { v__gen__c__Gen_write(g, str_intp(2, _MOV((StrIntpData[]){{_SLIT("_typ "), 0xfe10, {.d_s = cmp_op}}, {_SLIT(" "), 0, { .d_c = 0 }}}))); } v__gen__c__Gen_expr(g, node.right); @@ -94655,7 +94446,6 @@ void _vinit(int ___argc, voidptr ___argv) { _const_v__token__assign_tokens = new_array_from_c_array(12, 12, sizeof(v__token__Kind), _MOV((v__token__Kind[12]){ v__token__Kind__assign, v__token__Kind__plus_assign, v__token__Kind__minus_assign, v__token__Kind__mult_assign, v__token__Kind__div_assign, v__token__Kind__xor_assign, v__token__Kind__mod_assign, v__token__Kind__or_assign, v__token__Kind__and_assign, v__token__Kind__right_shift_assign, v__token__Kind__left_shift_assign, v__token__Kind__unsigned_right_shift_assign})); - _const_v__token__nr_tokens = ((int)(v__token__Kind___end_)); _const_v__token__valid_at_tokens = new_array_from_c_array(13, 13, sizeof(string), _MOV((string[13]){ _SLIT("@VROOT"), _SLIT("@VMODROOT"), _SLIT("@VEXEROOT"), _SLIT("@FN"), _SLIT("@METHOD"), _SLIT("@MOD"), _SLIT("@STRUCT"), _SLIT("@VEXE"), _SLIT("@FILE"), _SLIT("@LINE"), _SLIT("@COLUMN"), _SLIT("@VHASH"), _SLIT("@VMOD_FILE")})); diff --git a/v_win.c b/v_win.c index 8042f83..a19891b 100644 --- a/v_win.c +++ b/v_win.c @@ -1,11 +1,11 @@ -#define V_COMMIT_HASH "07cab64d1" +#define V_COMMIT_HASH "32d7ae783" #ifndef V_COMMIT_HASH - #define V_COMMIT_HASH "38cceeafe" + #define V_COMMIT_HASH "07cab64d1" #endif #ifndef V_CURRENT_COMMIT_HASH - #define V_CURRENT_COMMIT_HASH "07cab64" + #define V_CURRENT_COMMIT_HASH "32d7ae7" #endif // V comptime_definitions: @@ -3382,6 +3382,7 @@ struct v__ast__TypeSymbol { struct v__ast__Aggregate { Array_v__ast__StructField fields; + v__ast__Type sum_type; Array_v__ast__Type types; }; @@ -7138,13 +7139,12 @@ v__token__Pos v__token__Pos_extend_with_last_line(v__token__Pos pos, v__token__P void v__token__Pos_update_last_line(v__token__Pos* pos, int last_line); v__token__Pos v__token__Token_pos(v__token__Token* tok); Array_v__token__Kind _const_v__token__assign_tokens; // inited later -int _const_v__token__nr_tokens; // inited later Array_string _const_v__token__valid_at_tokens; // inited later -VV_LOCAL_SYMBOL Map_string_v__token__Kind v__token__build_keys(void); -VV_LOCAL_SYMBOL Array_string v__token__build_token_str(void); Array_string _const_v__token__token_str; // inited later Map_string_v__token__Kind _const_v__token__keywords; // inited later v__token__KeywordsMatcher _const_v__token__matcher; // inited later +VV_LOCAL_SYMBOL Map_string_v__token__Kind v__token__build_keys(void); +VV_LOCAL_SYMBOL Array_string v__token__build_token_str(void); bool v__token__is_key(string key); bool v__token__is_decl(v__token__Kind t); bool v__token__Kind_is_assign(v__token__Kind t); @@ -10664,13 +10664,16 @@ static string indent_v__ast__OrExpr_str(v__ast__OrExpr it, int indent_count) { static string indent_v__ast__Aggregate_str(v__ast__Aggregate it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); string _t30 = indent_Array_v__ast__StructField_str(it.fields, indent_count + 1); - string _t31 = indent_Array_v__ast__Type_str(it.types, indent_count + 1); - string res = str_intp( 11, _MOV((StrIntpData[]){ + string _t31 = v__ast__Type_str(it.sum_type); + string _t32 = indent_Array_v__ast__Type_str(it.types, indent_count + 1); + string res = str_intp( 15, _MOV((StrIntpData[]){ {_SLIT("v.ast.Aggregate{\n"), 0, {.d_c=0}}, {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" fields: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t30}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t31}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" sum_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t31}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t32}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); + string_free(&_t32); string_free(&_t31); string_free(&_t30); string_free(&indents); @@ -10679,89 +10682,74 @@ static string indent_v__ast__Aggregate_str(v__ast__Aggregate it, int indent_coun static string indent_v__ast__Alias_str(v__ast__Alias it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); - string _t32 = v__ast__Type_str(it.parent_type); - string _t33 = v__ast__Language_str(it.language); + string _t33 = v__ast__Type_str(it.parent_type); + string _t34 = v__ast__Language_str(it.language); string res = str_intp( 15, _MOV((StrIntpData[]){ {_SLIT("v.ast.Alias{\n"), 0, {.d_c=0}}, - {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" parent_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t32}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" language: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t33}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" parent_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t33}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" language: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t34}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_import: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_import ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); + string_free(&_t34); string_free(&_t33); - string_free(&_t32); string_free(&indents); return res; } static string indent_v__ast__Array_str(v__ast__Array it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); - string _t34 = v__ast__Type_str(it.elem_type); + string _t35 = v__ast__Type_str(it.elem_type); string res = str_intp( 11, _MOV((StrIntpData[]){ {_SLIT("v.ast.Array{\n"), 0, {.d_c=0}}, {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" nr_dims: "), 0, {.d_c=0}}, {_SLIT(""), 7, {.d_i32=it.nr_dims}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" elem_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t34}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" elem_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t35}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); - string_free(&_t34); + string_free(&_t35); string_free(&indents); return res; } static string indent_v__ast__ArrayFixed_str(v__ast__ArrayFixed it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); - string _t35 = v__ast__Expr_str(it.size_expr); - string _t36 = v__ast__Type_str(it.elem_type); + string _t36 = v__ast__Expr_str(it.size_expr); + string _t37 = v__ast__Type_str(it.elem_type); string res = str_intp( 15, _MOV((StrIntpData[]){ {_SLIT("v.ast.ArrayFixed{\n"), 0, {.d_c=0}}, {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" size: "), 0, {.d_c=0}}, {_SLIT(""), 7, {.d_i32=it.size}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" size_expr: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t35}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" elem_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t36}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" size_expr: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t36}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" elem_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t37}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); + string_free(&_t37); string_free(&_t36); - string_free(&_t35); string_free(&indents); return res; } static string indent_v__ast__Chan_str(v__ast__Chan it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); - string _t37 = v__ast__Type_str(it.elem_type); + string _t38 = v__ast__Type_str(it.elem_type); string res = str_intp( 11, _MOV((StrIntpData[]){ {_SLIT("v.ast.Chan{\n"), 0, {.d_c=0}}, - {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" elem_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t37}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" elem_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t38}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_mut: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_mut ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); - string_free(&_t37); - string_free(&indents); - return res; -} - -static string indent_v__ast__Enum_str(v__ast__Enum it, int indent_count) { - string indents = string_repeat(_SLIT(" "), indent_count); - string _t38 = Array_string_str(it.vals); - string res = str_intp( 15, _MOV((StrIntpData[]){ - {_SLIT("v.ast.Enum{\n"), 0, {.d_c=0}}, - {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" vals: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t38}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_flag: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_flag ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_multi_allowed: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_multi_allowed ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, - })); string_free(&_t38); string_free(&indents); return res; } -static string indent_v__ast__FnType_str(v__ast__FnType it, int indent_count) { +static string indent_v__ast__Enum_str(v__ast__Enum it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); - string _t39 = indent_v__ast__Fn_str(it.func, indent_count + 1); + string _t39 = Array_string_str(it.vals); string res = str_intp( 15, _MOV((StrIntpData[]){ - {_SLIT("v.ast.FnType{\n"), 0, {.d_c=0}}, - {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" is_anon: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_anon ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" has_decl: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.has_decl ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" func: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t39}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("v.ast.Enum{\n"), 0, {.d_c=0}}, + {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" vals: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t39}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_flag: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_flag ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_multi_allowed: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_multi_allowed ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); string_free(&_t39); @@ -10769,13 +10757,14 @@ static string indent_v__ast__FnType_str(v__ast__FnType it, int indent_count) { return res; } -static string indent_v__ast__GenericInst_str(v__ast__GenericInst it, int indent_count) { +static string indent_v__ast__FnType_str(v__ast__FnType it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); - string _t40 = indent_Array_v__ast__Type_str(it.concrete_types, indent_count + 1); - string res = str_intp( 11, _MOV((StrIntpData[]){ - {_SLIT("v.ast.GenericInst{\n"), 0, {.d_c=0}}, - {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" parent_idx: "), 0, {.d_c=0}}, {_SLIT(""), 7, {.d_i32=it.parent_idx}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" concrete_types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t40}}, {_SLIT(""), 0, {.d_c=0}}, + string _t40 = indent_v__ast__Fn_str(it.func, indent_count + 1); + string res = str_intp( 15, _MOV((StrIntpData[]){ + {_SLIT("v.ast.FnType{\n"), 0, {.d_c=0}}, + {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" is_anon: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_anon ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" has_decl: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.has_decl ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" func: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t40}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); string_free(&_t40); @@ -10783,29 +10772,44 @@ static string indent_v__ast__GenericInst_str(v__ast__GenericInst it, int indent_ return res; } -static string indent_v__ast__Interface_str(v__ast__Interface it, int indent_count) { +static string indent_v__ast__GenericInst_str(v__ast__GenericInst it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); - string _t41 = indent_Array_v__ast__Type_str(it.types, indent_count + 1); - string _t42 = indent_Array_v__ast__StructField_str(it.fields, indent_count + 1); - string _t43 = indent_Array_v__ast__Fn_str(it.methods, indent_count + 1); - string _t44 = indent_Array_v__ast__Type_str(it.embeds, indent_count + 1); - string _t45 = indent_Map_int_Array_v__ast__Type_str(it.conversions, indent_count + 1); - string _t46 = indent_Array_v__ast__Type_str(it.generic_types, indent_count + 1); - string _t47 = indent_Array_v__ast__Type_str(it.concrete_types, indent_count + 1); - string _t48 = v__ast__Type_str(it.parent_type); - string res = str_intp( 39, _MOV((StrIntpData[]){ - {_SLIT("v.ast.Interface{\n"), 0, {.d_c=0}}, - {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t41}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" fields: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t42}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" methods: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t43}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" embeds: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t44}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" conversions: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t45}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_generic: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_generic ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" generic_types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t46}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" concrete_types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t47}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" parent_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t48}}, {_SLIT(""), 0, {.d_c=0}}, + string _t41 = indent_Array_v__ast__Type_str(it.concrete_types, indent_count + 1); + string res = str_intp( 11, _MOV((StrIntpData[]){ + {_SLIT("v.ast.GenericInst{\n"), 0, {.d_c=0}}, + {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" parent_idx: "), 0, {.d_c=0}}, {_SLIT(""), 7, {.d_i32=it.parent_idx}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" concrete_types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t41}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); + string_free(&_t41); + string_free(&indents); + return res; +} + +static string indent_v__ast__Interface_str(v__ast__Interface it, int indent_count) { + string indents = string_repeat(_SLIT(" "), indent_count); + string _t42 = indent_Array_v__ast__Type_str(it.types, indent_count + 1); + string _t43 = indent_Array_v__ast__StructField_str(it.fields, indent_count + 1); + string _t44 = indent_Array_v__ast__Fn_str(it.methods, indent_count + 1); + string _t45 = indent_Array_v__ast__Type_str(it.embeds, indent_count + 1); + string _t46 = indent_Map_int_Array_v__ast__Type_str(it.conversions, indent_count + 1); + string _t47 = indent_Array_v__ast__Type_str(it.generic_types, indent_count + 1); + string _t48 = indent_Array_v__ast__Type_str(it.concrete_types, indent_count + 1); + string _t49 = v__ast__Type_str(it.parent_type); + string res = str_intp( 39, _MOV((StrIntpData[]){ + {_SLIT("v.ast.Interface{\n"), 0, {.d_c=0}}, + {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t42}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" fields: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t43}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" methods: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t44}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" embeds: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t45}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" conversions: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t46}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_generic: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_generic ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" generic_types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t47}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" concrete_types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t48}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" parent_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t49}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, + })); + string_free(&_t49); string_free(&_t48); string_free(&_t47); string_free(&_t46); @@ -10813,122 +10817,105 @@ static string indent_v__ast__Interface_str(v__ast__Interface it, int indent_coun string_free(&_t44); string_free(&_t43); string_free(&_t42); - string_free(&_t41); string_free(&indents); return res; } static string indent_v__ast__Map_str(v__ast__Map it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); - string _t49 = v__ast__Type_str(it.key_type); - string _t50 = v__ast__Type_str(it.value_type); + string _t50 = v__ast__Type_str(it.key_type); + string _t51 = v__ast__Type_str(it.value_type); string res = str_intp( 11, _MOV((StrIntpData[]){ {_SLIT("v.ast.Map{\n"), 0, {.d_c=0}}, - {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" key_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t49}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" value_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t50}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" key_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t50}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" value_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t51}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); + string_free(&_t51); string_free(&_t50); - string_free(&_t49); string_free(&indents); return res; } static string indent_v__ast__MultiReturn_str(v__ast__MultiReturn it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); - string _t51 = indent_Array_v__ast__Type_str(it.types, indent_count + 1); + string _t52 = indent_Array_v__ast__Type_str(it.types, indent_count + 1); string res = str_intp( 7, _MOV((StrIntpData[]){ {_SLIT("v.ast.MultiReturn{\n"), 0, {.d_c=0}}, - {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t51}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t52}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); - string_free(&_t51); + string_free(&_t52); string_free(&indents); return res; } static string indent_v__ast__Struct_str(v__ast__Struct it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); - string _t52 = indent_Array_v__ast__Attr_str(it.attrs, indent_count + 1); - string _t53 = indent_Array_v__ast__Type_str(it.embeds, indent_count + 1); - string _t54 = indent_Array_v__ast__StructField_str(it.fields, indent_count + 1); - string _t55 = indent_Array_v__ast__Type_str(it.generic_types, indent_count + 1); - string _t56 = indent_Array_v__ast__Type_str(it.concrete_types, indent_count + 1); - string _t57 = v__ast__Type_str(it.parent_type); + string _t53 = indent_Array_v__ast__Attr_str(it.attrs, indent_count + 1); + string _t54 = indent_Array_v__ast__Type_str(it.embeds, indent_count + 1); + string _t55 = indent_Array_v__ast__StructField_str(it.fields, indent_count + 1); + string _t56 = indent_Array_v__ast__Type_str(it.generic_types, indent_count + 1); + string _t57 = indent_Array_v__ast__Type_str(it.concrete_types, indent_count + 1); + string _t58 = v__ast__Type_str(it.parent_type); string res = str_intp( 43, _MOV((StrIntpData[]){ {_SLIT("v.ast.Struct{\n"), 0, {.d_c=0}}, - {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" attrs: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t52}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" embeds: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t53}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" fields: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t54}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" attrs: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t53}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" embeds: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t54}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" fields: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t55}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_typedef: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_typedef ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_union: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_union ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_heap: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_heap ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_generic: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_generic ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" generic_types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t55}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" concrete_types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t56}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" parent_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t57}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" generic_types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t56}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" concrete_types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t57}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" parent_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t58}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); + string_free(&_t58); string_free(&_t57); string_free(&_t56); string_free(&_t55); string_free(&_t54); string_free(&_t53); - string_free(&_t52); string_free(&indents); return res; } static string indent_v__ast__SumType_str(v__ast__SumType it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); - string _t58 = indent_Array_v__ast__StructField_str(it.fields, indent_count + 1); - string _t59 = indent_Array_v__ast__Type_str(it.variants, indent_count + 1); - string _t60 = indent_Array_v__ast__Type_str(it.generic_types, indent_count + 1); - string _t61 = indent_Array_v__ast__Type_str(it.concrete_types, indent_count + 1); - string _t62 = v__ast__Type_str(it.parent_type); + string _t59 = indent_Array_v__ast__StructField_str(it.fields, indent_count + 1); + string _t60 = indent_Array_v__ast__Type_str(it.variants, indent_count + 1); + string _t61 = indent_Array_v__ast__Type_str(it.generic_types, indent_count + 1); + string _t62 = indent_Array_v__ast__Type_str(it.concrete_types, indent_count + 1); + string _t63 = v__ast__Type_str(it.parent_type); string res = str_intp( 35, _MOV((StrIntpData[]){ {_SLIT("v.ast.SumType{\n"), 0, {.d_c=0}}, - {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" fields: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t58}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" fields: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t59}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" found_fields: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.found_fields ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_anon: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_anon ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_generic: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_generic ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" variants: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t59}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" generic_types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t60}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" concrete_types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t61}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" parent_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t62}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" variants: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t60}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" generic_types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t61}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" concrete_types: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t62}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" parent_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t63}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); + string_free(&_t63); string_free(&_t62); string_free(&_t61); string_free(&_t60); string_free(&_t59); - string_free(&_t58); string_free(&indents); return res; } static string indent_v__ast__Thread_str(v__ast__Thread it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); - string _t63 = v__ast__Type_str(it.return_type); + string _t64 = v__ast__Type_str(it.return_type); string res = str_intp( 7, _MOV((StrIntpData[]){ {_SLIT("v.ast.Thread{\n"), 0, {.d_c=0}}, - {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" return_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t63}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, - })); - string_free(&_t63); - string_free(&indents); - return res; -} - -static string indent_v__ast__Comment_str(v__ast__Comment it, int indent_count) { - string indents = string_repeat(_SLIT(" "), indent_count); - string _t64 = indent_v__token__Pos_str(it.pos, indent_count + 1); - string res = str_intp( 19, _MOV((StrIntpData[]){ - {_SLIT("v.ast.Comment{\n"), 0, {.d_c=0}}, - {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" text: "), 0, {.d_c=0}}, {_SLIT("'"), 16, {.d_s=it.text}}, {_SLIT("'"), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_multi: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_multi ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_inline: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_inline ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" pos: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t64}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" return_type: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t64}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); string_free(&_t64); @@ -10936,63 +10923,79 @@ static string indent_v__ast__Comment_str(v__ast__Comment it, int indent_count) { return res; } -static string indent_v__ast__Param_str(v__ast__Param it, int indent_count) { +static string indent_v__ast__Comment_str(v__ast__Comment it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); string _t65 = indent_v__token__Pos_str(it.pos, indent_count + 1); - string _t66 = indent_v__token__Pos_str(it.type_pos, indent_count + 1); - string _t67 = v__ast__Type_str(it.typ); + string res = str_intp( 19, _MOV((StrIntpData[]){ + {_SLIT("v.ast.Comment{\n"), 0, {.d_c=0}}, + {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" text: "), 0, {.d_c=0}}, {_SLIT("'"), 16, {.d_s=it.text}}, {_SLIT("'"), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_multi: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_multi ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_inline: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_inline ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" pos: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t65}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, + })); + string_free(&_t65); + string_free(&indents); + return res; +} + +static string indent_v__ast__Param_str(v__ast__Param it, int indent_count) { + string indents = string_repeat(_SLIT(" "), indent_count); + string _t66 = indent_v__token__Pos_str(it.pos, indent_count + 1); + string _t67 = indent_v__token__Pos_str(it.type_pos, indent_count + 1); + string _t68 = v__ast__Type_str(it.typ); string res = str_intp( 31, _MOV((StrIntpData[]){ {_SLIT("v.ast.Param{\n"), 0, {.d_c=0}}, - {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" pos: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t65}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" pos: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t66}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" name: "), 0, {.d_c=0}}, {_SLIT("'"), 16, {.d_s=it.name}}, {_SLIT("'"), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_mut: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_mut ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_auto_rec: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_auto_rec ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" type_pos: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t66}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" type_pos: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t67}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_hidden: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_hidden ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" typ: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t67}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" typ: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t68}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); + string_free(&_t68); string_free(&_t67); string_free(&_t66); - string_free(&_t65); string_free(&indents); return res; } static string indent_v__ast__StructField_str(v__ast__StructField it, int indent_count) { string indents = string_repeat(_SLIT(" "), indent_count); - string _t68 = indent_v__token__Pos_str(it.pos, indent_count + 1); - string _t69 = indent_v__token__Pos_str(it.type_pos, indent_count + 1); - string _t70 = indent_Array_v__ast__Comment_str(it.comments, indent_count + 1); - string _t71 = indent_Array_v__ast__Attr_str(it.attrs, indent_count + 1); - string _t72 = v__ast__Expr_str(it.default_expr); - string _t73 = v__ast__Type_str(it.default_expr_typ); - string _t74 = v__ast__Type_str(it.typ); + string _t69 = indent_v__token__Pos_str(it.pos, indent_count + 1); + string _t70 = indent_v__token__Pos_str(it.type_pos, indent_count + 1); + string _t71 = indent_Array_v__ast__Comment_str(it.comments, indent_count + 1); + string _t72 = indent_Array_v__ast__Attr_str(it.attrs, indent_count + 1); + string _t73 = v__ast__Expr_str(it.default_expr); + string _t74 = v__ast__Type_str(it.default_expr_typ); + string _t75 = v__ast__Type_str(it.typ); string res = str_intp( 59, _MOV((StrIntpData[]){ {_SLIT("v.ast.StructField{\n"), 0, {.d_c=0}}, - {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" pos: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t68}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" type_pos: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t69}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" comments: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t70}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT0, 0xfe10, {.d_s=indents}}, {_SLIT(" pos: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t69}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" type_pos: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t70}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" comments: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t71}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" has_default_expr: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.has_default_expr ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" attrs: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t71}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" attrs: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t72}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_pub: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_pub ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" default_val: "), 0, {.d_c=0}}, {_SLIT("'"), 16, {.d_s=it.default_val}}, {_SLIT("'"), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_mut: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_mut ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_global: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_global ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" is_volatile: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=it.is_volatile ? _SLIT("true") : _SLIT("false")}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" default_expr: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t72}}, {_SLIT(""), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" default_expr_typ: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t73}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" default_expr: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t73}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" default_expr_typ: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t74}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" name: "), 0, {.d_c=0}}, {_SLIT("'"), 16, {.d_s=it.name}}, {_SLIT("'"), 0, {.d_c=0}}, - {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" typ: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t74}}, {_SLIT(""), 0, {.d_c=0}}, + {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT(" typ: "), 0, {.d_c=0}}, {_SLIT(""), 16, {.d_s=_t75}}, {_SLIT(""), 0, {.d_c=0}}, {_SLIT("\n"), 0xfe10, {.d_s=indents}}, {_SLIT("}"), 0, {.d_c=0}}, })); + string_free(&_t75); string_free(&_t74); string_free(&_t73); string_free(&_t72); string_free(&_t71); string_free(&_t70); string_free(&_t69); - string_free(&_t68); string_free(&indents); return res; } @@ -22358,7 +22361,7 @@ VV_LOCAL_SYMBOL Map_string_v__token__Kind v__token__build_keys(void) { } VV_LOCAL_SYMBOL Array_string v__token__build_token_str(void) { - Array_string s = __new_array_with_default(_const_v__token__nr_tokens, 0, sizeof(string), &(string[]){_SLIT("")}); + Array_string s = __new_array_with_default(((int)(v__token__Kind___end_)), 0, sizeof(string), &(string[]){_SLIT("")}); array_set(&s, v__token__Kind__unknown, &(string[]) { _SLIT("unknown") }); array_set(&s, v__token__Kind__eof, &(string[]) { _SLIT("eof") }); array_set(&s, v__token__Kind__name, &(string[]) { _SLIT("name") }); @@ -23207,586 +23210,358 @@ string v__token__kind_to_string(v__token__Kind k) { } Option_v__token__Kind v__token__kind_from_string(string s) { - + Option_v__token__Kind _t2 = {0}; + if (string__eq(s, _SLIT("unknown"))) { - Option_v__token__Kind _t1; - opt_ok(&(v__token__Kind[]) { v__token__Kind__unknown }, (Option*)(&_t1), sizeof(v__token__Kind)); - return _t1; + opt_ok(&(v__token__Kind[]) { v__token__Kind__unknown }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("eof"))) { - Option_v__token__Kind _t2; opt_ok(&(v__token__Kind[]) { v__token__Kind__eof }, (Option*)(&_t2), sizeof(v__token__Kind)); - return _t2; } else if (string__eq(s, _SLIT("name"))) { - Option_v__token__Kind _t3; - opt_ok(&(v__token__Kind[]) { v__token__Kind__name }, (Option*)(&_t3), sizeof(v__token__Kind)); - return _t3; + opt_ok(&(v__token__Kind[]) { v__token__Kind__name }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("number"))) { - Option_v__token__Kind _t4; - opt_ok(&(v__token__Kind[]) { v__token__Kind__number }, (Option*)(&_t4), sizeof(v__token__Kind)); - return _t4; + opt_ok(&(v__token__Kind[]) { v__token__Kind__number }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("string"))) { - Option_v__token__Kind _t5; - opt_ok(&(v__token__Kind[]) { v__token__Kind__string }, (Option*)(&_t5), sizeof(v__token__Kind)); - return _t5; + opt_ok(&(v__token__Kind[]) { v__token__Kind__string }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("str_inter"))) { - Option_v__token__Kind _t6; - opt_ok(&(v__token__Kind[]) { v__token__Kind__str_inter }, (Option*)(&_t6), sizeof(v__token__Kind)); - return _t6; + opt_ok(&(v__token__Kind[]) { v__token__Kind__str_inter }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("chartoken"))) { - Option_v__token__Kind _t7; - opt_ok(&(v__token__Kind[]) { v__token__Kind__chartoken }, (Option*)(&_t7), sizeof(v__token__Kind)); - return _t7; + opt_ok(&(v__token__Kind[]) { v__token__Kind__chartoken }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("plus"))) { - Option_v__token__Kind _t8; - opt_ok(&(v__token__Kind[]) { v__token__Kind__plus }, (Option*)(&_t8), sizeof(v__token__Kind)); - return _t8; + opt_ok(&(v__token__Kind[]) { v__token__Kind__plus }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("minus"))) { - Option_v__token__Kind _t9; - opt_ok(&(v__token__Kind[]) { v__token__Kind__minus }, (Option*)(&_t9), sizeof(v__token__Kind)); - return _t9; + opt_ok(&(v__token__Kind[]) { v__token__Kind__minus }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("mul"))) { - Option_v__token__Kind _t10; - opt_ok(&(v__token__Kind[]) { v__token__Kind__mul }, (Option*)(&_t10), sizeof(v__token__Kind)); - return _t10; + opt_ok(&(v__token__Kind[]) { v__token__Kind__mul }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("div"))) { - Option_v__token__Kind _t11; - opt_ok(&(v__token__Kind[]) { v__token__Kind__div }, (Option*)(&_t11), sizeof(v__token__Kind)); - return _t11; + opt_ok(&(v__token__Kind[]) { v__token__Kind__div }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("mod"))) { - Option_v__token__Kind _t12; - opt_ok(&(v__token__Kind[]) { v__token__Kind__mod }, (Option*)(&_t12), sizeof(v__token__Kind)); - return _t12; + opt_ok(&(v__token__Kind[]) { v__token__Kind__mod }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("xor"))) { - Option_v__token__Kind _t13; - opt_ok(&(v__token__Kind[]) { v__token__Kind__xor }, (Option*)(&_t13), sizeof(v__token__Kind)); - return _t13; + opt_ok(&(v__token__Kind[]) { v__token__Kind__xor }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("pipe"))) { - Option_v__token__Kind _t14; - opt_ok(&(v__token__Kind[]) { v__token__Kind__pipe }, (Option*)(&_t14), sizeof(v__token__Kind)); - return _t14; + opt_ok(&(v__token__Kind[]) { v__token__Kind__pipe }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("inc"))) { - Option_v__token__Kind _t15; - opt_ok(&(v__token__Kind[]) { v__token__Kind__inc }, (Option*)(&_t15), sizeof(v__token__Kind)); - return _t15; + opt_ok(&(v__token__Kind[]) { v__token__Kind__inc }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("dec"))) { - Option_v__token__Kind _t16; - opt_ok(&(v__token__Kind[]) { v__token__Kind__dec }, (Option*)(&_t16), sizeof(v__token__Kind)); - return _t16; + opt_ok(&(v__token__Kind[]) { v__token__Kind__dec }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("and"))) { - Option_v__token__Kind _t17; - opt_ok(&(v__token__Kind[]) { v__token__Kind__and }, (Option*)(&_t17), sizeof(v__token__Kind)); - return _t17; + opt_ok(&(v__token__Kind[]) { v__token__Kind__and }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("logical_or"))) { - Option_v__token__Kind _t18; - opt_ok(&(v__token__Kind[]) { v__token__Kind__logical_or }, (Option*)(&_t18), sizeof(v__token__Kind)); - return _t18; + opt_ok(&(v__token__Kind[]) { v__token__Kind__logical_or }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("not"))) { - Option_v__token__Kind _t19; - opt_ok(&(v__token__Kind[]) { v__token__Kind__not }, (Option*)(&_t19), sizeof(v__token__Kind)); - return _t19; + opt_ok(&(v__token__Kind[]) { v__token__Kind__not }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("bit_not"))) { - Option_v__token__Kind _t20; - opt_ok(&(v__token__Kind[]) { v__token__Kind__bit_not }, (Option*)(&_t20), sizeof(v__token__Kind)); - return _t20; + opt_ok(&(v__token__Kind[]) { v__token__Kind__bit_not }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("question"))) { - Option_v__token__Kind _t21; - opt_ok(&(v__token__Kind[]) { v__token__Kind__question }, (Option*)(&_t21), sizeof(v__token__Kind)); - return _t21; + opt_ok(&(v__token__Kind[]) { v__token__Kind__question }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("comma"))) { - Option_v__token__Kind _t22; - opt_ok(&(v__token__Kind[]) { v__token__Kind__comma }, (Option*)(&_t22), sizeof(v__token__Kind)); - return _t22; + opt_ok(&(v__token__Kind[]) { v__token__Kind__comma }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("semicolon"))) { - Option_v__token__Kind _t23; - opt_ok(&(v__token__Kind[]) { v__token__Kind__semicolon }, (Option*)(&_t23), sizeof(v__token__Kind)); - return _t23; + opt_ok(&(v__token__Kind[]) { v__token__Kind__semicolon }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("colon"))) { - Option_v__token__Kind _t24; - opt_ok(&(v__token__Kind[]) { v__token__Kind__colon }, (Option*)(&_t24), sizeof(v__token__Kind)); - return _t24; + opt_ok(&(v__token__Kind[]) { v__token__Kind__colon }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("arrow"))) { - Option_v__token__Kind _t25; - opt_ok(&(v__token__Kind[]) { v__token__Kind__arrow }, (Option*)(&_t25), sizeof(v__token__Kind)); - return _t25; + opt_ok(&(v__token__Kind[]) { v__token__Kind__arrow }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("amp"))) { - Option_v__token__Kind _t26; - opt_ok(&(v__token__Kind[]) { v__token__Kind__amp }, (Option*)(&_t26), sizeof(v__token__Kind)); - return _t26; + opt_ok(&(v__token__Kind[]) { v__token__Kind__amp }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("hash"))) { - Option_v__token__Kind _t27; - opt_ok(&(v__token__Kind[]) { v__token__Kind__hash }, (Option*)(&_t27), sizeof(v__token__Kind)); - return _t27; + opt_ok(&(v__token__Kind[]) { v__token__Kind__hash }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("dollar"))) { - Option_v__token__Kind _t28; - opt_ok(&(v__token__Kind[]) { v__token__Kind__dollar }, (Option*)(&_t28), sizeof(v__token__Kind)); - return _t28; + opt_ok(&(v__token__Kind[]) { v__token__Kind__dollar }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("at"))) { - Option_v__token__Kind _t29; - opt_ok(&(v__token__Kind[]) { v__token__Kind__at }, (Option*)(&_t29), sizeof(v__token__Kind)); - return _t29; + opt_ok(&(v__token__Kind[]) { v__token__Kind__at }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("str_dollar"))) { - Option_v__token__Kind _t30; - opt_ok(&(v__token__Kind[]) { v__token__Kind__str_dollar }, (Option*)(&_t30), sizeof(v__token__Kind)); - return _t30; + opt_ok(&(v__token__Kind[]) { v__token__Kind__str_dollar }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("left_shift"))) { - Option_v__token__Kind _t31; - opt_ok(&(v__token__Kind[]) { v__token__Kind__left_shift }, (Option*)(&_t31), sizeof(v__token__Kind)); - return _t31; + opt_ok(&(v__token__Kind[]) { v__token__Kind__left_shift }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("right_shift"))) { - Option_v__token__Kind _t32; - opt_ok(&(v__token__Kind[]) { v__token__Kind__right_shift }, (Option*)(&_t32), sizeof(v__token__Kind)); - return _t32; + opt_ok(&(v__token__Kind[]) { v__token__Kind__right_shift }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("unsigned_right_shift"))) { - Option_v__token__Kind _t33; - opt_ok(&(v__token__Kind[]) { v__token__Kind__unsigned_right_shift }, (Option*)(&_t33), sizeof(v__token__Kind)); - return _t33; + opt_ok(&(v__token__Kind[]) { v__token__Kind__unsigned_right_shift }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("not_in"))) { - Option_v__token__Kind _t34; - opt_ok(&(v__token__Kind[]) { v__token__Kind__not_in }, (Option*)(&_t34), sizeof(v__token__Kind)); - return _t34; + opt_ok(&(v__token__Kind[]) { v__token__Kind__not_in }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("not_is"))) { - Option_v__token__Kind _t35; - opt_ok(&(v__token__Kind[]) { v__token__Kind__not_is }, (Option*)(&_t35), sizeof(v__token__Kind)); - return _t35; + opt_ok(&(v__token__Kind[]) { v__token__Kind__not_is }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("assign"))) { - Option_v__token__Kind _t36; - opt_ok(&(v__token__Kind[]) { v__token__Kind__assign }, (Option*)(&_t36), sizeof(v__token__Kind)); - return _t36; + opt_ok(&(v__token__Kind[]) { v__token__Kind__assign }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("decl_assign"))) { - Option_v__token__Kind _t37; - opt_ok(&(v__token__Kind[]) { v__token__Kind__decl_assign }, (Option*)(&_t37), sizeof(v__token__Kind)); - return _t37; + opt_ok(&(v__token__Kind[]) { v__token__Kind__decl_assign }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("plus_assign"))) { - Option_v__token__Kind _t38; - opt_ok(&(v__token__Kind[]) { v__token__Kind__plus_assign }, (Option*)(&_t38), sizeof(v__token__Kind)); - return _t38; + opt_ok(&(v__token__Kind[]) { v__token__Kind__plus_assign }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("minus_assign"))) { - Option_v__token__Kind _t39; - opt_ok(&(v__token__Kind[]) { v__token__Kind__minus_assign }, (Option*)(&_t39), sizeof(v__token__Kind)); - return _t39; + opt_ok(&(v__token__Kind[]) { v__token__Kind__minus_assign }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("div_assign"))) { - Option_v__token__Kind _t40; - opt_ok(&(v__token__Kind[]) { v__token__Kind__div_assign }, (Option*)(&_t40), sizeof(v__token__Kind)); - return _t40; + opt_ok(&(v__token__Kind[]) { v__token__Kind__div_assign }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("mult_assign"))) { - Option_v__token__Kind _t41; - opt_ok(&(v__token__Kind[]) { v__token__Kind__mult_assign }, (Option*)(&_t41), sizeof(v__token__Kind)); - return _t41; + opt_ok(&(v__token__Kind[]) { v__token__Kind__mult_assign }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("xor_assign"))) { - Option_v__token__Kind _t42; - opt_ok(&(v__token__Kind[]) { v__token__Kind__xor_assign }, (Option*)(&_t42), sizeof(v__token__Kind)); - return _t42; + opt_ok(&(v__token__Kind[]) { v__token__Kind__xor_assign }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("mod_assign"))) { - Option_v__token__Kind _t43; - opt_ok(&(v__token__Kind[]) { v__token__Kind__mod_assign }, (Option*)(&_t43), sizeof(v__token__Kind)); - return _t43; + opt_ok(&(v__token__Kind[]) { v__token__Kind__mod_assign }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("or_assign"))) { - Option_v__token__Kind _t44; - opt_ok(&(v__token__Kind[]) { v__token__Kind__or_assign }, (Option*)(&_t44), sizeof(v__token__Kind)); - return _t44; + opt_ok(&(v__token__Kind[]) { v__token__Kind__or_assign }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("and_assign"))) { - Option_v__token__Kind _t45; - opt_ok(&(v__token__Kind[]) { v__token__Kind__and_assign }, (Option*)(&_t45), sizeof(v__token__Kind)); - return _t45; + opt_ok(&(v__token__Kind[]) { v__token__Kind__and_assign }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("right_shift_assign"))) { - Option_v__token__Kind _t46; - opt_ok(&(v__token__Kind[]) { v__token__Kind__right_shift_assign }, (Option*)(&_t46), sizeof(v__token__Kind)); - return _t46; + opt_ok(&(v__token__Kind[]) { v__token__Kind__right_shift_assign }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("left_shift_assign"))) { - Option_v__token__Kind _t47; - opt_ok(&(v__token__Kind[]) { v__token__Kind__left_shift_assign }, (Option*)(&_t47), sizeof(v__token__Kind)); - return _t47; + opt_ok(&(v__token__Kind[]) { v__token__Kind__left_shift_assign }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("unsigned_right_shift_assign"))) { - Option_v__token__Kind _t48; - opt_ok(&(v__token__Kind[]) { v__token__Kind__unsigned_right_shift_assign }, (Option*)(&_t48), sizeof(v__token__Kind)); - return _t48; + opt_ok(&(v__token__Kind[]) { v__token__Kind__unsigned_right_shift_assign }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("lcbr"))) { - Option_v__token__Kind _t49; - opt_ok(&(v__token__Kind[]) { v__token__Kind__lcbr }, (Option*)(&_t49), sizeof(v__token__Kind)); - return _t49; + opt_ok(&(v__token__Kind[]) { v__token__Kind__lcbr }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("rcbr"))) { - Option_v__token__Kind _t50; - opt_ok(&(v__token__Kind[]) { v__token__Kind__rcbr }, (Option*)(&_t50), sizeof(v__token__Kind)); - return _t50; + opt_ok(&(v__token__Kind[]) { v__token__Kind__rcbr }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("lpar"))) { - Option_v__token__Kind _t51; - opt_ok(&(v__token__Kind[]) { v__token__Kind__lpar }, (Option*)(&_t51), sizeof(v__token__Kind)); - return _t51; + opt_ok(&(v__token__Kind[]) { v__token__Kind__lpar }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("rpar"))) { - Option_v__token__Kind _t52; - opt_ok(&(v__token__Kind[]) { v__token__Kind__rpar }, (Option*)(&_t52), sizeof(v__token__Kind)); - return _t52; + opt_ok(&(v__token__Kind[]) { v__token__Kind__rpar }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("lsbr"))) { - Option_v__token__Kind _t53; - opt_ok(&(v__token__Kind[]) { v__token__Kind__lsbr }, (Option*)(&_t53), sizeof(v__token__Kind)); - return _t53; + opt_ok(&(v__token__Kind[]) { v__token__Kind__lsbr }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("nilsbr"))) { - Option_v__token__Kind _t54; - opt_ok(&(v__token__Kind[]) { v__token__Kind__nilsbr }, (Option*)(&_t54), sizeof(v__token__Kind)); - return _t54; + opt_ok(&(v__token__Kind[]) { v__token__Kind__nilsbr }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("rsbr"))) { - Option_v__token__Kind _t55; - opt_ok(&(v__token__Kind[]) { v__token__Kind__rsbr }, (Option*)(&_t55), sizeof(v__token__Kind)); - return _t55; + opt_ok(&(v__token__Kind[]) { v__token__Kind__rsbr }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("eq"))) { - Option_v__token__Kind _t56; - opt_ok(&(v__token__Kind[]) { v__token__Kind__eq }, (Option*)(&_t56), sizeof(v__token__Kind)); - return _t56; + opt_ok(&(v__token__Kind[]) { v__token__Kind__eq }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("ne"))) { - Option_v__token__Kind _t57; - opt_ok(&(v__token__Kind[]) { v__token__Kind__ne }, (Option*)(&_t57), sizeof(v__token__Kind)); - return _t57; + opt_ok(&(v__token__Kind[]) { v__token__Kind__ne }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("gt"))) { - Option_v__token__Kind _t58; - opt_ok(&(v__token__Kind[]) { v__token__Kind__gt }, (Option*)(&_t58), sizeof(v__token__Kind)); - return _t58; + opt_ok(&(v__token__Kind[]) { v__token__Kind__gt }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("lt"))) { - Option_v__token__Kind _t59; - opt_ok(&(v__token__Kind[]) { v__token__Kind__lt }, (Option*)(&_t59), sizeof(v__token__Kind)); - return _t59; + opt_ok(&(v__token__Kind[]) { v__token__Kind__lt }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("ge"))) { - Option_v__token__Kind _t60; - opt_ok(&(v__token__Kind[]) { v__token__Kind__ge }, (Option*)(&_t60), sizeof(v__token__Kind)); - return _t60; + opt_ok(&(v__token__Kind[]) { v__token__Kind__ge }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("le"))) { - Option_v__token__Kind _t61; - opt_ok(&(v__token__Kind[]) { v__token__Kind__le }, (Option*)(&_t61), sizeof(v__token__Kind)); - return _t61; + opt_ok(&(v__token__Kind[]) { v__token__Kind__le }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("comment"))) { - Option_v__token__Kind _t62; - opt_ok(&(v__token__Kind[]) { v__token__Kind__comment }, (Option*)(&_t62), sizeof(v__token__Kind)); - return _t62; + opt_ok(&(v__token__Kind[]) { v__token__Kind__comment }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("nl"))) { - Option_v__token__Kind _t63; - opt_ok(&(v__token__Kind[]) { v__token__Kind__nl }, (Option*)(&_t63), sizeof(v__token__Kind)); - return _t63; + opt_ok(&(v__token__Kind[]) { v__token__Kind__nl }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("dot"))) { - Option_v__token__Kind _t64; - opt_ok(&(v__token__Kind[]) { v__token__Kind__dot }, (Option*)(&_t64), sizeof(v__token__Kind)); - return _t64; + opt_ok(&(v__token__Kind[]) { v__token__Kind__dot }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("dotdot"))) { - Option_v__token__Kind _t65; - opt_ok(&(v__token__Kind[]) { v__token__Kind__dotdot }, (Option*)(&_t65), sizeof(v__token__Kind)); - return _t65; + opt_ok(&(v__token__Kind[]) { v__token__Kind__dotdot }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("ellipsis"))) { - Option_v__token__Kind _t66; - opt_ok(&(v__token__Kind[]) { v__token__Kind__ellipsis }, (Option*)(&_t66), sizeof(v__token__Kind)); - return _t66; + opt_ok(&(v__token__Kind[]) { v__token__Kind__ellipsis }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("keyword_beg"))) { - Option_v__token__Kind _t67; - opt_ok(&(v__token__Kind[]) { v__token__Kind__keyword_beg }, (Option*)(&_t67), sizeof(v__token__Kind)); - return _t67; + opt_ok(&(v__token__Kind[]) { v__token__Kind__keyword_beg }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_as"))) { - Option_v__token__Kind _t68; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_as }, (Option*)(&_t68), sizeof(v__token__Kind)); - return _t68; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_as }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_asm"))) { - Option_v__token__Kind _t69; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_asm }, (Option*)(&_t69), sizeof(v__token__Kind)); - return _t69; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_asm }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_assert"))) { - Option_v__token__Kind _t70; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_assert }, (Option*)(&_t70), sizeof(v__token__Kind)); - return _t70; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_assert }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_atomic"))) { - Option_v__token__Kind _t71; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_atomic }, (Option*)(&_t71), sizeof(v__token__Kind)); - return _t71; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_atomic }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_break"))) { - Option_v__token__Kind _t72; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_break }, (Option*)(&_t72), sizeof(v__token__Kind)); - return _t72; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_break }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_const"))) { - Option_v__token__Kind _t73; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_const }, (Option*)(&_t73), sizeof(v__token__Kind)); - return _t73; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_const }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_continue"))) { - Option_v__token__Kind _t74; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_continue }, (Option*)(&_t74), sizeof(v__token__Kind)); - return _t74; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_continue }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_defer"))) { - Option_v__token__Kind _t75; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_defer }, (Option*)(&_t75), sizeof(v__token__Kind)); - return _t75; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_defer }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_else"))) { - Option_v__token__Kind _t76; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_else }, (Option*)(&_t76), sizeof(v__token__Kind)); - return _t76; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_else }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_enum"))) { - Option_v__token__Kind _t77; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_enum }, (Option*)(&_t77), sizeof(v__token__Kind)); - return _t77; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_enum }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_false"))) { - Option_v__token__Kind _t78; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_false }, (Option*)(&_t78), sizeof(v__token__Kind)); - return _t78; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_false }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_for"))) { - Option_v__token__Kind _t79; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_for }, (Option*)(&_t79), sizeof(v__token__Kind)); - return _t79; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_for }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_fn"))) { - Option_v__token__Kind _t80; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_fn }, (Option*)(&_t80), sizeof(v__token__Kind)); - return _t80; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_fn }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_global"))) { - Option_v__token__Kind _t81; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_global }, (Option*)(&_t81), sizeof(v__token__Kind)); - return _t81; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_global }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_go"))) { - Option_v__token__Kind _t82; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_go }, (Option*)(&_t82), sizeof(v__token__Kind)); - return _t82; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_go }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_goto"))) { - Option_v__token__Kind _t83; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_goto }, (Option*)(&_t83), sizeof(v__token__Kind)); - return _t83; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_goto }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_if"))) { - Option_v__token__Kind _t84; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_if }, (Option*)(&_t84), sizeof(v__token__Kind)); - return _t84; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_if }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_import"))) { - Option_v__token__Kind _t85; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_import }, (Option*)(&_t85), sizeof(v__token__Kind)); - return _t85; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_import }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_in"))) { - Option_v__token__Kind _t86; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_in }, (Option*)(&_t86), sizeof(v__token__Kind)); - return _t86; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_in }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_interface"))) { - Option_v__token__Kind _t87; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_interface }, (Option*)(&_t87), sizeof(v__token__Kind)); - return _t87; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_interface }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_is"))) { - Option_v__token__Kind _t88; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_is }, (Option*)(&_t88), sizeof(v__token__Kind)); - return _t88; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_is }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_match"))) { - Option_v__token__Kind _t89; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_match }, (Option*)(&_t89), sizeof(v__token__Kind)); - return _t89; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_match }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_module"))) { - Option_v__token__Kind _t90; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_module }, (Option*)(&_t90), sizeof(v__token__Kind)); - return _t90; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_module }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_mut"))) { - Option_v__token__Kind _t91; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_mut }, (Option*)(&_t91), sizeof(v__token__Kind)); - return _t91; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_mut }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_shared"))) { - Option_v__token__Kind _t92; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_shared }, (Option*)(&_t92), sizeof(v__token__Kind)); - return _t92; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_shared }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_lock"))) { - Option_v__token__Kind _t93; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_lock }, (Option*)(&_t93), sizeof(v__token__Kind)); - return _t93; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_lock }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_rlock"))) { - Option_v__token__Kind _t94; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_rlock }, (Option*)(&_t94), sizeof(v__token__Kind)); - return _t94; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_rlock }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_none"))) { - Option_v__token__Kind _t95; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_none }, (Option*)(&_t95), sizeof(v__token__Kind)); - return _t95; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_none }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_return"))) { - Option_v__token__Kind _t96; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_return }, (Option*)(&_t96), sizeof(v__token__Kind)); - return _t96; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_return }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_select"))) { - Option_v__token__Kind _t97; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_select }, (Option*)(&_t97), sizeof(v__token__Kind)); - return _t97; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_select }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_sizeof"))) { - Option_v__token__Kind _t98; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_sizeof }, (Option*)(&_t98), sizeof(v__token__Kind)); - return _t98; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_sizeof }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_isreftype"))) { - Option_v__token__Kind _t99; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_isreftype }, (Option*)(&_t99), sizeof(v__token__Kind)); - return _t99; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_isreftype }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_likely"))) { - Option_v__token__Kind _t100; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_likely }, (Option*)(&_t100), sizeof(v__token__Kind)); - return _t100; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_likely }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_unlikely"))) { - Option_v__token__Kind _t101; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_unlikely }, (Option*)(&_t101), sizeof(v__token__Kind)); - return _t101; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_unlikely }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_offsetof"))) { - Option_v__token__Kind _t102; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_offsetof }, (Option*)(&_t102), sizeof(v__token__Kind)); - return _t102; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_offsetof }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_struct"))) { - Option_v__token__Kind _t103; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_struct }, (Option*)(&_t103), sizeof(v__token__Kind)); - return _t103; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_struct }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_true"))) { - Option_v__token__Kind _t104; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_true }, (Option*)(&_t104), sizeof(v__token__Kind)); - return _t104; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_true }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_type"))) { - Option_v__token__Kind _t105; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_type }, (Option*)(&_t105), sizeof(v__token__Kind)); - return _t105; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_type }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_typeof"))) { - Option_v__token__Kind _t106; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_typeof }, (Option*)(&_t106), sizeof(v__token__Kind)); - return _t106; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_typeof }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_dump"))) { - Option_v__token__Kind _t107; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_dump }, (Option*)(&_t107), sizeof(v__token__Kind)); - return _t107; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_dump }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_orelse"))) { - Option_v__token__Kind _t108; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_orelse }, (Option*)(&_t108), sizeof(v__token__Kind)); - return _t108; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_orelse }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_union"))) { - Option_v__token__Kind _t109; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_union }, (Option*)(&_t109), sizeof(v__token__Kind)); - return _t109; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_union }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_pub"))) { - Option_v__token__Kind _t110; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_pub }, (Option*)(&_t110), sizeof(v__token__Kind)); - return _t110; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_pub }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_static"))) { - Option_v__token__Kind _t111; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_static }, (Option*)(&_t111), sizeof(v__token__Kind)); - return _t111; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_static }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_volatile"))) { - Option_v__token__Kind _t112; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_volatile }, (Option*)(&_t112), sizeof(v__token__Kind)); - return _t112; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_volatile }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("key_unsafe"))) { - Option_v__token__Kind _t113; - opt_ok(&(v__token__Kind[]) { v__token__Kind__key_unsafe }, (Option*)(&_t113), sizeof(v__token__Kind)); - return _t113; + opt_ok(&(v__token__Kind[]) { v__token__Kind__key_unsafe }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("keyword_end"))) { - Option_v__token__Kind _t114; - opt_ok(&(v__token__Kind[]) { v__token__Kind__keyword_end }, (Option*)(&_t114), sizeof(v__token__Kind)); - return _t114; + opt_ok(&(v__token__Kind[]) { v__token__Kind__keyword_end }, (Option*)(&_t2), sizeof(v__token__Kind)); } else if (string__eq(s, _SLIT("_end_"))) { - Option_v__token__Kind _t115; - opt_ok(&(v__token__Kind[]) { v__token__Kind___end_ }, (Option*)(&_t115), sizeof(v__token__Kind)); - return _t115; + opt_ok(&(v__token__Kind[]) { v__token__Kind___end_ }, (Option*)(&_t2), sizeof(v__token__Kind)); } else { - return (Option_v__token__Kind){ .state=2, .err=_v_error(_SLIT("unknown")), .data={EMPTY_STRUCT_INITIALIZATION} }; - }; - return (Option_v__token__Kind){0}; + _t2.state = 2; + _t2.err = _v_error(_SLIT("unknown")); + }Option_v__token__Kind _t1 = _t2; + return _t1; } // Attr: [inline] @@ -32071,7 +31846,7 @@ multi_return_Array_string_Array_string_Array_string Array_v__cflag__CFlag_define Array_string libs = __new_array_with_default(0, 0, sizeof(string), 0); for (int _t1 = 0; _t1 < copts_without_obj_files.len; ++_t1) { string copt = ((string*)copts_without_obj_files.data)[_t1]; - if (string_starts_with(copt, _SLIT("-l"))) { + if (string_starts_with(copt, _SLIT("-l")) || string_ends_with(copt, _SLIT(".a"))) { array_push((array*)&libs, _MOV((string[]){ string_clone(copt) })); continue; } @@ -33506,7 +33281,7 @@ void v__pref__Preferences_fill_with_defaults(v__pref__Preferences* p) { if ((p->third_party_option).len == 0) { p->third_party_option = p->cflags; } - string vhash = _SLIT("38cceeafe"); + string vhash = _SLIT("07cab64d1"); p->cache_manager = v__vcache__new_cache_manager(new_array_from_c_array(7, 7, sizeof(string), _MOV((string[7]){string_clone(vhash), str_intp(6, _MOV((StrIntpData[]){{_SLIT0, 0xfe10, {.d_s = v__pref__Backend_str(p->backend)}}, {_SLIT(" | "), 0xfe10, {.d_s = v__pref__OS_str(p->os)}}, {_SLIT(" | "), 0xfe10, {.d_s = p->ccompiler}}, {_SLIT(" | "), 0xfe10, {.d_s = p->is_prod ? _SLIT("true") : _SLIT("false")}}, {_SLIT(" | "), 0xfe10, {.d_s = p->sanitize ? _SLIT("true") : _SLIT("false")}}, {_SLIT0, 0, { .d_c = 0 }}})), string_clone(string_trim_space(p->cflags)), string_clone(string_trim_space(p->third_party_option)), string_clone(Array_string_str(p->compile_defines_all)), string_clone(Array_string_str(p->compile_defines)), string_clone(Array_string_str(p->lookup_path))}))); if (string__eq(os__user_os(), _SLIT("windows"))) { p->use_cache = false; @@ -40048,7 +39823,7 @@ multi_return_string_bool v__ast__StringInterLiteral_get_fspec_braces(v__ast__Str break; } else if (sub_expr._typ == 291 /* v.ast.CallExpr */) { - if ((*sub_expr._v__ast__CallExpr).args.len != 0 || (*sub_expr._v__ast__CallExpr).concrete_types.len != 0) { + if ((*sub_expr._v__ast__CallExpr).args.len != 0 || (*sub_expr._v__ast__CallExpr).concrete_types.len != 0 || (*sub_expr._v__ast__CallExpr).or_block.kind == v__ast__OrKind__propagate || (*sub_expr._v__ast__CallExpr).or_block.stmts.len > 0) { needs_braces = true; } else if (((*sub_expr._v__ast__CallExpr).left)._typ == 291 /* v.ast.CallExpr */) { sub_expr = (*sub_expr._v__ast__CallExpr).left; @@ -40317,9 +40092,9 @@ string v__ast__Expr_str(v__ast__Expr x) { break; } strings__Builder_write_string(&res, _SLIT("$")); - multi_return_string_bool mr_10038 = v__ast__StringInterLiteral_get_fspec_braces(&(*x._v__ast__StringInterLiteral), i); - string fspec_str = mr_10038.arg0; - bool needs_braces = mr_10038.arg1; + multi_return_string_bool mr_10119 = v__ast__StringInterLiteral_get_fspec_braces(&(*x._v__ast__StringInterLiteral), i); + string fspec_str = mr_10119.arg0; + bool needs_braces = mr_10119.arg1; if (needs_braces) { strings__Builder_write_string(&res, _SLIT("{")); strings__Builder_write_string(&res, v__ast__Expr_str((*(v__ast__Expr*)/*ee elem_sym */array_get((*x._v__ast__StringInterLiteral).exprs, i)))); @@ -46844,12 +46619,6 @@ v__ast__Type former_expected_type; string rt = v__ast__Table_sym(c->table, right_type)->name; v__checker__Checker_error(c, str_intp(2, _MOV((StrIntpData[]){{_SLIT("negative value cannot be compared with `"), 0xfe10, {.d_s = rt}}, {_SLIT("`"), 0, { .d_c = 0 }}})), (*node->left._v__ast__IntegerLiteral).pos); } - } else if (is_left_type_signed != is_right_type_signed && !v__ast__Type_alias_eq(v__ast__Type_flip_signedness(left_type), right_type)) { - if ((is_right_type_signed && Array_int_contains(_const_v__ast__int_promoted_type_idxs, left_type)) || (is_left_type_signed && Array_int_contains(_const_v__ast__int_promoted_type_idxs, right_type))) { - string lt = v__ast__Table_sym(c->table, left_type)->name; - string rt = v__ast__Table_sym(c->table, right_type)->name; - v__checker__Checker_error(c, str_intp(3, _MOV((StrIntpData[]){{_SLIT("`"), 0xfe10, {.d_s = lt}}, {_SLIT("` cannot be compared with `"), 0xfe10, {.d_s = rt}}, {_SLIT("`"), 0, { .d_c = 0 }}})), node->pos); - } } } break; @@ -47102,8 +46871,8 @@ v__ast__Type former_expected_type; v__checker__Checker_error(c, _SLIT("array append cannot be used in an expression"), node->pos); } v__checker__Checker_check_expr_opt_call(c, node->right, right_type); - multi_return_string_v__token__Pos mr_33252 = v__checker__Checker_fail_if_immutable(c, node->left); - node->auto_locked = mr_33252.arg0; + multi_return_string_v__token__Pos mr_32778 = v__checker__Checker_fail_if_immutable(c, node->left); + node->auto_locked = mr_32778.arg0; v__ast__Type left_value_type = v__ast__Table_value_type(c->table, v__checker__Checker_unwrap_generic(c, left_type)); v__ast__TypeSymbol* left_value_sym = v__ast__Table_sym(c->table, v__checker__Checker_unwrap_generic(c, left_value_type)); if (left_value_sym->kind == v__ast__Kind__interface_) { @@ -47262,6 +47031,10 @@ v__ast__Type former_expected_type; if (typ_sym->kind == v__ast__Kind__placeholder) { v__checker__Checker_error(c, str_intp(3, _MOV((StrIntpData[]){{_SLIT0, 0xfe10, {.d_s = op}}, {_SLIT(": type `"), 0xfe10, {.d_s = typ_sym->name}}, {_SLIT("` does not exist"), 0, { .d_c = 0 }}})), v__ast__Expr_pos(right_expr)); } + if (left_sym->kind == v__ast__Kind__aggregate) { + v__ast__Type parent_left_type = (/* as */ *(v__ast__Aggregate*)__as_cast((left_sym->info)._v__ast__Aggregate,(left_sym->info)._typ, 468) /*expected idx: 468, name: v.ast.Aggregate */ ).sum_type; + left_sym = v__ast__Table_sym(c->table, parent_left_type); + } if (!(left_sym->kind == v__ast__Kind__interface_ || left_sym->kind == v__ast__Kind__sum_type)) { v__checker__Checker_error(c, str_intp(2, _MOV((StrIntpData[]){{_SLIT("`"), 0xfe10, {.d_s = op}}, {_SLIT("` can only be used with interfaces and sum types"), 0, { .d_c = 0 }}})), node->pos); } else if ((left_sym->info)._typ == 474 /* v.ast.SumType */) { @@ -47535,19 +47308,19 @@ VV_LOCAL_SYMBOL multi_return_string_v__token__Pos v__checker__Checker_fail_if_im if (v__ast__Type_has_flag(elem_type, v__ast__TypeFlag__shared_f)) { v__checker__Checker_error(c, str_intp(2, _MOV((StrIntpData[]){{_SLIT("you have to create a handle and `lock` it to modify `shared` "), 0xfe10, {.d_s = kind}}, {_SLIT(" element"), 0, { .d_c = 0 }}})), v__token__Pos_extend(v__ast__Expr_pos((*expr._v__ast__IndexExpr).left), (*expr._v__ast__IndexExpr).pos)); } - multi_return_string_v__token__Pos mr_43472 = v__checker__Checker_fail_if_immutable(c, (*expr._v__ast__IndexExpr).left); - to_lock = mr_43472.arg0; - pos = mr_43472.arg1; + multi_return_string_v__token__Pos mr_43154 = v__checker__Checker_fail_if_immutable(c, (*expr._v__ast__IndexExpr).left); + to_lock = mr_43154.arg0; + pos = mr_43154.arg1; } else if (expr._typ == 320 /* v.ast.ParExpr */) { - multi_return_string_v__token__Pos mr_43541 = v__checker__Checker_fail_if_immutable(c, (*expr._v__ast__ParExpr).expr); - to_lock = mr_43541.arg0; - pos = mr_43541.arg1; + multi_return_string_v__token__Pos mr_43223 = v__checker__Checker_fail_if_immutable(c, (*expr._v__ast__ParExpr).expr); + to_lock = mr_43223.arg0; + pos = mr_43223.arg1; } else if (expr._typ == 322 /* v.ast.PrefixExpr */) { - multi_return_string_v__token__Pos mr_43613 = v__checker__Checker_fail_if_immutable(c, (*expr._v__ast__PrefixExpr).right); - to_lock = mr_43613.arg0; - pos = mr_43613.arg1; + multi_return_string_v__token__Pos mr_43295 = v__checker__Checker_fail_if_immutable(c, (*expr._v__ast__PrefixExpr).right); + to_lock = mr_43295.arg0; + pos = mr_43295.arg1; } else if (expr._typ == 325 /* v.ast.SelectorExpr */) { if ((*expr._v__ast__SelectorExpr).expr_type == 0) { @@ -47597,9 +47370,9 @@ VV_LOCAL_SYMBOL multi_return_string_v__token__Pos v__checker__Checker_fail_if_im string type_str = v__ast__Table_type_to_str(c->table, (*expr._v__ast__SelectorExpr).expr_type); v__checker__Checker_error(c, str_intp(3, _MOV((StrIntpData[]){{_SLIT("field `"), 0xfe10, {.d_s = (*expr._v__ast__SelectorExpr).field_name}}, {_SLIT("` of struct `"), 0xfe10, {.d_s = type_str}}, {_SLIT("` is immutable"), 0, { .d_c = 0 }}})), (*expr._v__ast__SelectorExpr).pos); } - multi_return_string_v__token__Pos mr_45077 = v__checker__Checker_fail_if_immutable(c, (*expr._v__ast__SelectorExpr).expr); - to_lock = mr_45077.arg0; - pos = mr_45077.arg1; + multi_return_string_v__token__Pos mr_44759 = v__checker__Checker_fail_if_immutable(c, (*expr._v__ast__SelectorExpr).expr); + to_lock = mr_44759.arg0; + pos = mr_44759.arg1; } if ((to_lock).len != 0) { explicit_lock_needed = true; @@ -47705,9 +47478,9 @@ VV_LOCAL_SYMBOL multi_return_string_v__token__Pos v__checker__Checker_fail_if_im } else if (expr._typ == 291 /* v.ast.CallExpr */) { if (string__eq((*expr._v__ast__CallExpr).name, _SLIT("slice"))) { - multi_return_string_v__token__Pos mr_46900 = v__checker__Checker_fail_if_immutable(c, (*expr._v__ast__CallExpr).left); - to_lock = mr_46900.arg0; - pos = mr_46900.arg1; + multi_return_string_v__token__Pos mr_46582 = v__checker__Checker_fail_if_immutable(c, (*expr._v__ast__CallExpr).left); + to_lock = mr_46582.arg0; + pos = mr_46582.arg1; if ((to_lock).len != 0) { explicit_lock_needed = true; } @@ -48107,9 +47880,9 @@ v__ast__Type v__checker__Checker_selector_expr(v__checker__Checker* c, v__ast__S *(multi_return_v__ast__StructField_Array_v__ast__Type*) _t13.data = (multi_return_v__ast__StructField_Array_v__ast__Type){.arg0=((v__ast__StructField){.pos = (v__token__Pos){.len = 0,.line_nr = 0,.pos = 0,.col = 0,.last_line = 0,},.type_pos = (v__token__Pos){.len = 0,.line_nr = 0,.pos = 0,.col = 0,.last_line = 0,},.comments = __new_array(0, 0, sizeof(v__ast__Comment)),.has_default_expr = 0,.attrs = __new_array(0, 0, sizeof(v__ast__Attr)),.is_pub = 0,.default_val = (string){.str=(byteptr)"", .is_lit=1},.is_mut = 0,.is_global = 0,.is_volatile = 0,.default_expr = {0},.default_expr_typ = 0,.name = (string){.str=(byteptr)"", .is_lit=1},.typ = 0,}),.arg1=__new_array_with_default(0, 0, sizeof(v__ast__Type), 0)}; } - multi_return_v__ast__StructField_Array_v__ast__Type mr_60008 = (*(multi_return_v__ast__StructField_Array_v__ast__Type*)_t13.data); - field = mr_60008.arg0; - embed_types = mr_60008.arg1; + multi_return_v__ast__StructField_Array_v__ast__Type mr_59690 = (*(multi_return_v__ast__StructField_Array_v__ast__Type*)_t13.data); + field = mr_59690.arg0; + embed_types = mr_59690.arg1; node->from_embed_types = embed_types; if (sym->kind == v__ast__Kind__aggregate || sym->kind == v__ast__Kind__sum_type) { unknown_field_msg = IError_name_table[err._typ]._method_msg(err._object); @@ -48143,9 +47916,9 @@ v__ast__Type v__checker__Checker_selector_expr(v__checker__Checker* c, v__ast__S *(multi_return_v__ast__StructField_Array_v__ast__Type*) _t15.data = (multi_return_v__ast__StructField_Array_v__ast__Type){.arg0=((v__ast__StructField){.pos = (v__token__Pos){.len = 0,.line_nr = 0,.pos = 0,.col = 0,.last_line = 0,},.type_pos = (v__token__Pos){.len = 0,.line_nr = 0,.pos = 0,.col = 0,.last_line = 0,},.comments = __new_array(0, 0, sizeof(v__ast__Comment)),.has_default_expr = 0,.attrs = __new_array(0, 0, sizeof(v__ast__Attr)),.is_pub = 0,.default_val = (string){.str=(byteptr)"", .is_lit=1},.is_mut = 0,.is_global = 0,.is_volatile = 0,.default_expr = {0},.default_expr_typ = 0,.name = (string){.str=(byteptr)"", .is_lit=1},.typ = 0,}),.arg1=__new_array_with_default(0, 0, sizeof(v__ast__Type), 0)}; } - multi_return_v__ast__StructField_Array_v__ast__Type mr_60839 = (*(multi_return_v__ast__StructField_Array_v__ast__Type*)_t15.data); - field = mr_60839.arg0; - embed_types = mr_60839.arg1; + multi_return_v__ast__StructField_Array_v__ast__Type mr_60521 = (*(multi_return_v__ast__StructField_Array_v__ast__Type*)_t15.data); + field = mr_60521.arg0; + embed_types = mr_60521.arg1; node->from_embed_types = embed_types; } } @@ -50343,8 +50116,8 @@ v__ast__Type v__checker__Checker_postfix_expr(v__checker__Checker* c, v__ast__Po string typ_str = v__ast__Table_type_to_str(c->table, typ); v__checker__Checker_error(c, str_intp(3, _MOV((StrIntpData[]){{_SLIT("invalid operation: "), 0xfe10, {.d_s = v__token__Kind_str(node->op)}}, {_SLIT(" (non-numeric type `"), 0xfe10, {.d_s = typ_str}}, {_SLIT("`)"), 0, { .d_c = 0 }}})), node->pos); } else { - multi_return_string_v__token__Pos mr_114290 = v__checker__Checker_fail_if_immutable(c, node->expr); - node->auto_locked = mr_114290.arg0; + multi_return_string_v__token__Pos mr_113972 = v__checker__Checker_fail_if_immutable(c, node->expr); + node->auto_locked = mr_113972.arg0; } v__ast__Type _t1 = typ; return _t1; @@ -53315,6 +53088,9 @@ v__ast__Scope* prev_fn_scope; if (Array_string_contains(_const_v__checker__reserved_type_names, param->name)) { v__checker__Checker_error(c, str_intp(2, _MOV((StrIntpData[]){{_SLIT("invalid use of reserved type `"), 0xfe10, {.d_s = param->name}}, {_SLIT("` as a parameter name"), 0, { .d_c = 0 }}})), param->pos); } + if (v__ast__Type_has_flag(param->typ, v__ast__TypeFlag__optional)) { + v__checker__Checker_error(c, _SLIT("optional type argument is not supported currently"), param->type_pos); + } if (!v__ast__Type_is_ptr(param->typ)) { v__ast__TypeSymbol* arg_typ_sym = v__ast__Table_sym(c->table, param->typ); if (arg_typ_sym->kind == v__ast__Kind__struct_) { @@ -53964,9 +53740,9 @@ v__ast__Type v__checker__Checker_fn_call(v__checker__Checker* c, v__ast__CallExp v__checker__Checker_error(c, _SLIT("function with `shared` arguments cannot be called inside `lock`/`rlock` block"), call_arg->pos); } if (call_arg->is_mut) { - multi_return_string_v__token__Pos mr_28446 = v__checker__Checker_fail_if_immutable(c, call_arg->expr); - string to_lock = mr_28446.arg0; - v__token__Pos pos = mr_28446.arg1; + multi_return_string_v__token__Pos mr_28570 = v__checker__Checker_fail_if_immutable(c, call_arg->expr); + string to_lock = mr_28570.arg0; + v__token__Pos pos = mr_28570.arg1; if (!v__ast__Expr_is_lvalue(call_arg->expr)) { v__checker__Checker_error(c, _SLIT("cannot pass expression as `mut`"), v__ast__Expr_pos(call_arg->expr)); } @@ -54309,9 +54085,9 @@ v__ast__Type v__checker__Checker_method_call(v__checker__Checker* c, v__ast__Cal *(multi_return_v__ast__Fn_Array_v__ast__Type*) _t22.data = (multi_return_v__ast__Fn_Array_v__ast__Type){.arg0=((v__ast__Fn){.is_variadic = 0,.language = 0,.is_pub = 0,.is_ctor_new = 0,.is_deprecated = 0,.is_noreturn = 0,.is_unsafe = 0,.is_placeholder = 0,.is_main = 0,.is_test = 0,.is_keep_alive = 0,.is_method = 0,.no_body = 0,.mod = (string){.str=(byteptr)"", .is_lit=1},.file = (string){.str=(byteptr)"", .is_lit=1},.file_mode = 0,.pos = (v__token__Pos){.len = 0,.line_nr = 0,.pos = 0,.col = 0,.last_line = 0,},.return_type_pos = (v__token__Pos){.len = 0,.line_nr = 0,.pos = 0,.col = 0,.last_line = 0,},.return_type = 0,.receiver_type = 0,.name = (string){.str=(byteptr)"", .is_lit=1},.params = __new_array(0, 0, sizeof(v__ast__Param)),.source_fn = 0,.usages = 0,.generic_names = __new_array(0, 0, sizeof(string)),.attrs = __new_array(0, 0, sizeof(v__ast__Attr)),.is_conditional = 0,.ctdefine_idx = 0,}),.arg1=__new_array_with_default(0, 0, sizeof(v__ast__Type), 0)}; } - multi_return_v__ast__Fn_Array_v__ast__Type mr_41665 = (*(multi_return_v__ast__Fn_Array_v__ast__Type*)_t22.data); - method = mr_41665.arg0; - embed_types = mr_41665.arg1; + multi_return_v__ast__Fn_Array_v__ast__Type mr_41789 = (*(multi_return_v__ast__Fn_Array_v__ast__Type*)_t22.data); + method = mr_41789.arg0; + embed_types = mr_41789.arg1; if (embed_types.len != 0) { is_method_from_embed = true; node->from_embed_types = embed_types; @@ -54332,9 +54108,9 @@ v__ast__Type v__checker__Checker_method_call(v__checker__Checker* c, v__ast__Cal v__checker__Checker_error(c, _SLIT("method with `shared` receiver cannot be called inside `lock`/`rlock` block"), node->pos); } if ((*(v__ast__Param*)/*ee elem_sym */array_get(method.params, 0)).is_mut) { - multi_return_string_v__token__Pos mr_42796 = v__checker__Checker_fail_if_immutable(c, node->left); - string to_lock = mr_42796.arg0; - v__token__Pos pos = mr_42796.arg1; + multi_return_string_v__token__Pos mr_42920 = v__checker__Checker_fail_if_immutable(c, node->left); + string to_lock = mr_42920.arg0; + v__token__Pos pos = mr_42920.arg1; if (!v__ast__Expr_is_lvalue(node->left)) { v__checker__Checker_error(c, _SLIT("cannot pass expression as `mut`"), v__ast__Expr_pos(node->left)); } @@ -54436,9 +54212,9 @@ v__ast__Type v__checker__Checker_method_call(v__checker__Checker* c, v__ast__Cal v__checker__Checker_error(c, _SLIT("method with `shared` arguments cannot be called inside `lock`/`rlock` block"), arg->pos); } if (arg->is_mut) { - multi_return_string_v__token__Pos mr_46810 = v__checker__Checker_fail_if_immutable(c, arg->expr); - string to_lock = mr_46810.arg0; - v__token__Pos pos = mr_46810.arg1; + multi_return_string_v__token__Pos mr_46934 = v__checker__Checker_fail_if_immutable(c, arg->expr); + string to_lock = mr_46934.arg0; + v__token__Pos pos = mr_46934.arg1; if (!param_is_mut) { string tok = v__ast__ShareType_str(arg->share); v__checker__Checker_error(c, str_intp(5, _MOV((StrIntpData[]){{_SLIT("`"), 0xfe10, {.d_s = node->name}}, {_SLIT("` parameter `"), 0xfe10, {.d_s = param.name}}, {_SLIT("` is not `"), 0xfe10, {.d_s = tok}}, {_SLIT("`, `"), 0xfe10, {.d_s = tok}}, {_SLIT("` is not needed`"), 0, { .d_c = 0 }}})), v__ast__Expr_pos(arg->expr)); @@ -54620,8 +54396,8 @@ v__ast__Type v__checker__Checker_method_call(v__checker__Checker* c, v__ast__Cal return _t43; } - multi_return_v__ast__StructField_Array_v__ast__Type mr_53710 = (*(multi_return_v__ast__StructField_Array_v__ast__Type*)_t42.data); - node->from_embed_types = mr_53710.arg1; + multi_return_v__ast__StructField_Array_v__ast__Type mr_53834 = (*(multi_return_v__ast__StructField_Array_v__ast__Type*)_t42.data); + node->from_embed_types = mr_53834.arg1; v__ast__Type _t44 = info.func.return_type; return _t44; } @@ -55466,6 +55242,9 @@ VV_LOCAL_SYMBOL void v__checker__Checker_smartcast_if_conds(v__checker__Checker* v__ast__TypeSymbol* left_sym = v__ast__Table_sym(c->table, (*node._v__ast__InfixExpr).left_type); v__ast__TypeSymbol* right_sym = v__ast__Table_sym(c->table, right_type); v__ast__Type expr_type = v__checker__Checker_unwrap_generic(c, v__checker__Checker_expr(c, (*node._v__ast__InfixExpr).left)); + if (left_sym->kind == v__ast__Kind__aggregate) { + expr_type = (/* as */ *(v__ast__Aggregate*)__as_cast((left_sym->info)._v__ast__Aggregate,(left_sym->info)._typ, 468) /*expected idx: 468, name: v.ast.Aggregate */ ).sum_type; + } if (left_sym->kind == v__ast__Kind__interface_) { if (right_sym->kind != v__ast__Kind__interface_) { v__checker__Checker_type_implements(c, right_type, expr_type, (*node._v__ast__InfixExpr).pos); @@ -56104,7 +55883,7 @@ VV_LOCAL_SYMBOL void v__checker__Checker_match_exprs(v__checker__Checker* c, v__ v__ast__Type ti = it.typ; array_push((array*)&_t4, &ti); } - expr_type = v__ast__Table_register_sym(c->table, ((v__ast__TypeSymbol){.parent_idx = 0,.info = v__ast__Aggregate_to_sumtype_v__ast__TypeInfo(ADDR(v__ast__Aggregate, (((v__ast__Aggregate){.fields = __new_array(0, 0, sizeof(v__ast__StructField)),.types =_t4,})))),.kind = v__ast__Kind__aggregate,.name = name,.cname = strings__Builder_str(&agg_cname),.methods = __new_array(0, 0, sizeof(v__ast__Fn)),.mod = c->mod,.is_pub = 0,.language = 0,.idx = 0,})); + expr_type = v__ast__Table_register_sym(c->table, ((v__ast__TypeSymbol){.parent_idx = 0,.info = v__ast__Aggregate_to_sumtype_v__ast__TypeInfo(ADDR(v__ast__Aggregate, (((v__ast__Aggregate){.fields = __new_array(0, 0, sizeof(v__ast__StructField)),.sum_type = node->cond_type,.types =_t4,})))),.kind = v__ast__Kind__aggregate,.name = name,.cname = strings__Builder_str(&agg_cname),.methods = __new_array(0, 0, sizeof(v__ast__Fn)),.mod = c->mod,.is_pub = 0,.language = 0,.idx = 0,})); } } else { expr_type = (*(v__ast__TypeNode*)/*ee elem_sym */array_get(expr_types, 0)).typ; @@ -56480,20 +56259,23 @@ void v__checker__Checker_return_stmt(v__checker__Checker* c, v__ast__Return* nod } } Array_v__ast__Type got_types = __new_array_with_default(0, 0, sizeof(v__ast__Type), 0); - for (int _t3 = 0; _t3 < node->exprs.len; ++_t3) { - v__ast__Expr expr = ((v__ast__Expr*)node->exprs.data)[_t3]; + Array_int expr_idxs = __new_array_with_default(0, 0, sizeof(int), 0); + for (int i = 0; i < node->exprs.len; ++i) { + v__ast__Expr expr = ((v__ast__Expr*)node->exprs.data)[i]; v__ast__Type typ = v__checker__Checker_expr(c, expr); if (v__ast__Type_alias_eq(typ, _const_v__ast__void_type)) { v__checker__Checker_error(c, str_intp(2, _MOV((StrIntpData[]){{_SLIT("`"), 0xfe10, {.d_s = v__ast__Expr_str(expr)}}, {_SLIT("` used as value"), 0, { .d_c = 0 }}})), node->pos); } v__ast__TypeSymbol* sym = v__ast__Table_sym(c->table, typ); if (sym->kind == v__ast__Kind__multi_return) { - for (int _t4 = 0; _t4 < v__ast__TypeSymbol_mr_info(sym).types.len; ++_t4) { - v__ast__Type t = ((v__ast__Type*)v__ast__TypeSymbol_mr_info(sym).types.data)[_t4]; + for (int _t3 = 0; _t3 < v__ast__TypeSymbol_mr_info(sym).types.len; ++_t3) { + v__ast__Type t = ((v__ast__Type*)v__ast__TypeSymbol_mr_info(sym).types.data)[_t3]; array_push((array*)&got_types, _MOV((v__ast__Type[]){ t })); + array_push((array*)&expr_idxs, _MOV((int[]){ i })); } } else { array_push((array*)&got_types, _MOV((v__ast__Type[]){ typ })); + array_push((array*)&expr_idxs, _MOV((int[]){ i })); } } node->types = got_types; @@ -56514,7 +56296,7 @@ void v__checker__Checker_return_stmt(v__checker__Checker* c, v__ast__Return* nod v__ast__Type exp_type = ((v__ast__Type*)expected_types.data)[i]; v__ast__Type got_typ = v__checker__Checker_unwrap_generic(c, (*(v__ast__Type*)/*ee elem_sym */array_get(got_types, i))); if (v__ast__Type_has_flag(got_typ, v__ast__TypeFlag__optional) && (!v__ast__Type_has_flag(exp_type, v__ast__TypeFlag__optional) || !string__eq(v__ast__Table_type_to_str(c->table, got_typ), v__ast__Table_type_to_str(c->table, exp_type)))) { - v__token__Pos pos = v__ast__Expr_pos((*(v__ast__Expr*)/*ee elem_sym */array_get(node->exprs, i))); + v__token__Pos pos = v__ast__Expr_pos((*(v__ast__Expr*)/*ee elem_sym */array_get(node->exprs, (*(int*)/*ee elem_sym */array_get(expr_idxs, i))))); v__checker__Checker_error(c, str_intp(3, _MOV((StrIntpData[]){{_SLIT("cannot use `"), 0xfe10, {.d_s = v__ast__Table_type_to_str(c->table, got_typ)}}, {_SLIT("` as type `"), 0xfe10, {.d_s = v__ast__Table_type_to_str(c->table, exp_type)}}, {_SLIT("` in return argument"), 0, { .d_c = 0 }}})), pos); } if (!v__checker__Checker_check_types(c, got_typ, exp_type)) { @@ -56523,24 +56305,24 @@ void v__checker__Checker_return_stmt(v__checker__Checker* c, v__ast__Return* nod if (exp_typ_sym->kind == v__ast__Kind__interface_) { if (v__checker__Checker_type_implements(c, got_typ, exp_type, node->pos)) { if (!v__ast__Type_is_ptr(got_typ) && !v__ast__Type_is_pointer(got_typ) && got_typ_sym->kind != v__ast__Kind__interface_ && !c->inside_unsafe) { - v__checker__Checker_mark_as_referenced(c, &(*(v__ast__Expr*)/*ee elem_sym */array_get(node->exprs, i)), true); + v__checker__Checker_mark_as_referenced(c, &(*(v__ast__Expr*)/*ee elem_sym */array_get(node->exprs, (*(int*)/*ee elem_sym */array_get(expr_idxs, i)))), true); } } continue; } - v__token__Pos pos = v__ast__Expr_pos((*(v__ast__Expr*)/*ee elem_sym */array_get(node->exprs, i))); + v__token__Pos pos = v__ast__Expr_pos((*(v__ast__Expr*)/*ee elem_sym */array_get(node->exprs, (*(int*)/*ee elem_sym */array_get(expr_idxs, i))))); v__checker__Checker_error(c, str_intp(3, _MOV((StrIntpData[]){{_SLIT("cannot use `"), 0xfe10, {.d_s = got_typ_sym->name}}, {_SLIT("` as type `"), 0xfe10, {.d_s = v__ast__Table_type_to_str(c->table, exp_type)}}, {_SLIT("` in return argument"), 0, { .d_c = 0 }}})), pos); } if ((v__ast__Type_is_ptr(got_typ) || v__ast__Type_is_pointer(got_typ)) && (!v__ast__Type_is_ptr(exp_type) && !v__ast__Type_is_pointer(exp_type))) { - v__token__Pos pos = v__ast__Expr_pos((*(v__ast__Expr*)/*ee elem_sym */array_get(node->exprs, i))); - if (v__ast__Expr_is_auto_deref_var((*(v__ast__Expr*)/*ee elem_sym */array_get(node->exprs, i)))) { + v__token__Pos pos = v__ast__Expr_pos((*(v__ast__Expr*)/*ee elem_sym */array_get(node->exprs, (*(int*)/*ee elem_sym */array_get(expr_idxs, i))))); + if (v__ast__Expr_is_auto_deref_var((*(v__ast__Expr*)/*ee elem_sym */array_get(node->exprs, (*(int*)/*ee elem_sym */array_get(expr_idxs, i)))))) { continue; } v__checker__Checker_error(c, str_intp(4, _MOV((StrIntpData[]){{_SLIT("fn `"), 0xfe10, {.d_s = c->table->cur_fn->name}}, {_SLIT("` expects you to return a non reference type `"), 0xfe10, {.d_s = v__ast__Table_type_to_str(c->table, exp_type)}}, {_SLIT("`, but you are returning `"), 0xfe10, {.d_s = v__ast__Table_type_to_str(c->table, got_typ)}}, {_SLIT("` instead"), 0, { .d_c = 0 }}})), pos); } if ((v__ast__Type_is_ptr(exp_type) || v__ast__Type_is_pointer(exp_type)) && (!v__ast__Type_is_ptr(got_typ) && !v__ast__Type_is_pointer(got_typ)) && !v__ast__Type_alias_eq(got_typ, _const_v__ast__int_literal_type) && !c->pref->translated && !c->file->is_translated) { - v__token__Pos pos = v__ast__Expr_pos((*(v__ast__Expr*)/*ee elem_sym */array_get(node->exprs, i))); - if (v__ast__Expr_is_auto_deref_var((*(v__ast__Expr*)/*ee elem_sym */array_get(node->exprs, i)))) { + v__token__Pos pos = v__ast__Expr_pos((*(v__ast__Expr*)/*ee elem_sym */array_get(node->exprs, (*(int*)/*ee elem_sym */array_get(expr_idxs, i))))); + if (v__ast__Expr_is_auto_deref_var((*(v__ast__Expr*)/*ee elem_sym */array_get(node->exprs, (*(int*)/*ee elem_sym */array_get(expr_idxs, i)))))) { continue; } v__checker__Checker_error(c, str_intp(4, _MOV((StrIntpData[]){{_SLIT("fn `"), 0xfe10, {.d_s = c->table->cur_fn->name}}, {_SLIT("` expects you to return a reference type `"), 0xfe10, {.d_s = v__ast__Table_type_to_str(c->table, exp_type)}}, {_SLIT("`, but you are returning `"), 0xfe10, {.d_s = v__ast__Table_type_to_str(c->table, got_typ)}}, {_SLIT("` instead"), 0, { .d_c = 0 }}})), pos); @@ -56551,13 +56333,13 @@ void v__checker__Checker_return_stmt(v__checker__Checker* c, v__ast__Return* nod if (((*r_expr->_v__ast__Ident).obj)._typ == 363 /* v.ast.Var */) { v__ast__Var* obj = &(*(*r_expr->_v__ast__Ident).obj._v__ast__Var); if (c->fn_scope != ((voidptr)(0))) { - Option_v__ast__Var_ptr _t7 = v__ast__Scope_find_var(c->fn_scope, (*(*r_expr->_v__ast__Ident).obj._v__ast__Var).name); - if (_t7.state != 0) { /*or block*/ - IError err = _t7.err; - *(v__ast__Var**) _t7.data = obj; + Option_v__ast__Var_ptr _t8 = v__ast__Scope_find_var(c->fn_scope, (*(*r_expr->_v__ast__Ident).obj._v__ast__Var).name); + if (_t8.state != 0) { /*or block*/ + IError err = _t8.err; + *(v__ast__Var**) _t8.data = obj; } - obj = (*(v__ast__Var**)_t7.data); + obj = (*(v__ast__Var**)_t8.data); } if (obj->is_stack_obj && !c->inside_unsafe) { v__ast__TypeSymbol* type_sym = v__ast__Table_sym(c->table, v__ast__Type_set_nr_muls(obj->typ, 0)); @@ -74808,22 +74590,31 @@ VV_LOCAL_SYMBOL void v__gen__c__Gen_infix_expr_in_optimization(v__gen__c__Gen* g } VV_LOCAL_SYMBOL void v__gen__c__Gen_infix_expr_is_op(v__gen__c__Gen* g, v__ast__InfixExpr node) { - v__ast__TypeSymbol* sym = v__ast__Table_sym(g->table, node.left_type); + v__ast__TypeSymbol* left_sym = v__ast__Table_sym(g->table, node.left_type); + bool is_aggregate = left_sym->kind == v__ast__Kind__aggregate; + if (is_aggregate) { + v__ast__Type parent_left_type = (/* as */ *(v__ast__Aggregate*)__as_cast((left_sym->info)._v__ast__Aggregate,(left_sym->info)._typ, 468) /*expected idx: 468, name: v.ast.Aggregate */ ).sum_type; + left_sym = v__ast__Table_sym(g->table, parent_left_type); + } v__ast__TypeSymbol* right_sym = v__ast__Table_sym(g->table, node.right_type); - if (sym->kind == v__ast__Kind__interface_ && right_sym->kind == v__ast__Kind__interface_) { + if (left_sym->kind == v__ast__Kind__interface_ && right_sym->kind == v__ast__Kind__interface_) { v__gen__c__Gen_gen_interface_is_op(g, node); return; } string cmp_op = (node.op == v__token__Kind__key_is ? (_SLIT("==")) : (_SLIT("!="))); v__gen__c__Gen_write(g, _SLIT("(")); - v__gen__c__Gen_expr(g, node.left); + if (is_aggregate) { + v__gen__c__Gen_write(g, str_intp(2, _MOV((StrIntpData[]){{_SLIT0, 0xfe10, {.d_s = v__ast__Expr_str(node.left)}}, {_SLIT0, 0, { .d_c = 0 }}}))); + } else { + v__gen__c__Gen_expr(g, node.left); + } v__gen__c__Gen_write(g, _SLIT(")")); if (v__ast__Type_is_ptr(node.left_type)) { v__gen__c__Gen_write(g, _SLIT("->")); } else { v__gen__c__Gen_write(g, _SLIT(".")); } - if (sym->kind == v__ast__Kind__interface_) { + if (left_sym->kind == v__ast__Kind__interface_) { v__gen__c__Gen_write(g, str_intp(2, _MOV((StrIntpData[]){{_SLIT("_typ "), 0xfe10, {.d_s = cmp_op}}, {_SLIT(" "), 0, { .d_c = 0 }}}))); v__ast__Type _t1 = 0; if (node.right._typ == 331 /* v.ast.TypeNode */) { @@ -74838,9 +74629,9 @@ VV_LOCAL_SYMBOL void v__gen__c__Gen_infix_expr_is_op(v__gen__c__Gen* g, v__ast__ } v__ast__Type sub_type = _t1; v__ast__TypeSymbol* sub_sym = v__ast__Table_sym(g->table, sub_type); - v__gen__c__Gen_write(g, str_intp(3, _MOV((StrIntpData[]){{_SLIT("_"), 0xfe10, {.d_s = sym->cname}}, {_SLIT("_"), 0xfe10, {.d_s = sub_sym->cname}}, {_SLIT("_index"), 0, { .d_c = 0 }}}))); + v__gen__c__Gen_write(g, str_intp(3, _MOV((StrIntpData[]){{_SLIT("_"), 0xfe10, {.d_s = left_sym->cname}}, {_SLIT("_"), 0xfe10, {.d_s = sub_sym->cname}}, {_SLIT("_index"), 0, { .d_c = 0 }}}))); return; - } else if (sym->kind == v__ast__Kind__sum_type) { + } else if (left_sym->kind == v__ast__Kind__sum_type) { v__gen__c__Gen_write(g, str_intp(2, _MOV((StrIntpData[]){{_SLIT("_typ "), 0xfe10, {.d_s = cmp_op}}, {_SLIT(" "), 0, { .d_c = 0 }}}))); } v__gen__c__Gen_expr(g, node.right); @@ -92535,7 +92326,6 @@ void _vinit(int ___argc, voidptr ___argv) { _const_v__token__assign_tokens = new_array_from_c_array(12, 12, sizeof(v__token__Kind), _MOV((v__token__Kind[12]){ v__token__Kind__assign, v__token__Kind__plus_assign, v__token__Kind__minus_assign, v__token__Kind__mult_assign, v__token__Kind__div_assign, v__token__Kind__xor_assign, v__token__Kind__mod_assign, v__token__Kind__or_assign, v__token__Kind__and_assign, v__token__Kind__right_shift_assign, v__token__Kind__left_shift_assign, v__token__Kind__unsigned_right_shift_assign})); - _const_v__token__nr_tokens = ((int)(v__token__Kind___end_)); _const_v__token__valid_at_tokens = new_array_from_c_array(13, 13, sizeof(string), _MOV((string[13]){ _SLIT("@VROOT"), _SLIT("@VMODROOT"), _SLIT("@VEXEROOT"), _SLIT("@FN"), _SLIT("@METHOD"), _SLIT("@MOD"), _SLIT("@STRUCT"), _SLIT("@VEXE"), _SLIT("@FILE"), _SLIT("@LINE"), _SLIT("@COLUMN"), _SLIT("@VHASH"), _SLIT("@VMOD_FILE")}));