From 7e041a6f5bf32637ebb71589d471586db1d0f7fd Mon Sep 17 00:00:00 2001 From: albert-github Date: Fri, 23 Mar 2018 18:42:32 +0100 Subject: Bug 794509 - c# see langword broken - code.l: The word 'null' was not recognized as reserved word - docparser.l The attribute 'langword' should not generate a link but the 'langword' value as code. --- src/code.l | 2 +- src/docparser.cpp | 17 ++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/code.l b/src/code.l index d7d5d74..1ad74dc 100644 --- a/src/code.l +++ b/src/code.l @@ -1823,7 +1823,7 @@ TEMPLIST "<"[^\"\}\{\(\)\/\n\>]*">" SCOPETNAME (((({ID}{TEMPLIST}?){BN}*)?{SEP}{BN}*)*)((~{BN}*)?{ID}) SCOPEPREFIX ({ID}{TEMPLIST}?{BN}*{SEP}{BN}*)+ KEYWORD_OBJC ("@public"|"@private"|"@protected"|"@class"|"@implementation"|"@interface"|"@end"|"@selector"|"@protocol"|"@optional"|"@required"|"@throw"|"@synthesize"|"@property") -KEYWORD ("asm"|"__assume"|"auto"|"class"|"const"|"delete"|"enum"|"explicit"|"extern"|"false"|"friend"|"gcnew"|"gcroot"|"set"|"get"|"inline"|"internal"|"mutable"|"namespace"|"new"|"nullptr"|"override"|"operator"|"pin_ptr"|"private"|"protected"|"public"|"raise"|"register"|"remove"|"self"|"sizeof"|"static"|"struct"|"__super"|"function"|"template"|"generic"|"this"|"true"|"typedef"|"typeid"|"typename"|"union"|"using"|"virtual"|"volatile"|"abstract"|"final"|"import"|"synchronized"|"transient"|"alignas"|"alignof"|{KEYWORD_OBJC}) +KEYWORD ("asm"|"__assume"|"auto"|"class"|"const"|"delete"|"enum"|"explicit"|"extern"|"false"|"friend"|"gcnew"|"gcroot"|"set"|"get"|"inline"|"internal"|"mutable"|"namespace"|"new"|"null"|"nullptr"|"override"|"operator"|"pin_ptr"|"private"|"protected"|"public"|"raise"|"register"|"remove"|"self"|"sizeof"|"static"|"struct"|"__super"|"function"|"template"|"generic"|"this"|"true"|"typedef"|"typeid"|"typename"|"union"|"using"|"virtual"|"volatile"|"abstract"|"final"|"import"|"synchronized"|"transient"|"alignas"|"alignof"|{KEYWORD_OBJC}) FLOWKW ("break"|"catch"|"continue"|"default"|"do"|"else"|"finally"|"return"|"switch"|"throw"|"throws"|"@catch"|"@finally") FLOWCONDITION ("case"|"for"|"foreach"|"for each"|"goto"|"if"|"try"|"while"|"@try") TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"object"|"short"|"signed"|"unsigned"|"void"|"wchar_t"|"size_t"|"boolean"|"id"|"SEL"|"string"|"nullptr") diff --git a/src/docparser.cpp b/src/docparser.cpp index 3d57c2e..f57319f 100644 --- a/src/docparser.cpp +++ b/src/docparser.cpp @@ -6125,16 +6125,15 @@ int DocPara::handleHtmlStartTag(const QCString &tagName,const HtmlAttribList &ta } } } - else if (findAttribute(tagHtmlAttribs,"langword",&cref)) // or + else if (findAttribute(tagHtmlAttribs,"langword",&cref)) // or { - doctokenizerYYsetStatePara(); - DocLink *lnk = new DocLink(this,cref); - m_children.append(lnk); - QCString leftOver = lnk->parse(FALSE,TRUE); - if (!leftOver.isEmpty()) - { - m_children.append(new DocWord(this,leftOver)); - } + bool inSeeBlock = g_inSeeBlock; + g_token->name = cref; + g_inSeeBlock = TRUE; + m_children.append(new DocStyleChange(this,g_nodeStack.count(),DocStyleChange::Code,TRUE)); + handleLinkedWord(this,m_children,TRUE); + m_children.append(new DocStyleChange(this,g_nodeStack.count(),DocStyleChange::Code,FALSE)); + g_inSeeBlock = inSeeBlock; } else { -- cgit v0.12