mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-06 04:42:15 -05:00
jsdoc: change parser to allow for multiply symbols of the same name.
This commit is contained in:
parent
1520cad144
commit
f78259f8de
1 changed files with 5 additions and 11 deletions
|
@ -52,19 +52,13 @@ JSDOC.Parser = {
|
|||
}
|
||||
}
|
||||
|
||||
// if a symbol alias is documented more than once the first one with the user docs wins
|
||||
// if a symbol alias is documented more than once, add ^n to its alias:
|
||||
if (JSDOC.Parser.symbols.hasSymbol(symbol.alias)) {
|
||||
var oldSymbol = JSDOC.Parser.symbols.getSymbol(symbol.alias);
|
||||
if (oldSymbol.comment.isUserComment) {
|
||||
if (JSDOC.opt.m) return;
|
||||
if (symbol.comment.isUserComment) { // old and new are both documented
|
||||
LOG.warn("The symbol '"+symbol.alias+"' is documented more than once.");
|
||||
return;
|
||||
}
|
||||
else { // old is documented but new isn't
|
||||
return;
|
||||
}
|
||||
var num = 0;
|
||||
while (JSDOC.Parser.symbols.hasSymbol(symbol.alias + '^' + num)) {
|
||||
num++;
|
||||
}
|
||||
symbol.alias = symbol.alias + '^' + num;
|
||||
}
|
||||
|
||||
// we don't document anonymous things
|
||||
|
|
Loading…
Reference in a new issue