回档之后的重写。部分问题修复。添加了什么我也忘了
This commit is contained in:
22
src/Bytecode/CompileError.hpp
Normal file
22
src/Bytecode/CompileError.hpp
Normal file
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
|
||||
#include <Error/error.hpp>
|
||||
|
||||
namespace Fig
|
||||
{
|
||||
class CompileError : public AddressableError
|
||||
{
|
||||
using AddressableError::AddressableError;
|
||||
|
||||
virtual FString toString() const override
|
||||
{
|
||||
std::string msg = std::format("[CompileError] {} in [{}] {}",
|
||||
this->message.toBasicString(),
|
||||
this->src_loc.file_name(),
|
||||
this->src_loc.function_name());
|
||||
return FString(msg);
|
||||
}
|
||||
|
||||
virtual FString getErrorType() const override { return FString(u8"CompileError"); }
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user