OpenASIP  2.0
Public Member Functions | Public Attributes | List of all members
CompilerMessage Struct Reference

#include <AssemblyParserDiagnostic.hh>

Collaboration diagram for CompilerMessage:
Collaboration graph

Public Member Functions

std::string toString () const
 
bool operator< (const CompilerMessage &other) const
 

Public Attributes

std::string message = ""
 Message. More...
 
std::string assemblerLine = ""
 Assembly code line number. More...
 
UValue lineNumber = 0
 Message generation line number. More...
 

Detailed Description

Struct for parser reports.

Definition at line 46 of file AssemblyParserDiagnostic.hh.

Member Function Documentation

◆ operator<()

bool CompilerMessage::operator< ( const CompilerMessage other) const
inline

Definition at line 57 of file AssemblyParserDiagnostic.hh.

57  {
58  auto mine = std::tie(lineNumber, assemblerLine, message);
59  auto theirs = std::tie(
60  other.lineNumber, other.assemblerLine, other.message);
61  return mine < theirs;
62  }

References assemblerLine, lineNumber, and message.

◆ toString()

std::string CompilerMessage::toString ( ) const
inline

Definition at line 51 of file AssemblyParserDiagnostic.hh.

51  {
52  return std::string("Warning in line ") + std::to_string(lineNumber)
53  + ": " + assemblerLine + "\n"
54  + "reason: " + message;
55  }

References assemblerLine, lineNumber, and message.

Member Data Documentation

◆ assemblerLine

std::string CompilerMessage::assemblerLine = ""

◆ lineNumber

UValue CompilerMessage::lineNumber = 0

◆ message

std::string CompilerMessage::message = ""

The documentation for this struct was generated from the following file:
CompilerMessage::message
std::string message
Message.
Definition: AssemblyParserDiagnostic.hh:47
CompilerMessage::assemblerLine
std::string assemblerLine
Assembly code line number.
Definition: AssemblyParserDiagnostic.hh:48
CompilerMessage::lineNumber
UValue lineNumber
Message generation line number.
Definition: AssemblyParserDiagnostic.hh:49