diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2007-01-07 21:17:16 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2007-01-07 21:17:16 (GMT) |
commit | 66401e657546264df0ffa49765f68dc651b7be48 (patch) | |
tree | e21d038e7bc244d411ee71ee440f3b527bb9402f /src/scanner.l | |
parent | cb16d91fd453486b9e42a2e12295b96ad183dd92 (diff) | |
download | Doxygen-66401e657546264df0ffa49765f68dc651b7be48.zip Doxygen-66401e657546264df0ffa49765f68dc651b7be48.tar.gz Doxygen-66401e657546264df0ffa49765f68dc651b7be48.tar.bz2 |
Release-1.5.1-20070107
Diffstat (limited to 'src/scanner.l')
-rw-r--r-- | src/scanner.l | 36 |
1 files changed, 29 insertions, 7 deletions
diff --git a/src/scanner.l b/src/scanner.l index c0189e3..5d75f5f 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -1,6 +1,6 @@ /***************************************************************************** * - * $Id$ + * * * Copyright (C) 1997-2005 by Dimitri van Heesch. * @@ -2533,6 +2533,16 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) current->mtype = mtype; BEGIN( IDLAttribute ); } + else if (insideCS && + current->name.isEmpty()) + { + squareCount=1; + lastSquareContext = YY_START; + // Skip the C# attribute + // for this member + current->args.resize(0); + BEGIN( SkipSquare ); + } else { current->args += yytext ; @@ -2643,8 +2653,16 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) } <Sharp>. { current->type += *yytext ; } <FindFields>{ID} { - current->name = yytext; + current->bodyLine = yyLineNr; + current->name = yytext; } +<FindFields>"(" { + // Java enum initializer + unput('('); + lastInitializerContext = YY_START; + initBracketCount=0; + BEGIN(ReadInitializer); + } <FindFields>"=" { lastInitializerContext = YY_START; initBracketCount=0; @@ -2664,9 +2682,12 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) current->section = Entry::VARIABLE_SEC; // add to the scope of the enum current_root->addSubEntry(current); - current = new Entry(*current); - // add to the scope surrounding the enum (copy!) - current_root->parent()->addSubEntry(current); + if (!insideCS && !insideJava) // for C# and Java 1.5+ enum values always have to be explicitly qualified + { + current = new Entry(*current); + // add to the scope surrounding the enum (copy!) + current_root->parent()->addSubEntry(current); + } current = new Entry ; initEntry(); } @@ -4708,7 +4729,8 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) } <DocCopyBlock><<EOF>> { warn(yyFileName,yyLineNr, - "Warning: reached end of file while inside a %s block!\n", + "Warning: reached end of file while inside a %s block!\n" + "The command that should end the block seems to be missing!\n", docBlockName.data()); yyterminate(); } @@ -5223,7 +5245,7 @@ bool CLanguageScanner::needsPreprocessing(const QCString &extension) { QCString fe=extension.lower(); return - !( fe==".java" || fe==".as" || fe==".cs" || fe==".d" || fe==".php" || + !( fe==".java" || fe==".as" || fe==".d" || fe==".php" || fe==".php4" || fe==".inc" || fe==".phtml" ); } |