summaryrefslogtreecommitdiffstats
path: root/src/scanner.l
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2011-02-17 19:40:38 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2011-02-17 19:40:38 (GMT)
commit2eccbfdb1a422e1ee594b1906de13d3f4a070c06 (patch)
treec2ee5bb85f9acfb3caa8479c32b49a1bf03de752 /src/scanner.l
parente3867f798e35c06c2208899f9c0bc264d8e6cb83 (diff)
downloadDoxygen-2eccbfdb1a422e1ee594b1906de13d3f4a070c06.zip
Doxygen-2eccbfdb1a422e1ee594b1906de13d3f4a070c06.tar.gz
Doxygen-2eccbfdb1a422e1ee594b1906de13d3f4a070c06.tar.bz2
Release-1.7.3-20110217
Diffstat (limited to 'src/scanner.l')
-rw-r--r--src/scanner.l22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/scanner.l b/src/scanner.l
index 6abd7e7..0ed3933 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -587,6 +587,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
%x ClassVar
%x CSConstraintName
%x CSConstraintType
+%x CSIndexer
%x ClassCategory
%x ClassTemplSpec
%x CliPropertyType
@@ -1660,7 +1661,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
<NSAliasArg>";" {
BEGIN( FindMembers );
}
-<PHPUse>({ID}{BN}*"\\"{BN}*)+{ID} {
+<PHPUse>({ID}{BN}*"\\"{BN}*)*{ID} {
lineCount();
aliasName=yytext;
//current->fileName = yyFileName;
@@ -1972,6 +1973,13 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
{ // javascript function
current->type="function";
}
+ else if (insideCS && strcmp(yytext,"this")==0)
+ {
+ // C# indexer
+ addType( current ) ;
+ current->name="this";
+ BEGIN(CSIndexer);
+ }
else
{
if (YY_START==FindMembers)
@@ -2046,6 +2054,10 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
}
}
}
+<CSIndexer>"["[^\n\]]*"]" {
+ current->name+=removeRedundantWhiteSpace(yytext);
+ BEGIN(FindMembers);
+ }
<FindMembers>[0-9]{ID} { // some number where we did not expect one
}
<FindMembers>"." {
@@ -4089,9 +4101,15 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
}
<OldStyleArgs>. { current->args += *yytext; }
<FuncQual,FuncRound,FuncFunc>. { current->args += *yytext; }
+<FuncQual>{BN}*"try:" |
<FuncQual>{BN}*"try"{BN}+ { /* try-function-block */
insideTryBlock=TRUE;
lineCount();
+ if (yytext[yyleng-1]==':')
+ {
+ unput(':');
+ BEGIN( Function );
+ }
}
<FuncQual>{BN}*"throw"{BN}*"(" { // C++ style throw clause
current->exception = " throw (" ;
@@ -4869,7 +4887,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
<BasesProt>"private"{BN}+ { lineCount(); baseProt = Private; }
<BasesProt>{BN} { lineCount(); }
<BasesProt>. { unput(*yytext); BEGIN(Bases); }
-<Bases>("\\")?{BN}*({ID}{BN}*"\\"{BN}*)*{ID} {
+<Bases>("\\")?({ID}"\\")*{ID} { // PHP namespace token, not sure if interspacing is allowed but it gives problems (see bug 640847)
if (!insidePHP)
{
REJECT;