diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2011-02-17 19:40:38 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2011-02-17 19:40:38 (GMT) |
commit | 712ab49d04f9fe525b8552f74945945347e3b553 (patch) | |
tree | c2ee5bb85f9acfb3caa8479c32b49a1bf03de752 /src/scanner.l | |
parent | eba15fd2fe9a0b186fbf7b63d7eab729057c7f6b (diff) | |
download | Doxygen-712ab49d04f9fe525b8552f74945945347e3b553.zip Doxygen-712ab49d04f9fe525b8552f74945945347e3b553.tar.gz Doxygen-712ab49d04f9fe525b8552f74945945347e3b553.tar.bz2 |
Release-1.7.3-20110217
Diffstat (limited to 'src/scanner.l')
-rw-r--r-- | src/scanner.l | 22 |
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; |