Go to the documentation of this file.
33 #ifndef ASSEMBLY_PARSER_DIAGNOSTIC_HH
34 #define ASSEMBLY_PARSER_DIAGNOSTIC_HH
52 return std::string(
"Warning in line ") + std::to_string(
lineNumber)
59 auto theirs = std::tie(
70 void reset(std::shared_ptr<const std::string> assemblyText);
74 void addError(
const std::string& message);
78 const std::set<CompilerMessage>&
warnings()
const {
86 const std::set<CompilerMessage>&
errors()
const {
108 std::shared_ptr<const std::string>
listing_ =
nullptr;
114 #endif // ASSEMBLY_PARSER_DIAGNOSTIC_HH
std::set< CompilerMessage > codeErrors_
Error messages with line number.
std::string message
Message.
std::string assemblerLine
Assembly code line number.
UValue lineNumber
Message generation line number.
std::set< CompilerMessage > otherErrors_
For positionless and internal errors.
void addError(UValue lineNumber, const std::string &message)
const std::set< CompilerMessage > & otherErrors() const
const std::set< CompilerMessage > & errors() const
std::string codeLine(UValue lineNumber) const
std::vector< UValue > lineStarts_
New line start positions in assembly listing.
std::set< CompilerMessage > warnings_
Warning messages.
bool operator<(const CompilerMessage &other) const
void addWarning(UValue lineNumber, const std::string &message)
std::shared_ptr< const std::string > listing_
The current assembly listing.
void reset(std::shared_ptr< const std::string > assemblyText)
std::string toString() const
const std::set< CompilerMessage > & warnings() const