Precommit (#1)

* first commit

* cleanup
This commit is contained in:
tompzf
2025-11-04 13:28:06 +01:00
committed by GitHub
parent dba45dc636
commit 6ed4b1534e
898 changed files with 256340 additions and 0 deletions

View File

@@ -0,0 +1,50 @@
#include "exception.h"
#include <cassert>
CCompileException::CCompileException(const sdv::idl::XCompileError& rxCompileError)
{
static_cast<sdv::idl::XCompileError&>(*this) = rxCompileError;
}
std::string CCompileException::GetPath() const
{
return ssFile;
}
std::string CCompileException::GetReason() const
{
return ssReason;
}
void CCompileException::SetPath(const std::filesystem::path& rpath)
{
if (ssFile.empty())
ssFile = rpath.generic_u8string();
}
void CCompileException::SetLocation(const CToken& rtoken)
{
uiLine = rtoken.GetLine();
uiCol = rtoken.GetCol();
ssToken = rtoken;
}
uint32_t CCompileException::GetLineNo() const
{
return uiLine;
}
uint32_t CCompileException::GetColNo() const
{
return uiCol;
}
std::string CCompileException::GetToken() const
{
return ssToken;
}
std::string CCompileException::GetLine() const
{
return ssLine;
}