From 5335a2097ca95ba95856ea9af73a5e1c6158689c Mon Sep 17 00:00:00 2001 From: "gman@google.com" Date: Wed, 17 Jun 2009 06:29:23 +0000 Subject: Undoing gcl bug damage AGAIN git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18600 0039d316-1c4b-4281-b951-d872f2087c98 --- .../jsdoc-toolkit-templates/publish.js | 65 ++++++++++------------ 1 file changed, 29 insertions(+), 36 deletions(-) (limited to 'o3d/documentation') diff --git a/o3d/documentation/jsdoc-toolkit-templates/publish.js b/o3d/documentation/jsdoc-toolkit-templates/publish.js index d4e102a..1890434 100644 --- a/o3d/documentation/jsdoc-toolkit-templates/publish.js +++ b/o3d/documentation/jsdoc-toolkit-templates/publish.js @@ -543,35 +543,38 @@ function linkifySingleType(type) { } } } else if (type.indexOf(':') >= 0) { // check for records. - if (type.indexOf('::') >= 0) { // check for CPP scope - print ('WARNING: CPP "::" scope operator found for type "' + type + - '" must be Javascript "." scope operator.'); - } else { - var elements = type.split(/\s*,\s*/); - var output = '{'; - for (var ii = 0; ii < elements.length; ++ii) { - if (ii > 0) { - output += ', '; - } - var element = elements[ii]; - var colon = element.indexOf(': '); - if (colon < 0) { - print ("WARNING: Malformed record specification. Format must be " + - "{id1: type1, id2: type2, ...}."); - output += element; - } else { - var name = element.substring(0, colon); - var subType = element.substring(colon + 2); - output += name + ': ' + linkifyTypeSpec(subType) - } + var elements = type.split(/\s*,\s*/); + var output = '{'; + for (var ii = 0; ii < elements.length; ++ii) { + if (ii > 0) { + output += ', '; + } + var element = elements[ii]; + var colon = element.indexOf(': '); + if (colon < 0) { + print ("WARNING: Malformed record specification. Format must be " + + "{id1: type1, id2: type2, ...}."); + output += element; + } else { + var name = element.substring(0, colon); + var subType = element.substring(colon + 2); + output += name + ': ' + linkifyTypeSpec(subType) } - link = output + '}'; } + link = output + '}'; } else { var symbol = getSymbol(type); if (symbol) { link = '' + type + ''; + } else if (startsWith(type, 'o3d.')) { + // TODO: remove this hack, make nixysa generate JSDOC js + // files instead of C++ headers and pass those into + // jsdoctoolkit. + reportUnknownType(type); + link = '' + + type + ''; } else { // See if the symbol is a property or field. var period = type.lastIndexOf('.'); @@ -583,21 +586,11 @@ function linkifySingleType(type) { link = '' + type + ''; } else { - if (startsWith(type, 'o3d.')) { - // TODO(gman): remove this hack, make nixysa generate JSDOC js - // files instead of C++ headers and pass those into - // jsdoctoolkit. + if (subType[0] == '?') { + subType = subType.substring(1); + } + if (!g_validJSDOCTypes[subType]) { reportUnknownType(type); - link = '' + - type + ''; - } else { - if (subType[0] == '?') { - subType = subType.substring(1); - } - if (!g_validJSDOCTypes[subType]) { - reportUnknownType(type); - } } } } -- cgit v1.1