mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-06-13 07:32:23 -07:00
eval: adjust array expansion, use parent key of pointer argument, rather than key of pointer argument, to scope count expression evaluation; fix up a few edge cases with $. and implicit $ member accesses; make omit much more powerful, by allowing list of arguments to control all expansion expressions, rather than assuming only member names
This commit is contained in:
+2
-2
@@ -715,7 +715,7 @@ e_push_irtree_and_type_from_expr(Arena *arena, E_IRTreeAndType *root_parent, E_I
|
||||
String8 full_qualified_name = str8_list_join(scratch.arena, &parts, &(StringJoin){.sep = str8_lit(".")});
|
||||
E_Expr *leaf_expr_name = e_push_expr(scratch.arena, E_ExprKind_LeafIdentifier, r1u64(0, 0));
|
||||
leaf_expr_name->string = full_qualified_name;
|
||||
result = e_push_irtree_and_type_from_expr(arena, root_parent, &e_default_identifier_resolution_rule, disallow_autohooks, disallow_autohooks, leaf_expr_name);
|
||||
result = e_push_irtree_and_type_from_expr(arena, parent, &e_default_identifier_resolution_rule, disallow_autohooks, disallow_autohooks, leaf_expr_name);
|
||||
}
|
||||
}
|
||||
}break;
|
||||
@@ -1627,7 +1627,7 @@ e_push_irtree_and_type_from_expr(Arena *arena, E_IRTreeAndType *root_parent, E_I
|
||||
for(E_IRTreeAndType *prev = parent; prev != 0; prev = prev->prev)
|
||||
{
|
||||
E_Expr *access = e_expr_irext_member_access(scratch.arena, &e_expr_nil, prev, string);
|
||||
E_IRTreeAndType access_irtree = e_push_irtree_and_type_from_expr(scratch.arena, prev, &e_default_identifier_resolution_rule, disallow_autohooks, 1, access);
|
||||
E_IRTreeAndType access_irtree = e_push_irtree_and_type_from_expr(scratch.arena, root_parent, &e_default_identifier_resolution_rule, disallow_autohooks, 1, access);
|
||||
if(access_irtree.root != &e_irnode_nil)
|
||||
{
|
||||
string_mapped = 1;
|
||||
|
||||
@@ -2423,10 +2423,10 @@ E_TYPE_EXPAND_RANGE_FUNCTION_DEF(only)
|
||||
for(U64 idx = idx_range.min; idx < idx_range.max; idx += 1, out_idx += 1)
|
||||
{
|
||||
E_Expr *arg = type->args[idx];
|
||||
if(arg->string.size != 0)
|
||||
{
|
||||
evals_out[out_idx] = e_eval_wrapf(eval, "$.%S", arg->string);
|
||||
}
|
||||
Temp scratch = scratch_begin(&arena, 1);
|
||||
String8 string = e_string_from_expr(scratch.arena, arg, str8_zero());
|
||||
evals_out[out_idx] = e_eval_wrap(eval, string);
|
||||
scratch_end(scratch);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2522,7 +2522,7 @@ E_TYPE_EXPAND_INFO_FUNCTION_DEF(array)
|
||||
{
|
||||
E_Type *type = e_type_from_key(eval.irtree.type_key);
|
||||
U64 count = 1;
|
||||
if(type->args != 0 && type->count > 0) E_ParentKey(eval.key)
|
||||
if(type->args != 0 && type->count > 0) E_ParentKey(eval.parent_key)
|
||||
{
|
||||
E_Key count_key = e_key_from_expr(type->args[0]);
|
||||
E_Value count_value = e_value_from_key(count_key);
|
||||
|
||||
Reference in New Issue
Block a user