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

Update JSDoc grammar with recent additions #532

Merged
merged 3 commits into from Sep 21, 2017

Conversation

Projects
None yet
2 participants
@Alhadis
Contributor

Alhadis commented Sep 21, 2017

This PR updates the JSDoc grammar with new tags added in v3.5.0, and also fixes a few omissions for Closure Compiler related stuff.

The notes of each commit contain details and references:

  • [7c0699f2e] Add @polymer and @polymerBehavior JSDoc tags
  • [6685c1a9c] Allow curly brackets to be used in some JSDoc tags
  • [1524164e5] Add support for JSDoc 3.5.0 tags

Alhadis added some commits Sep 21, 2017

Add `@Polymer` and `@polymerBehavior` JSDoc tags
These tags are used for marking objects with Polymer-specific semantics.
Used by Closure Compiler when executed with `--polymer_pass=2`.

Source: https://git.io/v5jo4
Allow curly brackets to be used in some JSDoc tags
Closure Compiler permits or requires curly brackets around {Type} tokens
that follow certain JSDoc tags. Specifically:

    /**
     * @export {SomeType}
     * @extends {goog.ds.BasicNodeList}
     * @Lends {objectName}
     * @Modifies {this}
     * @this {Widget}
     */

See: https://github.com/google/closure-compiler/wiki
Add support for JSDoc 3.5.0 tags
This adds support for the @Generator, @yield, and @hideconstructor tags:

    class CompleteExample {

        /** @hideconstructor */
        constructor() { }

        /**
         * Generate numbers in the Fibonacci sequence.
         * @Generator
         * @yields {Number} The next number in the Fibonacci sequence.
         */
        * fibonacci(){
            yield 41.999999999;
        }
    }

See:
* http://usejsdoc.org/tags-generator.html
* http://usejsdoc.org/tags-yields.html
* http://usejsdoc.org/tags-hideconstructor.html

@50Wliu 50Wliu merged commit d929689 into atom:master Sep 21, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@Alhadis Alhadis deleted the Cutlery-Drawer:jsdoc-fixes branch Sep 26, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment