CppTools: Clear outdated "semantic parentheses"

For instance, if the user types "template<", then the next operator> in
the source code will be temporarily classified as the closing angle
bracket for that template. Therefore, we have to clear out any previous
information of that kind.

Change-Id: Ib6d64415b2f6294661e2b8ec48cbaea5893d8fd0
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Kandeler
2021-02-26 10:16:26 +01:00
committed by David Schulz
parent f071a3301b
commit c1f05d58b8
2 changed files with 46 additions and 5 deletions

View File

@@ -30,6 +30,8 @@
#include "textmark.h"
#include "textdocument.h"
#include <utils/id.h>
#include <State>
#include <QTextBlockUserData>
@@ -48,6 +50,7 @@ struct TEXTEDITOR_EXPORT Parenthesis
: pos(position), chr(c), type(t) {}
int pos = -1;
QChar chr;
Utils::Id source;
Type type = Opened;
};