summaryrefslogtreecommitdiff
path: root/src/libs/cplusplus/SimpleLexer.cpp
diff options
context:
space:
mode:
authorRoberto Raggi <roberto.raggi@nokia.com>2009-09-21 16:09:01 +0200
committerRoberto Raggi <roberto.raggi@nokia.com>2009-09-21 16:10:17 +0200
commita49395a0eabc0ecfb8434e826d75419af5c6b06f (patch)
treeb56f18015d45e1ba8ee1b7244727f38ce33b2c97 /src/libs/cplusplus/SimpleLexer.cpp
parent0bcbab862e43fc041380155db1af30f38090114f (diff)
downloadqt-creator-a49395a0eabc0ecfb8434e826d75419af5c6b06f.tar.gz
Made the indenter more Qt friendly. Added support for moc keywords.
Diffstat (limited to 'src/libs/cplusplus/SimpleLexer.cpp')
-rw-r--r--src/libs/cplusplus/SimpleLexer.cpp13
1 files changed, 0 insertions, 13 deletions
diff --git a/src/libs/cplusplus/SimpleLexer.cpp b/src/libs/cplusplus/SimpleLexer.cpp
index 8c023d8603..59475bc4a4 100644
--- a/src/libs/cplusplus/SimpleLexer.cpp
+++ b/src/libs/cplusplus/SimpleLexer.cpp
@@ -139,27 +139,14 @@ QList<SimpleToken> SimpleLexer::operator()(const QString &text, int state)
bool inPreproc = false;
- bool first = true;
-
for (;;) {
Token tk;
lex(&tk);
if (tk.is(T_EOF_SYMBOL))
break;
- Q_ASSERT(lex.tokenOffset() == tk.begin());
- Q_ASSERT(lex.tokenLength() == tk.f.length);
-
QStringRef spell = text.midRef(lex.tokenOffset(), lex.tokenLength());
SimpleToken simpleTk(tk, spell);
-
- if (first) {
- first = false;
-
- Q_ASSERT(tk.f.newline);
- Q_ASSERT(simpleTk.followsNewline());
- }
-
lex.setScanAngleStringLiteralTokens(false);
if (tk.f.newline && tk.is(T_POUND))