view params, pulled either from cfg trees or view rule params (tag calls); expr chain parsing; correctly use tags in nested single-line eval visualization

This commit is contained in:
Ryan Fleury
2025-02-07 15:20:19 -08:00
parent 3582ab10e2
commit 3de43b8c74
6 changed files with 1195 additions and 1011 deletions
+35
View File
@@ -273,3 +273,38 @@ e_member_eval_from_eval_member_name(E_Eval eval, String8 member_name)
}
return result;
}
internal E_Value
e_value_from_string(String8 string)
{
Temp scratch = scratch_begin(0, 0);
E_Eval eval = e_eval_from_string(scratch.arena, string);
E_Eval value_eval = e_value_eval_from_eval(eval);
E_Value result = value_eval.value;
scratch_end(scratch);
return result;
}
internal E_Value
e_value_from_stringf(char *fmt, ...)
{
Temp scratch = scratch_begin(0, 0);
va_list args;
va_start(args, fmt);
String8 string = push_str8fv(scratch.arena, fmt, args);
E_Value result = e_value_from_string(string);
va_end(args);
scratch_end(scratch);
return result;
}
internal E_Value
e_value_from_expr(E_Expr *expr)
{
Temp scratch = scratch_begin(0, 0);
E_Eval eval = e_eval_from_expr(scratch.arena, expr);
E_Eval value_eval = e_value_eval_from_eval(eval);
E_Value result = value_eval.value;
scratch_end(scratch);
return result;
}
+3
View File
@@ -30,5 +30,8 @@ internal E_Eval e_dynamically_typed_eval_from_eval(E_Eval eval);
internal E_Eval e_value_eval_from_eval(E_Eval eval);
internal E_Eval e_element_eval_from_array_eval_index(E_Eval eval, U64 index);
internal E_Eval e_member_eval_from_eval_member_name(E_Eval eval, String8 member_name);
internal E_Value e_value_from_string(String8 string);
internal E_Value e_value_from_stringf(char *fmt, ...);
internal E_Value e_value_from_expr(E_Expr *expr);
#endif // EVAL_BUNDLES_H
+1037 -994
View File
File diff suppressed because it is too large Load Diff