lsegal/yard — pull request #411 by pukkaone (2011-11-08 00:09:24+00:00)
Title: Type list ends at next occurrence of matching delimiter.

YARD 0.7.3

I want to document a method parameter is an object that responds to the <<
method. I tried writing:

# @param [#<<] output
# where to write formatted data

The parameter is actually parsed as

name:

#<<]

type:

#<<] output where to write formatted data

This happens because the parser tracks nested delimiter pairs in the type list,
and `<` is an opening delimiter.

With this patch, the type list ends at the next occurrence of the closing
delimiter corresponding to the opening delimiter. For example, if the type
list begins with `[`, then it ends at the next `]`. If you want to include `]`
in the type list, then wrap the type list in a different delimiter pair:

# @param {[Integer, Integer]} point
# co-ordinates in array