mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-07-24 00:17:52 +00:00
switch cast expressions from being formally represented in the expression tree - instead use cast-like tree shapes to perform casts in the ir/typechecking phase. this is odd, given C's casting syntax, but it is much more natural given that the parser is not any longer doing identifier resolution, and as such it fixes a bunch of nasty edge cases.
This commit is contained in:
@@ -144,7 +144,7 @@ U8 e_type_kind_basic_byte_size_table[61] =
|
||||
0,
|
||||
};
|
||||
|
||||
String8 e_expr_kind_strings[48] =
|
||||
String8 e_expr_kind_strings[49] =
|
||||
{
|
||||
str8_lit_comp("Nil"),
|
||||
str8_lit_comp("Ref"),
|
||||
@@ -193,10 +193,11 @@ str8_lit_comp("TypeIdent"),
|
||||
str8_lit_comp("Ptr"),
|
||||
str8_lit_comp("Array"),
|
||||
str8_lit_comp("Func"),
|
||||
str8_lit_comp("Unsigned"),
|
||||
str8_lit_comp("Define"),
|
||||
};
|
||||
|
||||
E_OpInfo e_expr_kind_op_info_table[48] =
|
||||
E_OpInfo e_expr_kind_op_info_table[49] =
|
||||
{
|
||||
{ E_OpKind_Null, 0, str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp("") },
|
||||
{ E_OpKind_Null, 0, str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp("") },
|
||||
@@ -245,6 +246,7 @@ E_OpInfo e_expr_kind_op_info_table[48] =
|
||||
{ E_OpKind_Null, 0, str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp("") },
|
||||
{ E_OpKind_Null, 0, str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp("") },
|
||||
{ E_OpKind_Null, 0, str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp("") },
|
||||
{ E_OpKind_Null, 0, str8_lit_comp("unsigned "), str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp("") },
|
||||
{ E_OpKind_Binary, 13, str8_lit_comp(""), str8_lit_comp(" = "), str8_lit_comp(""), str8_lit_comp("") },
|
||||
};
|
||||
|
||||
|
||||
@@ -145,6 +145,7 @@ E_ExprKind_TypeIdent,
|
||||
E_ExprKind_Ptr,
|
||||
E_ExprKind_Array,
|
||||
E_ExprKind_Func,
|
||||
E_ExprKind_Unsigned,
|
||||
E_ExprKind_Define,
|
||||
E_ExprKind_COUNT,
|
||||
} E_ExprKindEnum;
|
||||
@@ -169,8 +170,8 @@ C_LINKAGE_BEGIN
|
||||
extern String8 e_token_kind_strings[6];
|
||||
extern String8 e_type_kind_basic_string_table[61];
|
||||
extern U8 e_type_kind_basic_byte_size_table[61];
|
||||
extern String8 e_expr_kind_strings[48];
|
||||
extern E_OpInfo e_expr_kind_op_info_table[48];
|
||||
extern String8 e_expr_kind_strings[49];
|
||||
extern E_OpInfo e_expr_kind_op_info_table[49];
|
||||
extern String8 e_interpretation_code_display_strings[11];
|
||||
|
||||
C_LINKAGE_END
|
||||
|
||||
Reference in New Issue
Block a user