diff options
author | albert-github <albert.tests@gmail.com> | 2018-02-28 10:55:04 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2018-02-28 10:55:04 (GMT) |
commit | 0bdaf4541c2495b3166386992666f842c38642c1 (patch) | |
tree | 9699a7f2c6de2c88b0f9d0a93f482e6d44160845 /src | |
parent | b6f01ff09b17e5c2288f2418ef0a8f074456c357 (diff) | |
download | Doxygen-0bdaf4541c2495b3166386992666f842c38642c1.zip Doxygen-0bdaf4541c2495b3166386992666f842c38642c1.tar.gz Doxygen-0bdaf4541c2495b3166386992666f842c38642c1.tar.bz2 |
Bug 611240 - C# keywords 'get' and 'set' are highlighted as reserved words in C++ documentation source browser.
In case of Cpp don't see 'get' and 'set' as keywords, but in case the keyword rule is used REJECT the rule and give other rules a chance (e.g. the function rule).
Diffstat (limited to 'src')
-rw-r--r-- | src/code.l | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -116,6 +116,7 @@ static int g_memCallContext; static int g_lastCContext; static int g_skipInlineInitContext; +static bool g_insideCpp; static bool g_insideObjC; static bool g_insideJava; static bool g_insideCS; @@ -2415,6 +2416,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\" g_prefixed_with_this_keyword = TRUE; } <Body>{KEYWORD}/([^a-z_A-Z0-9]) { + if (g_insideCpp && (QCString(yytext) =="set" ||QCString(yytext) =="get")) REJECT; startFontClass("keyword"); codifyLines(yytext); if (QCString(yytext)=="typedef") @@ -2425,11 +2427,13 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\" endFontClass(); } <Body>{KEYWORD}/{B}* { + if (g_insideCpp && (QCString(yytext) =="set" ||QCString(yytext) =="get")) REJECT; startFontClass("keyword"); codifyLines(yytext); endFontClass(); } <Body>{KEYWORD}/{BN}*"(" { + if (g_insideCpp && (QCString(yytext) =="set" ||QCString(yytext) =="get")) REJECT; startFontClass("keyword"); codifyLines(yytext); endFontClass(); @@ -2984,6 +2988,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\" <MemberCall2,FuncCall>{KEYWORD}/([^a-z_A-Z0-9]) { //addParmType(); //g_parmName=yytext; + if (g_insideCpp && (QCString(yytext) =="set" ||QCString(yytext) =="get")) REJECT; startFontClass("keyword"); g_code->codify(yytext); endFontClass(); @@ -3742,6 +3747,7 @@ void parseCCode(CodeOutputInterface &od,const char *className,const QCString &s, g_insideJava = lang==SrcLangExt_Java; g_insideCS = lang==SrcLangExt_CSharp; g_insidePHP = lang==SrcLangExt_PHP; + g_insideCpp = lang==SrcLangExt_Cpp; if (g_sourceFileDef) { setCurrentDoc("l00001"); |