summaryrefslogtreecommitdiff
path: root/shared/cplusplus/TranslationUnit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'shared/cplusplus/TranslationUnit.cpp')
-rw-r--r--shared/cplusplus/TranslationUnit.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/shared/cplusplus/TranslationUnit.cpp b/shared/cplusplus/TranslationUnit.cpp
index c64bbf52c1..caaa9c7d4e 100644
--- a/shared/cplusplus/TranslationUnit.cpp
+++ b/shared/cplusplus/TranslationUnit.cpp
@@ -92,6 +92,12 @@ bool TranslationUnit::qtMocRunEnabled() const
void TranslationUnit::setQtMocRunEnabled(bool onoff)
{ _qtMocRunEnabled = onoff; }
+bool TranslationUnit::objCEnabled() const
+{ return _objCEnabled; }
+
+void TranslationUnit::setObjCEnabled(bool onoff)
+{ _objCEnabled = onoff; }
+
Control *TranslationUnit::control() const
{ return _control; }
@@ -164,6 +170,7 @@ void TranslationUnit::tokenize()
Lexer lex(this);
lex.setQtMocRunEnabled(_qtMocRunEnabled);
+ lex.setObjCEnabled(_objCEnabled);
std::stack<unsigned> braces;
_tokens->push_back(Token()); // the first token needs to be invalid!
@@ -228,6 +235,7 @@ bool TranslationUnit::parse(ParseMode mode)
Parser parser(this);
parser.setQtMocRunEnabled(_qtMocRunEnabled);
+ parser.setObjCEnabled(_objCEnabled);
bool parsed = false;