mirror of https://gitlab.com/cppit/libclangmm
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
604 B
18 lines
604 B
|
6 years ago
|
#include "source_range.hpp"
|
||
|
11 years ago
|
|
||
|
8 years ago
|
clangmm::SourceRange::SourceRange(const clangmm::SourceLocation &start, const clangmm::SourceLocation &end) {
|
||
|
11 years ago
|
cx_range = clang_getRange(start.cx_location, end.cx_location);
|
||
|
11 years ago
|
}
|
||
|
|
|
||
|
8 years ago
|
clangmm::SourceLocation clangmm::SourceRange::get_start() const {
|
||
|
|
return SourceLocation(clang_getRangeStart(cx_range));
|
||
|
|
}
|
||
|
|
|
||
|
|
clangmm::SourceLocation clangmm::SourceRange::get_end() const {
|
||
|
|
return SourceLocation(clang_getRangeEnd(cx_range));
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
std::pair<clangmm::Offset, clangmm::Offset> clangmm::SourceRange::get_offsets() const {
|
||
|
|
return {get_start().get_offset(), get_end().get_offset()};
|
||
|
11 years ago
|
}
|