summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew White <mehw.is.me@inventati.org>2017-07-24 04:04:25 (GMT)
committerMatthew White <mehw.is.me@inventati.org>2017-08-03 03:38:51 (GMT)
commit037f465e934ce122c8412b55548a153ad517aba0 (patch)
tree08414d10b34d85e519588b318a7ed7acae2d9023
parent6b29c4e55009771545305fe3ec3ba92e8d0ba38e (diff)
downloadDoxygen-037f465e934ce122c8412b55548a153ad517aba0.zip
Doxygen-037f465e934ce122c8412b55548a153ad517aba0.tar.gz
Doxygen-037f465e934ce122c8412b55548a153ad517aba0.tar.bz2
Fix/New: add variadic function args '...' support to @ref
* src/doctokenizer.l: add VARARGS, aka variadic function args '...' * src/util.cpp (linkToText): call substitute() with skip_seq set to 3 to keep each '...' sequence of chars unchanged For instance, the command '@ref fun(int,...)' now is able to parse each '...' sequence of chars correctly to reference fun(int,...). Before this patch, the '...' part was skipped. Also, linkToText() is fixed to not substitute '...' with '::::::' in the text representation of the link.
-rw-r--r--src/doctokenizer.l3
-rw-r--r--src/util.cpp2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/doctokenizer.l b/src/doctokenizer.l
index 7545cba..90a8c55 100644
--- a/src/doctokenizer.l
+++ b/src/doctokenizer.l
@@ -360,8 +360,9 @@ SPCMD3 {CMD}form#[0-9]+
SPCMD4 {CMD}"::"
INOUT "inout"|"in"|"out"|("in"{BLANK}*","{BLANK}*"out")|("out"{BLANK}*","{BLANK}*"in")
PARAMIO {CMD}param{BLANK}*"["{BLANK}*{INOUT}{BLANK}*"]"
+VARARGS "..."
TEMPCHAR [a-z_A-Z0-9.,: \t\*\&\(\)\[\]]
-FUNCCHAR [a-z_A-Z0-9,:\<\> \t\^\*\&\[\]]
+FUNCCHAR [a-z_A-Z0-9,:\<\> \t\^\*\&\[\]]|{VARARGS}
FUNCPART {FUNCCHAR}*("("{FUNCCHAR}*")"{FUNCCHAR}*)?
SCOPESEP "::"|"#"|"."
TEMPLPART "<"{TEMPCHAR}*">"
diff --git a/src/util.cpp b/src/util.cpp
index 8fcd8e3..02cb27b 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -4767,7 +4767,7 @@ QCString linkToText(SrcLangExt lang,const char *link,bool isFileName)
// replace # by ::
result=substitute(result,"#","::");
// replace . by ::
- if (!isFileName && result.find('<')==-1) result=substitute(result,".","::");
+ if (!isFileName && result.find('<')==-1) result=substitute(result,".","::",3);
// strip leading :: prefix if present
if (result.at(0)==':' && result.at(1)==':')
{