formalize file/folder evaluations; use set-types for files/folders so that we can evaluate both file metadata & contents, rather than just assuming the contents; adjust slice view rule to just expand to the contents, rather than achieving the slice with a changed type

This commit is contained in:
Ryan Fleury
2025-02-16 14:13:48 -08:00
parent c603457460
commit 7d84ec79c5
14 changed files with 371 additions and 146 deletions
+3 -3
View File
@@ -241,7 +241,7 @@ E_LOOKUP_RANGE_FUNCTION_DEF(registers)
}
////////////////////////////////
//~ rjf: Top-Level Config Eval Hooks
//~ rjf: Config Eval Hooks
typedef struct RD_CfgLookupAccel RD_CfgLookupAccel;
struct RD_CfgLookupAccel
@@ -2057,7 +2057,7 @@ rd_title_fstrs_from_cfg(Arena *arena, RD_Cfg *cfg, Vec4F32 secondary_color, F32
//
DR_FStrParams params = {rd_font_from_slot(RD_FontSlot_Main), rd_raster_flags_from_slot(RD_FontSlot_Main), rgba, size};
B32 running_is_secondary = 0;
#define start_secondary() if(!running_is_secondary){running_is_secondary = 1; params.color = secondary_color; params.size = size*0.8f;}
#define start_secondary() if(!running_is_secondary){running_is_secondary = 1; params.color = secondary_color; params.size = size*0.95f;}
//- rjf: push icon
if(icon_kind != RD_IconKind_Null)
@@ -6941,7 +6941,7 @@ rd_window_frame(void)
RD_RegsScope(.view = view->id)
{
rd_cfg_new_replace(expr, ws->hover_eval_string);
EV_BlockTree predicted_block_tree = ev_block_tree_from_eval(scratch.arena, rd_view_eval_view(), str8_zero(), hover_eval);
EV_BlockTree predicted_block_tree = ev_block_tree_from_exprs(scratch.arena, rd_view_eval_view(), str8_zero(), hover_eval.exprs);
F32 row_height_px = floor_f32(ui_top_font_size()*2.5f);
U64 max_row_count = (U64)floor_f32(ui_top_font_size()*10.f / row_height_px);
if(ws->hover_eval_focused)
+3 -3
View File
@@ -1108,7 +1108,7 @@ rd_watch_row_info_from_row(Arena *arena, EV_Row *row)
}
// rjf: for 'add-new' rows in meta-cfg evaluation spaces, only do expr
else if(info.eval.exprs.last == &e_expr_nil && info.group_cfg_name.size != 0)
else if(info.eval.exprs.last == &e_expr_nil && info.group_cfg_name.size != 0 && info.group_cfg_child == &rd_nil_cfg)
{
rd_watch_cell_list_push_new(arena, &info.cells, RD_WatchCellKind_Expr, .pct = 1.f);
}
@@ -1554,7 +1554,7 @@ RD_VIEW_UI_FUNCTION_DEF(watch)
{
ev_key_set_expansion(eval_view, ev_key_root(), ev_key_make(ev_hash_from_key(ev_key_root()), 1), 1);
}
block_tree = ev_block_tree_from_eval(scratch.arena, eval_view, filter, eval);
block_tree = ev_block_tree_from_exprs(scratch.arena, eval_view, filter, eval.exprs);
block_ranges = ev_block_range_list_from_tree(scratch.arena, &block_tree);
if(implicit_root && block_ranges.first != 0)
{
@@ -3438,7 +3438,7 @@ RD_VIEW_UI_FUNCTION_DEF(text)
B32 file_is_out_of_date = 0;
String8 out_of_date_dbgi_name = {0};
{
U64 file_timestamp = fs_timestamp_from_path(rd_regs()->file_path);
U64 file_timestamp = fs_properties_from_path(rd_regs()->file_path).modified;
if(file_timestamp != 0)
{
for(DI_KeyNode *n = dbgi_keys.first; n != 0; n = n->next)