add all visualizers to fixed tab list, derive language from view tree correctly rather than just the evaluation

This commit is contained in:
Ryan Fleury committed 2025-05-01 11:39:08 -07:00
1 parent 36e77e9691
commit 630394750e
5 files changed
+58 -34

No files matched your search

-16
View File
@@ -5415,22 +5415,6 @@ rd_lang_kind_from_eval(E_Eval eval)
{
lang_kind = txt_lang_kind_from_extension(str8_skip_last_dot(file_path));
}
if(lang_kind == TXT_LangKind_Null)
{
E_Type *type = e_type_from_key__cached(eval.irtree.type_key);
if(type->kind == E_TypeKind_Lens)
{
for EachIndex(idx, type->count)
{
E_Expr *arg = type->args[idx];
if(arg->kind == E_ExprKind_Define && str8_match(arg->first->string, str8_lit("lang"), 0))
{
lang_kind = txt_lang_kind_from_extension(arg->first->next->string);
break;
}
}
}
}
scratch_end(scratch);
return lang_kind;
}