From 8329d7db943bef3f7929d3802fc31f60e314e179 Mon Sep 17 00:00:00 2001 From: Roberto Raggi Date: Wed, 24 Mar 2010 12:54:25 +0100 Subject: Recognize C++0x lambda expressions. --- src/shared/cplusplus/Lexer.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/shared/cplusplus/Lexer.cpp') diff --git a/src/shared/cplusplus/Lexer.cpp b/src/shared/cplusplus/Lexer.cpp index 36b2ba8b0b..3b75c68421 100644 --- a/src/shared/cplusplus/Lexer.cpp +++ b/src/shared/cplusplus/Lexer.cpp @@ -119,6 +119,12 @@ bool Lexer::qtMocRunEnabled() const void Lexer::setQtMocRunEnabled(bool onoff) { f._qtMocRunEnabled = onoff; } +bool Lexer::cxx0xEnabled() const +{ return f._cxx0xEnabled; } + +void Lexer::setCxxOxEnabled(bool onoff) +{ f._cxx0xEnabled = onoff; } + bool Lexer::objCEnabled() const { return f._objCEnabled; } @@ -680,7 +686,7 @@ void Lexer::scan_helper(Token *tok) yyinp(); int yylen = _currentChar - yytext; if (f._scanKeywords) - tok->f.kind = classify(yytext, yylen, f._qtMocRunEnabled); + tok->f.kind = classify(yytext, yylen, f._qtMocRunEnabled, f._cxx0xEnabled); else tok->f.kind = T_IDENTIFIER; -- cgit v1.2.1