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