summaryrefslogtreecommitdiffstats
path: root/src/scanner.l
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2001-12-29 18:30:48 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2001-12-29 18:30:48 (GMT)
commitff11b7d98ad7d24770afd151aa6b439adc7506d2 (patch)
tree048517043e4c90dcc686bc038b480825fe32886c /src/scanner.l
parent414d7b3bbfad8ec16237c3708af188ecaee62886 (diff)
downloadDoxygen-ff11b7d98ad7d24770afd151aa6b439adc7506d2.zip
Doxygen-ff11b7d98ad7d24770afd151aa6b439adc7506d2.tar.gz
Doxygen-ff11b7d98ad7d24770afd151aa6b439adc7506d2.tar.bz2
Release-1.2.13
Diffstat (limited to 'src/scanner.l')
-rw-r--r--src/scanner.l67
1 files changed, 55 insertions, 12 deletions
diff --git a/src/scanner.l b/src/scanner.l
index 5615224..6371b71 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -920,6 +920,10 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
current->name = current->name.simplifyWhiteSpace();
BEGIN( FindMembers ) ;
}
+<Operator>";" { // can occur when importing members
+ unput(';');
+ BEGIN( FindMembers ) ;
+ }
<Operator>[^(] {
lineCount();
current->name += *yytext ;
@@ -1093,6 +1097,11 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
BEGIN( ReadFuncArgType ) ;
}
}
+<EndTemplate>">"{BN}*/"("({BN}*{ID}{BN}*"::")*({BN}*"*"{BN}*)+ { // function pointer returning a template instance
+ lineCount();
+ current->name+='>';
+ BEGIN(FindMembers);
+ }
<EndTemplate>">"{BN}*/"::" {
lineCount();
current->name+='>';
@@ -2033,24 +2042,58 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
}
/* a special comment */
<ReadFuncArgType>("/*"[*!]|"//"[/!])("<"?) {
- fullArgString+=yytext;
- lastCopyArgChar=0;
- if (yytext[1]=='/')
- BEGIN( CopyArgCommentLine );
+ if (currentArgumentContext==DefineEnd)
+ {
+ // for defines we interpret a comment
+ // as documentation for the define
+ int i;for (i=yyleng-1;i>=0;i--)
+ {
+ unput(yytext[i]);
+ }
+ stringToArgumentList(fullArgString,current->argList);
+ BEGIN( currentArgumentContext );
+ }
else
- BEGIN( CopyArgComment );
+ {
+ // for functions we interpret a comment
+ // as documentation for the argument
+ fullArgString+=yytext;
+ lastCopyArgChar=0;
+ if (yytext[1]=='/')
+ BEGIN( CopyArgCommentLine );
+ else
+ BEGIN( CopyArgComment );
+ }
}
/* `)' followed by a special comment */
<ReadFuncArgType>")"{BN}*("/*"[*!]|"//"[/!])"<" {
lineCount();
- lastCopyArgChar=*yytext;
- QCString text=&yytext[1];
- text=text.stripWhiteSpace();
- fullArgString+=text;
- if (text.find("//")!=-1)
- BEGIN( CopyArgCommentLine );
+ if (currentArgumentContext==DefineEnd)
+ {
+ // for defines we interpret a comment
+ // as documentation for the define
+ int i;for (i=yyleng-1;i>0;i--)
+ {
+ unput(yytext[i]);
+ }
+ *copyArgString+=*yytext;
+ fullArgString+=*yytext;
+ stringToArgumentList(fullArgString,current->argList);
+ BEGIN( currentArgumentContext );
+ }
else
- BEGIN( CopyArgComment );
+ {
+ // for functions we interpret a comment
+ // as documentation for the last argument
+ lastCopyArgChar=*yytext;
+ QCString text=&yytext[1];
+ text=text.stripWhiteSpace();
+ fullArgString+=text;
+ if (text.find("//")!=-1)
+ BEGIN( CopyArgCommentLine );
+ else
+ BEGIN( CopyArgComment );
+ }
}
<CopyArgComment>[^\n\*]+ { fullArgString+=yytext; }
<CopyArgComment>"*/" { fullArgString+=yytext;