class
#include <slang/text/SourceLocation.h>
SourceLocation This class represents a location in source code (or within a macro expansion).
The SourceManager can decode this into file, line, and column information if it's a file location, or into expanded and original locations if it's a macro location.
Public static variables
- static const SourceLocation NoLocation
- A location that is reserved to represent "no location" at all.
Constructors, destructors, conversion operators
- operator bool() const explicit
Public functions
Function documentation
slang:: SourceLocation:: operator bool() const explicit
Returns | true if the location is valid, and false if not. |
---|
bool slang:: SourceLocation:: valid() const
Returns | true if the location is valid, and false if not. |
---|
template<std::integral T>
SourceLocation slang:: SourceLocation:: operator+(T delta) const
Computes a source location that is offset from the current one.
Note that there is no error checking to ensure that the location still points to a valid place in the source.