コード例 #1
0
QString SimpleAbstractStreamReader::textAt(const AST::SourceLocation &from,
                                           const AST::SourceLocation &to)
{
    return m_source.mid(from.offset, to.end() - from.begin());
}
コード例 #2
0
bool QmlJSRefactoringFile::isCursorOn(AST::SourceLocation loc) const
{
    const unsigned pos = cursor().position();
    return pos >= loc.begin() && pos <= loc.end();
}