diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2016-01-17 12:06:16 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2016-01-17 15:04:33 (GMT) |
commit | a93ec7221d1a258f0268e0c081782478372efe0b (patch) | |
tree | 5f7e41dd02582a699a6f6f6540c463c5d168983e /src/scanner.l | |
parent | 4dfc5887660284b345eb93b6c07dc1f91e780fac (diff) | |
download | Doxygen-a93ec7221d1a258f0268e0c081782478372efe0b.zip Doxygen-a93ec7221d1a258f0268e0c081782478372efe0b.tar.gz Doxygen-a93ec7221d1a258f0268e0c081782478372efe0b.tar.bz2 |
Changed configuration mechanism to directly access options in order to improve performance
Diffstat (limited to 'src/scanner.l')
-rw-r--r-- | src/scanner.l | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/src/scanner.l b/src/scanner.l index fc6dc84..ea7d7ef 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -215,7 +215,7 @@ static void initParser() autoGroupStack.setAutoDelete(TRUE); insideFormula = FALSE; insideCode=FALSE; - insideCli=Config_getBool("CPP_CLI_SUPPORT"); + insideCli=Config_getBool(CPP_CLI_SUPPORT); previous = 0; firstTypedefEntry = 0; tempEntry = 0; @@ -284,7 +284,7 @@ static void initEntry() static void lineCount() { - static int tabSize = Config_getInt("TAB_SIZE"); + static int tabSize = Config_getInt(TAB_SIZE); const char *p; for (p = yytext ; *p ; ++p ) { @@ -307,7 +307,7 @@ static void lineCount() static inline int computeIndent(const char *s,int startIndent) { int col=startIndent; - static int tabSize=Config_getInt("TAB_SIZE"); + static int tabSize=Config_getInt(TAB_SIZE); const char *p=s; char c; while ((c=*p++)) @@ -2029,8 +2029,8 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) <UsingAlias>";"{BN}*("/**"|"//!"|"/*!"|"///")"<" { docBlockContext = UsingAliasEnd; docBlockInBody = FALSE; - docBlockAutoBrief = ( yytext[yyleng-2]=='*' && Config_getBool("JAVADOC_AUTOBRIEF") ) || - ( yytext[yyleng-2]=='!' && Config_getBool("QT_AUTOBRIEF") ); + docBlockAutoBrief = ( yytext[yyleng-2]=='*' && Config_getBool(JAVADOC_AUTOBRIEF) ) || + ( yytext[yyleng-2]=='!' && Config_getBool(QT_AUTOBRIEF) ); QCString indent; indent.fill(' ',computeIndent(yytext,g_column)); docBlock=indent; @@ -2671,8 +2671,8 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) } docBlockContext = YY_START; docBlockInBody = FALSE; - docBlockAutoBrief = ( yytext[yyleng-2]=='*' && Config_getBool("JAVADOC_AUTOBRIEF") ) || - ( yytext[yyleng-2]=='!' && Config_getBool("QT_AUTOBRIEF") ); + docBlockAutoBrief = ( yytext[yyleng-2]=='*' && Config_getBool(JAVADOC_AUTOBRIEF) ) || + ( yytext[yyleng-2]=='!' && Config_getBool(QT_AUTOBRIEF) ); QCString indent; indent.fill(' ',computeIndent(yytext,g_column)); @@ -2701,8 +2701,8 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) <MemberSpec,FindFields,FindMembers,NextSemi,EnumBaseType,BitFields,ReadInitializer,OldStyleArgs>","{BN}*("/**"|"//!"|"/*!"|"///")"<" { docBlockContext = YY_START; docBlockInBody = FALSE; - docBlockAutoBrief = ( yytext[yyleng-2]=='*' && Config_getBool("JAVADOC_AUTOBRIEF") ) || - ( yytext[yyleng-2]=='!' && Config_getBool("QT_AUTOBRIEF") ); + docBlockAutoBrief = ( yytext[yyleng-2]=='*' && Config_getBool(JAVADOC_AUTOBRIEF) ) || + ( yytext[yyleng-2]=='!' && Config_getBool(QT_AUTOBRIEF) ); QCString indent; indent.fill(' ',computeIndent(yytext,g_column)); @@ -2734,8 +2734,8 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) } docBlockContext = YY_START; docBlockInBody = FALSE; - docBlockAutoBrief = ( yytext[yyleng-2]=='*' && Config_getBool("JAVADOC_AUTOBRIEF") ) || - ( yytext[yyleng-2]=='!' && Config_getBool("QT_AUTOBRIEF") ); + docBlockAutoBrief = ( yytext[yyleng-2]=='*' && Config_getBool(JAVADOC_AUTOBRIEF) ) || + ( yytext[yyleng-2]=='!' && Config_getBool(QT_AUTOBRIEF) ); QCString indent; indent.fill(' ',computeIndent(yytext,g_column)); docBlock=indent; @@ -2793,8 +2793,8 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) docBlockContext = YY_START; docBlockInBody = FALSE; docBlock.resize(0); - docBlockAutoBrief = ( yytext[yyleng-2]=='*' && Config_getBool("JAVADOC_AUTOBRIEF") ) || - ( yytext[yyleng-2]=='!' && Config_getBool("QT_AUTOBRIEF") ); + docBlockAutoBrief = ( yytext[yyleng-2]=='*' && Config_getBool(JAVADOC_AUTOBRIEF) ) || + ( yytext[yyleng-2]=='!' && Config_getBool(QT_AUTOBRIEF) ); docBlockTerm = 0; startCommentBlock(FALSE); BEGIN(DocBlock); @@ -3396,7 +3396,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) idlProp.resize(0); current->mtype = mtype; - if (Config_getBool("IDL_PROPERTY_SUPPORT") && + if (Config_getBool(IDL_PROPERTY_SUPPORT) && current->mtype == Property) { // we are inside the properties section of a dispinterface odlProp = true; @@ -3436,14 +3436,14 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) } } <IDLAttribute>"propput" { - if (Config_getBool("IDL_PROPERTY_SUPPORT")) + if (Config_getBool(IDL_PROPERTY_SUPPORT)) { current->mtype = Property; } current->spec |= Entry::Settable; } <IDLAttribute>"propget" { - if (Config_getBool("IDL_PROPERTY_SUPPORT")) + if (Config_getBool(IDL_PROPERTY_SUPPORT)) { current->mtype = Property; } @@ -3459,7 +3459,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) current->spec |= Entry::Optional; } <IDLAttribute>"readonly" { // on UNO IDL attribute or property - if (Config_getBool("IDL_PROPERTY_SUPPORT") && odlProp) + if (Config_getBool(IDL_PROPERTY_SUPPORT) && odlProp) { current->spec ^= Entry::Settable; } @@ -3967,7 +3967,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) if (!msName.isEmpty() /*&& msName!=current->name*/) // skip typedef T {} T;, removed due to bug608493 { - static bool typedefHidesStruct = Config_getBool("TYPEDEF_HIDES_STRUCT"); + static bool typedefHidesStruct = Config_getBool(TYPEDEF_HIDES_STRUCT); // case 1: typedef struct _S { ... } S_t; // -> omit typedef and use S_t as the struct name if (typedefHidesStruct && @@ -5079,8 +5079,8 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) docBlockContext = SkipCurlyEndDoc; docBlockInBody = FALSE; - docBlockAutoBrief = ( yytext[yyleng-2]=='*' && Config_getBool("JAVADOC_AUTOBRIEF") ) || - ( yytext[yyleng-2]=='!' && Config_getBool("QT_AUTOBRIEF") ); + docBlockAutoBrief = ( yytext[yyleng-2]=='*' && Config_getBool(JAVADOC_AUTOBRIEF) ) || + ( yytext[yyleng-2]=='!' && Config_getBool(QT_AUTOBRIEF) ); docBlock.resize(0); docBlockTerm = '}'; if (yytext[yyleng-3]=='/') @@ -5098,8 +5098,8 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) <SkipCurlyEndDoc>"}"{BN}*("/*!"|"/**"|"//!"|"///")"<" { // desc is followed by another one docBlockContext = SkipCurlyEndDoc; docBlockInBody = FALSE; - docBlockAutoBrief = ( yytext[yyleng-2]=='*' && Config_getBool("JAVADOC_AUTOBRIEF") ) || - ( yytext[yyleng-2]=='!' && Config_getBool("QT_AUTOBRIEF") ); + docBlockAutoBrief = ( yytext[yyleng-2]=='*' && Config_getBool(JAVADOC_AUTOBRIEF) ) || + ( yytext[yyleng-2]=='!' && Config_getBool(QT_AUTOBRIEF) ); docBlock.resize(0); docBlockTerm = '}'; if (yytext[yyleng-3]=='/') @@ -5733,7 +5733,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) { if (current->section==Entry::NAMESPACE_SEC) // allow reopening of anonymous namespaces { - if (Config_getBool("EXTRACT_ANON_NSPACES")) // use visible name + if (Config_getBool(EXTRACT_ANON_NSPACES)) // use visible name { current->name="anonymous_namespace{"+stripPath(current->fileName)+"}"; } @@ -6033,7 +6033,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) } docBlockContext = YY_START; docBlockInBody = YY_START==SkipCurly; - docBlockAutoBrief = Config_getBool("QT_AUTOBRIEF"); + docBlockAutoBrief = Config_getBool(QT_AUTOBRIEF); QCString indent; indent.fill(' ',computeIndent(yytext,g_column)); @@ -6060,7 +6060,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) current->docFile = yyFileName; docBlockContext = YY_START; docBlockInBody = YY_START==SkipCurly; - static bool javadocAutoBrief = Config_getBool("JAVADOC_AUTOBRIEF"); + static bool javadocAutoBrief = Config_getBool(JAVADOC_AUTOBRIEF); docBlockAutoBrief = javadocAutoBrief; QCString indent; @@ -6621,7 +6621,7 @@ static void newEntry() static void handleCommentBlock(const QCString &doc,bool brief) { - static bool hideInBodyDocs = Config_getBool("HIDE_IN_BODY_DOCS"); + static bool hideInBodyDocs = Config_getBool(HIDE_IN_BODY_DOCS); int position=0; bool needsEntry=FALSE; if (docBlockInBody && hideInBodyDocs) return; @@ -6767,7 +6767,7 @@ static void parseCompounds(Entry *rt) initEntry(); // deep copy group list from parent (see bug 727732) - static bool autoGroupNested = Config_getBool("GROUP_NESTED_COMPOUNDS"); + static bool autoGroupNested = Config_getBool(GROUP_NESTED_COMPOUNDS); if (autoGroupNested && rt->groups && ce->section!=Entry::ENUM_SEC && !(ce->spec&Entry::Enum)) { QListIterator<Grouping> gli(*rt->groups); |