aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/cplusplus/SimpleLexer.cpp
diff options
context:
space:
mode:
authorRoberto Raggi <[email protected]>2009-01-08 11:35:54 +0100
committerRoberto Raggi <[email protected]>2009-01-08 12:56:07 +0100
commitb2ff63145b6fc2feff862d6812c4c64ec90d1492 (patch)
treed57a33dd00db2af9ecd5d8104a69535499f92401 /src/libs/cplusplus/SimpleLexer.cpp
parentc06c77daaaf786dc3220d0bb7724c5fc8e0a1a53 (diff)
Added objcEnabled()/setObjcEnabled() to SimpleLexer.
Diffstat (limited to 'src/libs/cplusplus/SimpleLexer.cpp')
-rw-r--r--src/libs/cplusplus/SimpleLexer.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/libs/cplusplus/SimpleLexer.cpp b/src/libs/cplusplus/SimpleLexer.cpp
index 4c2a7830363..583f45da389 100644
--- a/src/libs/cplusplus/SimpleLexer.cpp
+++ b/src/libs/cplusplus/SimpleLexer.cpp
@@ -57,7 +57,8 @@ bool SimpleToken::isKeyword() const
SimpleLexer::SimpleLexer()
: _lastState(0),
_skipComments(false),
- _qtMocRunEnabled(true)
+ _qtMocRunEnabled(true),
+ _objcEnabled(false)
{ }
SimpleLexer::~SimpleLexer()
@@ -73,6 +74,17 @@ void SimpleLexer::setQtMocRunEnabled(bool enabled)
_qtMocRunEnabled = enabled;
}
+
+bool SimpleLexer::objcEnabled() const
+{
+ return _objcEnabled;
+}
+
+void SimpleLexer::setObjcEnabled(bool onoff)
+{
+ _objcEnabled = onoff;
+}
+
bool SimpleLexer::skipComments() const
{
return _skipComments;
@@ -93,6 +105,7 @@ QList<SimpleToken> SimpleLexer::operator()(const QString &text, int state)
Lexer lex(firstChar, lastChar);
lex.setQtMocRunEnabled(_qtMocRunEnabled);
+ lex.setObjcEnabled(_objcEnabled);
if (! _skipComments)
lex.setScanCommentTokens(true);