mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-01 11:48:10 +00:00
meta-expr type operators, for meta-evaluations, to annotate source expression strings of evaluations
This commit is contained in:
@@ -328,7 +328,7 @@ RD_NameSchemaInfo rd_name_schema_info_table[17] =
|
||||
{str8_lit_comp("settings"), str8_lit_comp("x:\n{\n @default(1) 'hover_animations': bool,\n @default(1) 'press_animations': bool,\n @default(0) 'focus_animations': bool,\n @default(1) 'tooltip_animations': bool,\n @default(1) 'menu_animations': bool,\n @default(1) 'scrolling_animations': bool,\n @default(1) 'background_blur': bool,\n @default(1) 'thread_lines': bool,\n @default(1) 'breakpoint_lines': bool,\n @default(1) 'thread_glow': bool,\n @default(1) 'breakpoint_glow': bool,\n @default(0) 'opaque_backgrounds': bool,\n @default(1) 'smooth_main_text': bool,\n @default(0) 'smooth_code_text': bool,\n @default(1) 'hint_main_text': bool,\n @default(1) 'hint_code_text': bool,\n @default(2) 'tab_width': @range[1, 32] u64,\n @can_be_per_window 'main_font_size': @range[6, 72] u64,\n @can_be_per_window 'code_font_size': @range[1, 32] u64,\n}\n")},
|
||||
{str8_lit_comp("text"), str8_lit_comp("x:\n{\n 'lang':lang,\n 'size':code_string,\n @default(1) 'show_line_numbers':bool,\n}\n")},
|
||||
{str8_lit_comp("disasm"), str8_lit_comp("x:\n{\n 'arch': arch,\n 'syntax': dasm_syntax,\n 'size': code_string,\n @default(1) 'show_addresses': bool,\n @default(0) 'show_code_bytes': bool,\n @default(1) 'show_source_lines': bool,\n @default(1) 'show_symbol_names': bool,\n @default(1) 'show_line_numbers': bool,\n}\n")},
|
||||
{str8_lit_comp("memory"), str8_lit_comp("x:\n{\n 'size': code_string,\n @default(16) 'num_columns': @range[1, 256] u64,\n @default(1) 'bytes_per_cell': @range[1, 16] u64,\n}\n")},
|
||||
{str8_lit_comp("memory"), str8_lit_comp("x:\n{\n 'size': code_string,\n @default(16) 'num_columns': @range[1, 64] u64,\n @default(1) 'bytes_per_cell': @range[1, 8] u64,\n}\n")},
|
||||
{str8_lit_comp("bitmap"), str8_lit_comp("x:\n{\n @order(0) 'w': u64,\n @order(1) 'h': u64,\n 'fmt': tex2dformat,\n}\n")},
|
||||
{str8_lit_comp("geo3d"), str8_lit_comp("x:\n{\n 'count': code_string,\n 'vtx': code_string,\n 'vtx_size': code_string,\n 'yaw': @range[0, 1] f32,\n 'pitch': @range[-0.5, 0] f32,\n 'zoom': @range[0, 100] f32,\n}\n")},
|
||||
{str8_lit_comp("target"), str8_lit_comp("@commands(enable_cfg, launch_and_run, launch_and_step_into, remove_cfg)\n@collection_commands(add_target)\nx:\n{\n 'label': code_string,\n 'executable': path,\n 'arguments': string,\n 'working_directory': path,\n 'entry_point': code_string,\n 'stdout_path': path,\n 'stderr_path': path,\n 'stdin_path': path,\n 'environment': query,\n 'debug_subprocesses': bool,\n @no_expand @default(0) 'enabled': bool,\n}\n")},
|
||||
|
||||
@@ -205,8 +205,8 @@ RD_VocabTable:
|
||||
x:
|
||||
{
|
||||
'size': code_string,
|
||||
@default(16) 'num_columns': @range[1, 256] u64,
|
||||
@default(1) 'bytes_per_cell': @range[1, 16] u64,
|
||||
@default(16) 'num_columns': @range[1, 64] u64,
|
||||
@default(1) 'bytes_per_cell': @range[1, 8] u64,
|
||||
}
|
||||
```
|
||||
}
|
||||
|
||||
@@ -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