comment cleanup
This commit is contained in:
@@ -191,98 +191,6 @@ private:
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
template <class T>
|
||||
class AddPos : private T
|
||||
{
|
||||
public:
|
||||
template <class P>
|
||||
T& pos(const P &aPos)
|
||||
{
|
||||
GetEI().ensureNixCode().nixFile = aPos.file;
|
||||
GetEI().ensureNixCode().ensureErrLine().lineNumber = aPos.line;
|
||||
GetEI().ensureNixCode().ensureErrLine().columnRange = { .start = aPos.column, .len = 1 };
|
||||
return *this;
|
||||
}
|
||||
protected:
|
||||
ErrorInfo& GetEI()
|
||||
{
|
||||
return T::GetEI();
|
||||
}
|
||||
};
|
||||
|
||||
template <class T>
|
||||
class AddLOC : private T
|
||||
{
|
||||
public:
|
||||
T& linesOfCode(std::optional<string> prevloc, string loc, std::optional<string> nextloc)
|
||||
{
|
||||
GetEI().ensureNixCode().ensureErrLine().prevLineOfCode = prevloc;
|
||||
GetEI().ensureNixCode().ensureErrLine().errLineOfCode = loc;
|
||||
GetEI().ensureNixCode().ensureErrLine().nextLineOfCode = nextloc;
|
||||
return *this;
|
||||
}
|
||||
protected:
|
||||
ErrorInfo& GetEI()
|
||||
{
|
||||
return T::GetEI();
|
||||
}
|
||||
};
|
||||
*/
|
||||
|
||||
/*
|
||||
// the template layer for adding a hint.
|
||||
template <class T>
|
||||
class AddHint : private T
|
||||
{
|
||||
public:
|
||||
T& hint(const hintformat &hf)
|
||||
{
|
||||
GetEI().hint = std::optional(hf.str());
|
||||
return *this;
|
||||
}
|
||||
T& nohint()
|
||||
{
|
||||
GetEI().hint = std::nullopt;
|
||||
return *this;
|
||||
}
|
||||
protected:
|
||||
ErrorInfo& GetEI()
|
||||
{
|
||||
return T::GetEI();
|
||||
}
|
||||
};
|
||||
*/
|
||||
|
||||
// --------------------------------------------------------
|
||||
// error types
|
||||
|
||||
/*typedef AddName<
|
||||
AddDescription<
|
||||
AddHint<
|
||||
EIError>>> ProgramError;
|
||||
|
||||
typedef AddName<
|
||||
AddDescription<
|
||||
AddHint<
|
||||
EIWarning>>> ProgramWarning;
|
||||
|
||||
typedef AddName<
|
||||
AddDescription<
|
||||
AddPos<
|
||||
AddLOC<
|
||||
AddHint<
|
||||
EIError>>>>> NixLangError;
|
||||
|
||||
typedef AddName<
|
||||
AddDescription<
|
||||
AddPos<
|
||||
AddLOC<
|
||||
AddHint<
|
||||
EIWarning>>>>> NixLangWarning;
|
||||
|
||||
|
||||
*/
|
||||
// --------------------------------------------------------
|
||||
// error printing
|
||||
|
||||
|
||||
Reference in New Issue
Block a user