Commit 202ae536 authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Treating @protected as alias for @private.

Not quite correct, but for now it's better for them to behave the same.
parent d6e44211
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ List of @tags to support
* @ignore @hide @private - in JsDuck implementation @ignore and @hide
  are considered aliases for @private.  (Some usage stats from ExtJS
  source: @hide 306 times, @private 199 times, @ignore 11 times.)
  Additionally @protected is currently also treated as @private.

* @namespace - Looks useless to me and indeed ExtJS source doesn't use
  it at all.
+2 −7
Original line number Diff line number Diff line
@@ -67,14 +67,10 @@ module JsDuck
          at_type
        elsif look(/@xtype\b/) then
          at_xtype
        elsif look(/@private\b/) then
          boolean_at_tag(/@private/, :private)
        elsif look(/@ignore\b/) then
          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(/@(private|ignore|hide|protected)\b/) then
          boolean_at_tag(/@(private|ignore|hide|protected)/, :private)
        elsif look(/@/) then
          @current_tag[:doc] += @input.scan(/@/)
        elsif look(/[^@]/) then
@@ -176,7 +172,6 @@ module JsDuck
    def at_xtype
      match(/@xtype/)
      add_tag(:xtype)
      maybe_type
      maybe_name
      skip_white
    end
+1 −1
Original line number Diff line number Diff line
@@ -418,7 +418,7 @@ foo: true,
  end

  def test_visibility_modifiers
    ["@private", "@hide", "@ignore"].each do |tagname|
    ["@private", "@hide", "@ignore", "@protected"].each do |tagname|
      docs = JsDuck.parse("/**\n * #{tagname}\n */");
      assert_equal(true, docs[0][:private])
    end