Go to the documentation of this file.
41 std::shared_ptr<const std::string> assemblyText) {
47 for (
size_t pos = 0; pos <
listing_->size(); pos++) {
58 const std::string& message) {
69 UValue lineNumber,
const std::string& message) {
97 std::string errorLine;
101 unsigned int errorLineNum =
102 static_cast<unsigned int>(lineNumber - 1);
106 std::string::size_type startPos =
109 std::string::size_type endPos =
listing_->find(
'\n', startPos);
112 if (endPos == std::string::npos) {
116 errorLine =
listing_->substr(startPos, endPos - startPos);
119 errorLine =
"Invalid line number info, probably last line of file.";
std::set< CompilerMessage > codeErrors_
Error messages with line number.
std::string message
Message.
std::string assemblerLine
Assembly code line number.
#define assert(condition)
UValue lineNumber
Message generation line number.
std::set< CompilerMessage > otherErrors_
For positionless and internal errors.
void addError(UValue lineNumber, const std::string &message)
std::string codeLine(UValue lineNumber) const
std::vector< UValue > lineStarts_
New line start positions in assembly listing.
std::set< CompilerMessage > warnings_
Warning messages.
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)