mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
The issue in brief: Within an object literal, if a standalone comment was followed by a commented symbol, the symbol's comment would not be attached correctly. The fix essentially reverts the changes for #565, which are no longer needed thanks to 50cd99fa2fca753fcf7c9ec3ecf70afd47168e94. The fix also corrects the order in which we walk a MemberExpression's child nodes. Without this correction, comments would not be attached correctly inside CallExpression nodes.
29 lines
629 B
JavaScript
29 lines
629 B
JavaScript
var Person = Klass.extend(
|
|
/** @lends Person.prototype */
|
|
{
|
|
/** @constructs Person */
|
|
initialize: function(name) {
|
|
this.name = name;
|
|
},
|
|
|
|
/**
|
|
* Callback for `say`.
|
|
*
|
|
* @callback Person~sayCallback
|
|
* @param {?string} err - Information about the error, if any.
|
|
* @param {?string} message - The message.
|
|
*/
|
|
/**
|
|
* Speak a message asynchronously.
|
|
*
|
|
* @param {Person~sayCallback} cb
|
|
*/
|
|
say: function(message, cb) {
|
|
if (!message) {
|
|
cb('You forgot the message!');
|
|
}
|
|
|
|
cb(null, this.name + ' says: ' + message);
|
|
}
|
|
});
|