Loading README.md +1 −1 Original line number Diff line number Diff line Loading @@ -27,9 +27,9 @@ List of @tags to support * @event - OK * @param - OK * @return - OK * @static - OK * @member * @static * @link * @ignore @hide @private - in JsDuck implementation @ignore and @hide Loading lib/jsduck/doc_comment_parser.rb +2 −0 Original line number Diff line number Diff line Loading @@ -71,6 +71,8 @@ module JsDuck boolean_at_tag(/@ignore/, :private) elsif look(/@hide\b/) then boolean_at_tag(/@hide/, :private) elsif look(/@static\b/) then boolean_at_tag(/@static/, :static) elsif look(/@/) then @current_tag[:doc] += @input.scan(/@/) elsif look(/[^@]/) then Loading lib/jsduck/merger.rb +2 −0 Original line number Diff line number Diff line Loading @@ -114,6 +114,7 @@ module JsDuck :params => detect_params(docs, code), :return => doc_map[:return] ? doc_map[:return].first : nil, :private => !!doc_map[:private], :static => !!doc_map[:static], } end Loading Loading @@ -147,6 +148,7 @@ module JsDuck :type => detect_type(:prop, doc_map, code), :doc => detect_doc(docs), :private => !!doc_map[:private], :static => !!doc_map[:static], } end Loading test/tc_jsduck.rb +16 −0 Original line number Diff line number Diff line Loading @@ -401,6 +401,22 @@ foo: true, end end def test_static_method docs = JsDuck.parse("/** * @method * @static */"); assert_equal(true, docs[0][:static]) end def test_static_property docs = JsDuck.parse("/** * @property * @static */"); assert_equal(true, docs[0][:static]) end def test_member_docs_following_class docs = JsDuck.parse(" /** Loading Loading
README.md +1 −1 Original line number Diff line number Diff line Loading @@ -27,9 +27,9 @@ List of @tags to support * @event - OK * @param - OK * @return - OK * @static - OK * @member * @static * @link * @ignore @hide @private - in JsDuck implementation @ignore and @hide Loading
lib/jsduck/doc_comment_parser.rb +2 −0 Original line number Diff line number Diff line Loading @@ -71,6 +71,8 @@ module JsDuck boolean_at_tag(/@ignore/, :private) elsif look(/@hide\b/) then boolean_at_tag(/@hide/, :private) elsif look(/@static\b/) then boolean_at_tag(/@static/, :static) elsif look(/@/) then @current_tag[:doc] += @input.scan(/@/) elsif look(/[^@]/) then Loading
lib/jsduck/merger.rb +2 −0 Original line number Diff line number Diff line Loading @@ -114,6 +114,7 @@ module JsDuck :params => detect_params(docs, code), :return => doc_map[:return] ? doc_map[:return].first : nil, :private => !!doc_map[:private], :static => !!doc_map[:static], } end Loading Loading @@ -147,6 +148,7 @@ module JsDuck :type => detect_type(:prop, doc_map, code), :doc => detect_doc(docs), :private => !!doc_map[:private], :static => !!doc_map[:static], } end Loading
test/tc_jsduck.rb +16 −0 Original line number Diff line number Diff line Loading @@ -401,6 +401,22 @@ foo: true, end end def test_static_method docs = JsDuck.parse("/** * @method * @static */"); assert_equal(true, docs[0][:static]) end def test_static_property docs = JsDuck.parse("/** * @property * @static */"); assert_equal(true, docs[0][:static]) end def test_member_docs_following_class docs = JsDuck.parse(" /** Loading