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.

16 lines
430 B

11 years ago
#include "SourceRange.h"
clang::SourceRange::
SourceRange(clang::TranslationUnit *tu, clang::Token *token) {
range_ = clang_getTokenExtent(tu->tu_, token->token_);
}
clang::SourceRange::
SourceRange(clang::SourceLocation *start, clang::SourceLocation *end) {
range_ = clang_getRange(start->location_, end->location_);
}
clang::SourceRange::SourceRange(Cursor *cursor) {
range_ = clang_getCursorExtent(cursor->cursor_);
}