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.
39 lines
950 B
39 lines
950 B
|
11 years ago
|
#ifndef SOURCELOCATION_H_
|
||
|
|
#define SOURCELOCATION_H_
|
||
|
|
#include "TranslationUnit.h"
|
||
|
|
#include "Token.h"
|
||
|
|
#include "Cursor.h"
|
||
|
|
|
||
|
|
namespace clang {
|
||
|
|
class SourceLocation {
|
||
|
|
public:
|
||
|
|
SourceLocation(TranslationUnit* tu,
|
||
|
|
const std::string &filename,
|
||
|
|
int line_number,
|
||
|
|
int column);
|
||
|
|
|
||
|
|
SourceLocation(TranslationUnit *tu,
|
||
|
|
Token *token);
|
||
|
|
|
||
|
|
SourceLocation(SourceRange *range, bool start);
|
||
|
|
|
||
|
|
SourceLocation(TranslationUnit *tu,
|
||
|
|
const std::string &filepath,
|
||
|
|
int offset);
|
||
|
|
|
||
|
|
explicit SourceLocation(Cursor *cursor);
|
||
|
|
|
||
|
|
void get_location_info(std::string* path,
|
||
|
|
unsigned *line,
|
||
|
|
unsigned *column,
|
||
|
|
unsigned *offset);
|
||
|
|
|
||
|
|
private:
|
||
|
|
CXSourceLocation location_;
|
||
|
|
friend SourceRange;
|
||
|
|
friend Cursor;
|
||
|
|
};
|
||
|
|
|
||
|
|
} // namespace clang
|
||
|
|
#endif // SOURCELOCATION_H_
|