MCPcopy Create free account
hub / github.com/KDE/kdevelop / locationToRange

Method locationToRange

plugins/qmljs/duchain/parsesession.cpp:168–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166}
167
168RangeInRevision ParseSession::locationToRange(const QmlJS::AST::SourceLocation& location) const
169{
170 const int linesInLocation = m_doc->source().midRef(location.offset, location.length).count(QLatin1Char('\n'));
171 return RangeInRevision(location.startLine - 1, location.startColumn - 1,
172 location.startLine - 1 + linesInLocation, location.startColumn - 1 + location.length);
173}
174
175RangeInRevision ParseSession::locationsToRange(const QmlJS::AST::SourceLocation& locationFrom,
176 const QmlJS::AST::SourceLocation& locationTo) const

Callers 7

declareParametersMethod · 0.80
visitMethod · 0.80
declareFieldMemberMethod · 0.80
declareExportsMethod · 0.80
importDirectoryMethod · 0.80
visitMethod · 0.80

Calls 3

RangeInRevisionClass · 0.70
countMethod · 0.45
sourceMethod · 0.45

Tested by

no test coverage detected