mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-05 05:18:40 +00:00
meta-expr type operators, for meta-evaluations, to annotate source expression strings of evaluations
This commit is contained in:
@@ -367,15 +367,36 @@ E_TYPE_ACCESS_FUNCTION_DEF(schema)
|
||||
//- rjf: catchall cases
|
||||
else if(str8_match(child_schema->first->string, str8_lit("u64"), 0))
|
||||
{
|
||||
Temp scratch = scratch_begin(&arena, 1);
|
||||
child_type_key = e_type_key_basic(E_TypeKind_U64);
|
||||
E_Expr *expr = e_parse_expr_from_text(scratch.arena, child->first->string).exprs.first;
|
||||
if(expr->kind != E_ExprKind_LeafU64)
|
||||
{
|
||||
child_type_key = e_type_key_cons(.kind = E_TypeKind_MetaExpr, .name = child->first->string, .direct_key = child_type_key);
|
||||
}
|
||||
scratch_end(scratch);
|
||||
}
|
||||
else if(str8_match(child_schema->first->string, str8_lit("f32"), 0))
|
||||
{
|
||||
Temp scratch = scratch_begin(&arena, 1);
|
||||
child_type_key = e_type_key_basic(E_TypeKind_F32);
|
||||
E_Expr *expr = e_parse_expr_from_text(scratch.arena, child->first->string).exprs.first;
|
||||
if(expr->kind != E_ExprKind_LeafF32 && expr->kind != E_ExprKind_LeafF64)
|
||||
{
|
||||
child_type_key = e_type_key_cons(.kind = E_TypeKind_MetaExpr, .name = child->first->string, .direct_key = child_type_key);
|
||||
}
|
||||
scratch_end(scratch);
|
||||
}
|
||||
else if(str8_match(child_schema->first->string, str8_lit("bool"), 0))
|
||||
{
|
||||
Temp scratch = scratch_begin(&arena, 1);
|
||||
child_type_key = e_type_key_basic(E_TypeKind_Bool);
|
||||
E_Expr *expr = e_parse_expr_from_text(scratch.arena, child->first->string).exprs.first;
|
||||
if(expr->kind != E_ExprKind_LeafU64)
|
||||
{
|
||||
child_type_key = e_type_key_cons(.kind = E_TypeKind_MetaExpr, .name = child->first->string, .direct_key = child_type_key);
|
||||
}
|
||||
scratch_end(scratch);
|
||||
}
|
||||
else if(str8_match(child_schema->first->string, str8_lit("vaddr_range"), 0))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user