Esempio n. 1
0
void PrintTo(const SourceRange &sourceRange, ::std::ostream* os)
{
    *os << "[";
    PrintTo(sourceRange.start(), os);
    *os << ", ";
    PrintTo(sourceRange.end(), os);
    *os << "]";
}
Esempio n. 2
0
inline
typename std::enable_if<boost::has_range_iterator<SourceRange>::value>::type
direct(const Kernel& K,
       const SourceRange& s, const ChargeRange& c,
       const TargetRange& t, ResultRange& r)
{
  detail::block_eval(K,
                     s.begin(), s.end(), c.begin(),
                     t.begin(), t.end(), r.begin());
}
Esempio n. 3
0
HighlightingMark::HighlightingMark(const CXCursor &cxCursor,
                                                 CXToken *cxToken,
                                                 CXTranslationUnit cxTranslationUnit)
{
    const SourceRange sourceRange = clang_getTokenExtent(cxTranslationUnit, *cxToken);
    const auto start = sourceRange.start();
    const auto end = sourceRange.end();

    originalCursor = cxCursor;
    line = start.line();
    column = start.column();
    length = end.offset() - start.offset();
    collectKinds(cxToken, originalCursor);
}