forked from qt-creator/qt-creator
		
	C++: Enabled C++0x in SimpleLexer
We should create a UI flag for C++0x... Change-Id: Iba30090aa580554af629c0fb59ae5fc22b306b80 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
This commit is contained in:
		@@ -72,6 +72,16 @@ void SimpleLexer::setObjCEnabled(bool onoff)
 | 
			
		||||
    _objCEnabled = onoff;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool SimpleLexer::cxx0xEnabled() const
 | 
			
		||||
{
 | 
			
		||||
    return _cxx0xEnabled;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void SimpleLexer::setCxx0xEnabled(bool enabled)
 | 
			
		||||
{
 | 
			
		||||
    _cxx0xEnabled = enabled;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool SimpleLexer::skipComments() const
 | 
			
		||||
{
 | 
			
		||||
    return _skipComments;
 | 
			
		||||
@@ -100,6 +110,7 @@ QList<Token> SimpleLexer::operator()(const QString &text, int state)
 | 
			
		||||
    lex.setObjCEnabled(_objCEnabled);
 | 
			
		||||
    lex.setStartWithNewline(true);
 | 
			
		||||
    lex.setObjCEnabled(_objCEnabled);
 | 
			
		||||
    lex.setCxxOxEnabled(_cxx0xEnabled);
 | 
			
		||||
 | 
			
		||||
    if (! _skipComments)
 | 
			
		||||
        lex.setScanCommentTokens(true);
 | 
			
		||||
 
 | 
			
		||||
@@ -57,6 +57,9 @@ public:
 | 
			
		||||
    bool objCEnabled() const;
 | 
			
		||||
    void setObjCEnabled(bool onoff);
 | 
			
		||||
 | 
			
		||||
    bool cxx0xEnabled() const;
 | 
			
		||||
    void setCxx0xEnabled(bool enabled);
 | 
			
		||||
 | 
			
		||||
    bool endedJoined() const;
 | 
			
		||||
 | 
			
		||||
    QList<Token> operator()(const QString &text, int state = 0);
 | 
			
		||||
@@ -78,6 +81,7 @@ private:
 | 
			
		||||
    bool _qtMocRunEnabled: 1;
 | 
			
		||||
    bool _objCEnabled: 1;
 | 
			
		||||
    bool _endedJoined: 1;
 | 
			
		||||
    bool _cxx0xEnabled: 1;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
} // namespace CPlusPlus
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user