Clingo
Loading...
Searching...
No Matches
CppClingo::Location Class Reference

The Location of an expression in an input source. More...

#include <location.hh>

Public Member Functions

 Location (Position begin, Position end)
 Construct a location.
 
auto begin () const -> Position const &
 The position where the expression starts.
 
auto end () const -> Position const &
 The position where the expression ends.
 

Friends

auto operator+ (Location const &a, Location const &b) -> Location
 Create a new location from the beginning and end of the given two locations.
 
auto operator+ (Location const &a, Position b) -> Location
 Create a new location from the beginning of the location and the position.
 
auto operator+ (Location const &a, std::optional< Position > b) -> Location
 Create a new location from the given one optionally adjusting its end position.
 
auto operator+ (Position a, Location const &b) -> Location
 Create a new location from the position of the end of the location.
 
auto operator+ (std::optional< Position > a, Location const &b) -> Location
 Create a new location from the given one optionally adjusting its start position.
 
auto operator+= (Location &a, Location const &b) -> Location &
 See the corresponding + operator.
 
auto operator+= (Location &a, Position b) -> Location &
 See the corresponding + operator.
 
auto operator+= (Location &a, std::optional< Position > b) -> Location &
 See the corresponding + operator.
 
auto operator== (Location const &a, Location const &b) -> bool=default
 Compare two positions.
 
auto operator<=> (Location const &a, Location const &b)=default
 Compare two positions.
 
template<class T >
auto operator<< (T &out, Location const &loc) -> T &
 Output the location to the given stream.
 

Detailed Description

The Location of an expression in an input source.


The documentation for this class was generated from the following file: