Add doxygen documentation #4
@@ -6,15 +6,30 @@
|
||||
|
||||
namespace furc {
|
||||
|
||||
/**
|
||||
* @brief A location in file.
|
||||
*/
|
||||
struct location {
|
||||
std::string_view filename;
|
||||
std::size_t line = 0;
|
||||
std::size_t column = 0;
|
||||
std::string_view filename; /**< File's name */
|
||||
std::size_t line = 0; /**< Line */
|
||||
std::size_t column = 0; /**< Column */
|
||||
|
||||
/**
|
||||
* @brief Compare two locations for equality.
|
||||
*
|
||||
* @param rhs Location to compare against.
|
||||
* @return true if the locations are equal.
|
||||
*/
|
||||
bool operator==(const location& rhs) const {
|
||||
return filename == rhs.filename && line == rhs.line && column == rhs.column;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Compare two locations for inequality.
|
||||
*
|
||||
* @param rhs Location to compare against.
|
||||
* @return true if the locations are not equal.
|
||||
*/
|
||||
bool operator!=(const location& rhs) const { return !this->operator==(rhs); }
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user