ui: snippet sizes
* added SnippetMerger class that conducts the merging and snapping of TokenLocations to create snippets. * added parameters for snippet snapping and merging to ApplicationSettings. * added forEachStartTokenLocation() and forEachEndTokenLocation() to TokenLocationLine and TokenLocationFile. * added < and > operators to TokenLocation that compare the location part (not the id).
This commit is contained in:
@@ -89,6 +89,22 @@ void TokenLocationFile::forEachTokenLocation(std::function<void(TokenLocation*)>
|
||||
}
|
||||
}
|
||||
|
||||
void TokenLocationFile::forEachStartTokenLocation(std::function<void(TokenLocation*)> func) const
|
||||
{
|
||||
for (const TokenLocationLinePairType& line : m_lines)
|
||||
{
|
||||
line.second->forEachStartTokenLocation(func);
|
||||
}
|
||||
}
|
||||
|
||||
void TokenLocationFile::forEachEndTokenLocation(std::function<void(TokenLocation*)> func) const
|
||||
{
|
||||
for (const TokenLocationLinePairType& line : m_lines)
|
||||
{
|
||||
line.second->forEachEndTokenLocation(func);
|
||||
}
|
||||
}
|
||||
|
||||
TokenLocation* TokenLocationFile::addTokenLocationAsPlainCopy(const TokenLocation* location)
|
||||
{
|
||||
unsigned int lineNumber = location->getTokenLocationLine()->getLineNumber();
|
||||
|
||||
Reference in New Issue
Block a user