summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2013-12-08 12:57:04 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2013-12-08 12:57:04 (GMT)
commit96efae32552513db2a41e6b498cbd76416769dd6 (patch)
treea00a3aec639eae2b1f509d30fa47a82007698312
parentaa01d206d2c236da4b9247444f9c52c5351e3028 (diff)
downloadDoxygen-96efae32552513db2a41e6b498cbd76416769dd6.zip
Doxygen-96efae32552513db2a41e6b498cbd76416769dd6.tar.gz
Doxygen-96efae32552513db2a41e6b498cbd76416769dd6.tar.bz2
Bug 720046 - Document inline objective-C blocks
-rw-r--r--src/scanner.l28
1 files changed, 21 insertions, 7 deletions
diff --git a/src/scanner.l b/src/scanner.l
index 0807aaa..50b3e8a 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -1176,13 +1176,27 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
*/
<ObjCParams>"(" {
- BEGIN( ObjCParamType );
- }
-<ObjCParamType>[^)]* {
- current->argList->getLast()->type=QCString(yytext).stripWhiteSpace();
- }
+ roundCount=0;
+ current->argList->getLast()->type.resize(0);
+ BEGIN( ObjCParamType );
+ }
+<ObjCParamType>"(" {
+ roundCount++;
+ current->argList->getLast()->type+=yytext;
+ }
<ObjCParamType>")"/{B}* {
- BEGIN( ObjCParams );
+ if (roundCount<=0)
+ {
+ BEGIN( ObjCParams );
+ }
+ else
+ {
+ current->argList->getLast()->type+=yytext;
+ roundCount--;
+ }
+ }
+<ObjCParamType>[^()]* {
+ current->argList->getLast()->type+=QCString(yytext).stripWhiteSpace();
}
<ObjCMethod,ObjCParams>";" { // end of method declaration
if (current->argList->getLast() && current->argList->getLast()->type.isEmpty())
@@ -1193,7 +1207,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
//printf("argList=%s\n",current->args.data());
unput(';');
BEGIN( Function );
- }
+ }
<ObjCMethod,ObjCParams>(";"{BN}+)?"{" { // start of a method body
lineCount();
//printf("Type=%s Name=%s args=%s\n",