diff --git a/lib/jsduck/standard_tag_parser.rb b/lib/jsduck/standard_tag_parser.rb index a03019d3d0a441a18e3e1ae928e5402e830f6e14..e732f1718816d64603439ead746dadf27ac13ee9 100644 --- a/lib/jsduck/standard_tag_parser.rb +++ b/lib/jsduck/standard_tag_parser.rb @@ -35,6 +35,8 @@ module JsDuck tag end + private + # matches {type} if possible and sets it on given tag hash. # Also checks for {optionality=} in type definition. def add_type(tag) @@ -68,7 +70,8 @@ module JsDuck if hw.match(/\[/) tag[:name] = hw.ident_chain if hw.match(/=/) - tag[:default] = hw.default_value + hw + tag[:default] = default_value end hw.match(/\]/) tag[:optional] = true @@ -143,7 +146,6 @@ module JsDuck def hw @ds.hw - self end end