aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/3rdparty/cplusplus/Parser.cpp
diff options
context:
space:
mode:
authorNikolai Kosjar <nikolai.kosjar@digia.com>2014-06-24 13:22:54 -0400
committerNikolai Kosjar <nikolai.kosjar@digia.com>2014-07-04 12:16:38 +0200
commit45fa5f9ccb67f01596e919b2e6e7b0275dc19362 (patch)
tree2e130bb8422d9a2db195e35bd921051482a7811b /src/libs/3rdparty/cplusplus/Parser.cpp
parent1a7af941ee3a2d421569ffe53760463503cfdabe (diff)
C++: Add a clarifying comment and TODO
Change-Id: If6e6db7c4ca011159e78a27755ff9f665b179300 Reviewed-by: Wang Hoi <wanghoi@126.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Diffstat (limited to 'src/libs/3rdparty/cplusplus/Parser.cpp')
-rw-r--r--src/libs/3rdparty/cplusplus/Parser.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/libs/3rdparty/cplusplus/Parser.cpp b/src/libs/3rdparty/cplusplus/Parser.cpp
index 333f1e88f8..2ed5afc54c 100644
--- a/src/libs/3rdparty/cplusplus/Parser.cpp
+++ b/src/libs/3rdparty/cplusplus/Parser.cpp
@@ -2651,6 +2651,25 @@ bool Parser::parseBraceOrEqualInitializer0x(ExpressionAST *&node)
return false;
}
+/*
+ initializer-clause:
+ assignment-expression
+ braced-init-list
+ designated-initializer
+
+ If the next token is a T_LBRACKET, it could be the begin of either
+
+ * a C++11 lambda-introducer (parsed by parseAssignmentExpression)
+ * or a C99 designator (parsed by parseDesignatedInitializer).
+
+ Because currently C99 and C++11 Support is activated at the same time,
+ first try to parse the assignment-expression. If this fails, try to
+ parse a designated-initializer.
+
+ TODO:
+ As soon as there will be only "one active language", parse either
+ the assignment-expression or the designated-initializer, not both.
+ */
bool Parser::parseInitializerClause0x(ExpressionAST *&node)
{
DEBUG_THIS_RULE();