Implement FilteredASTVisitor (#81)
This commit is contained in:
@@ -12,6 +12,14 @@ struct LocalSourceRange {
|
||||
|
||||
/// The end position offset to the source file.
|
||||
uint32_t end;
|
||||
|
||||
bool contains(uint32_t offset) const {
|
||||
return offset >= begin && offset <= end;
|
||||
}
|
||||
|
||||
bool intersects(const LocalSourceRange& other) const {
|
||||
return begin <= other.end && end >= other.begin;
|
||||
}
|
||||
};
|
||||
|
||||
/// Get the content of the file with the given file ID.
|
||||
|
||||
Reference in New Issue
Block a user