Skip to content

Commit

Permalink
Merge pull request #15 from docopt/itersize
Browse files Browse the repository at this point in the history
add the iteratorsize trait (close #14)
  • Loading branch information
bicycle1885 authored Jul 21, 2016
2 parents 9ec380a + 3bf97db commit 8946cce
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/DocOpt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,12 @@ type Tokens
end
end

if VERSION > v"0.5-"
function Base.iteratorsize(::Tokens)
return Base.SizeUnknown()
end
end

name(pattern::LeafPattern) = pattern.name
name(o::Option) = o.long !== nothing ? o.long : o.short

Expand Down

0 comments on commit 8946cce

Please sign in to comment.