slang::SourceRange class

Combines a pair of source locations that denote a range of source text.

Public static variables

static const SourceRange NoLocation
A range that is reserved to represent "no location" at all.

Public functions

auto start() const -> SourceLocation
auto end() const -> SourceLocation
auto contains(const SourceLocation& loc) const -> bool

Function documentation

SourceLocation slang::SourceRange::start() const

Returns the start of the range.

SourceLocation slang::SourceRange::end() const

Returns the end of the range.

bool slang::SourceRange::contains(const SourceLocation& loc) const

Returns true if location is within the range.