god::coordinates#
Note
Declared in <god/base.hpp>
-
class coordinates#
Represents a region of cells in syntactic input.
Members
-
std::uint32_t line_begin#
The beginning line of the region.
-
std::uint32_t line_end#
The ending line of the region.
-
std::uint32_t column_begin#
The beginning column of the region.
-
std::uint32_t column_end#
The ending column of the region.
Constructors
-
inline coordinates(std::uint32_t pline_begin, std::uint32_t pline_end, std::uint32_t pcolumn_begin, std::uint32_t pcolumn_end)#
Main constructor for the coordinates class, with an argument for each member.
-
inline coordinates()#
Fallback constructor with no arguments, setting all members to zero.
Methods
-
bool operator==(const coordinates &other) const = default#
Boolean comparison operator.
- Parameters:
other – Another coordinates object to compare
- Returns:
True if they are identical, false otherwise.
-
std::string string() const noexcept#
Get a string of the coordinates.
The returned string presents the coordinates in the order of: line_begin, column_begin, line_end, column_end in an array style syntax with two inner pairs.
- Returns:
A string representation of the coordinates.
-
std::uint32_t line_begin#