Skip to content
Snippets Groups Projects
Commit 0ef7c8f6 authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Make most StandardTagParser methods private.

Let the #hw method return it's original return value, which is the
DocScanner class - then it chained with one of the DocScanner
methods like #look or #match.  The only exception being #default_value
method which belongs to StandardTagParser and can't be therefore
chained from #hw method - but that's just a one little exception
we can live with.
parent e56b22ef
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment