Add dvd builder script

This commit is contained in:
2025-05-08 20:19:44 -05:00
parent 8b1f0786f4
commit 0c1ead790d
14 changed files with 1359 additions and 51 deletions

View File

@@ -208,6 +208,7 @@ namespace Tesses::CrossLang {
this->marked = true;
this->dict->Mark();
for(auto defer : this->defers) defer->Mark();
if(this->error != nullptr) this->error->Mark();
}
TRootEnvironment* TRootEnvironment::Create(GCList* gc,TDictionary* dict)
{
@@ -225,4 +226,39 @@ namespace Tesses::CrossLang {
_gc->Watch(env);
return env;
}
};
bool TRootEnvironment::HandleException(GC* gc,TEnvironment* env, TObject err)
{
if(error != nullptr)
{
GCList ls(gc);
return ToBool(error->Call(ls, {
TDictionary::Create(ls,{
TDItem("IsBreakpoint",false),
TDItem("Exception",err),
TDItem("Environment", env)
})
}));
}
return false;
}
bool TRootEnvironment::HandleBreakpoint(GC* gc,TEnvironment* env, TObject err)
{
if(error != nullptr)
{
GCList ls(gc);
return ToBool(error->Call(ls, {
TDictionary::Create(ls,{
TDItem("IsBreakpoint",true),
TDItem("Breakpoint",err),
TDItem("Environment", env)
})
}));
}
return true;
}
void TRootEnvironment::RegisterOnError(TCallable* call)
{
this->error = call;
}
};

View File

@@ -1,6 +1,10 @@
#include "CrossLang.hpp"
namespace Tesses::CrossLang {
TDictionary* TSubEnvironment::GetDictionary()
{
return this->dict;
}
TObject TSubEnvironment::GetVariable(std::string key)
{
if(this->dict->HasValue(key))
@@ -144,4 +148,4 @@ namespace Tesses::CrossLang {
this->DeclareVariable(key, TExternalMethod::Create(ls,documentation,argNames,cb,destroy));
gc.BarrierEnd();
}
};
};