Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comment attachment fails after an inline block comment on a function parameter #611

Closed
hegemonic opened this issue Mar 25, 2014 · 4 comments
Assignees
Labels
Milestone

Comments

@hegemonic
Copy link
Contributor

When JSDoc parses the following code, it fails to attach the comments for module.myFunc and privateFunc:

define("MyModule", function(/** @exports MyModule */module) {

   /** My module function. */
   module.myFunc = function() {

   };

   /** My private function. */
   var privateFunc = function() {
   };
});

If you remove the inline block comment on the function parameter, everything works fine.

We should fix this before #473, which will mask the underlying problem.

@hegemonic hegemonic added this to the 3.3.0 milestone Mar 25, 2014
@hegemonic hegemonic self-assigned this Mar 25, 2014
@hegemonic
Copy link
Contributor Author

Actually, I think fixing #473 will allow us to rip out all of the @lends hackery, along with the searchDescendants stuff in the comment-attachment code. I'll use this ticket to make those changes.

@hegemonic
Copy link
Contributor Author

The @lends hackery is now gone. Still looking at searchDescendants.

@hegemonic
Copy link
Contributor Author

It appears that this issue also causes us to lose the second comment in the following example, taken from #343 (note that the @lends tag is in the wrong place):

var MyClass = Class.define({
    /** @lends MyClass# */

    /**
     * Create an instance of MyClass.
     * @constructs
     */
    initialize: function() {}
});

@hegemonic
Copy link
Contributor Author

This behavior has changed significantly, although the current behavior is even stranger.

I'll close this issue and file two new ones.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant