mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-07-13 13:01:25 -07:00
bswap view rule
This commit is contained in:
+1
-1
@@ -86,7 +86,7 @@ E_ExprKindTable:
|
||||
|
||||
{ Cast Null 1 "cast" "(" ")" "" }
|
||||
{ Sizeof UnaryPrefix 1 "sizeof" "sizeof" "" "" }
|
||||
{ ByteSwap UnaryPrefix 1 "bswap" "bswap" "(" ")"}
|
||||
{ ByteSwap UnaryPrefix 1 "bswap" "bswap" ."(" ")"}
|
||||
|
||||
{ Neg UnaryPrefix 2 "-" "-" "" "" }
|
||||
{ LogNot UnaryPrefix 2 "!" "!" "" "" }
|
||||
|
||||
@@ -716,6 +716,15 @@ e_expr_ref_cast(Arena *arena, E_TypeKey type_key, E_Expr *rhs)
|
||||
return root;
|
||||
}
|
||||
|
||||
internal E_Expr *
|
||||
e_expr_ref_bswap(Arena *arena, E_Expr *rhs)
|
||||
{
|
||||
E_Expr *root = e_push_expr(arena, E_ExprKind_ByteSwap, 0);
|
||||
E_Expr *rhs_ref = e_expr_ref(arena, rhs);
|
||||
e_expr_push_child(root, rhs_ref);
|
||||
return root;
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Expression Tree -> String Conversions
|
||||
|
||||
|
||||
@@ -222,6 +222,7 @@ internal E_Expr *e_expr_ref_member_access(Arena *arena, E_Expr *lhs, String8 mem
|
||||
internal E_Expr *e_expr_ref_array_index(Arena *arena, E_Expr *lhs, U64 index);
|
||||
internal E_Expr *e_expr_ref_deref(Arena *arena, E_Expr *rhs);
|
||||
internal E_Expr *e_expr_ref_cast(Arena *arena, E_TypeKey type_key, E_Expr *rhs);
|
||||
internal E_Expr *e_expr_ref_bswap(Arena *arena, E_Expr *rhs);
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Expression Tree -> String Conversions
|
||||
|
||||
@@ -88,7 +88,7 @@ E_OpInfo e_expr_kind_op_info_table[45] =
|
||||
{ E_OpKind_UnaryPrefix, 2, str8_lit_comp("&"), str8_lit_comp(""), str8_lit_comp("Address") },
|
||||
{ E_OpKind_Null, 1, str8_lit_comp("("), str8_lit_comp(")"), str8_lit_comp("Cast") },
|
||||
{ E_OpKind_UnaryPrefix, 1, str8_lit_comp("sizeof"), str8_lit_comp(""), str8_lit_comp("Sizeof") },
|
||||
{ E_OpKind_UnaryPrefix, 1, str8_lit_comp("bswap"), str8_lit_comp("("), str8_lit_comp("ByteSwap") },
|
||||
{ E_OpKind_UnaryPrefix, 1, str8_lit_comp("bswap"), str8_lit_comp("."), str8_lit_comp("ByteSwap") },
|
||||
{ E_OpKind_UnaryPrefix, 2, str8_lit_comp("-"), str8_lit_comp(""), str8_lit_comp("Neg") },
|
||||
{ E_OpKind_UnaryPrefix, 2, str8_lit_comp("!"), str8_lit_comp(""), str8_lit_comp("LogNot") },
|
||||
{ E_OpKind_UnaryPrefix, 2, str8_lit_comp("~"), str8_lit_comp(""), str8_lit_comp("BitNot") },
|
||||
|
||||
Reference in New Issue
Block a user