(node, comments, scope, aval, type)
| 173 | } |
| 174 | |
| 175 | function interpretComments(node, comments, scope, aval, type) { |
| 176 | jsdocInterpretComments(node, scope, aval, comments); |
| 177 | var cx = infer.cx(); |
| 178 | |
| 179 | if (!type && aval instanceof infer.AVal && aval.types.length) { |
| 180 | type = aval.types[aval.types.length - 1]; |
| 181 | if (!(type instanceof infer.Obj) || type.origin != cx.curOrigin || type.doc) |
| 182 | type = null; |
| 183 | } |
| 184 | |
| 185 | for (var i = comments.length - 1; i >= 0; i--) { |
| 186 | var text = stripLeadingChars(comments[i].split(/\r\n?|\n/)).join("\n"); |
| 187 | if (text) { |
| 188 | if (aval instanceof infer.AVal) aval.doc = text; |
| 189 | if (type) type.doc = text; |
| 190 | break; |
| 191 | } |
| 192 | } |
| 193 | } |
| 194 | |
| 195 | // Parses a subset of JSDoc-style comments in order to include the |
| 196 | // explicitly defined types in the analysis. |
no test coverage detected
searching dependent graphs…