yardcheck icon indicating copy to clipboard operation
yardcheck copied to clipboard

Support simple literal syntax in type annotations

Open backus opened this issue 8 years ago • 0 comments

Even YARD has some docs that use literal ruby in the type annotation like so

# @param path [:root]

where we should parse :root as "literally the symbol :root".

I think if parsing a type fails then we should try using Parser on the documented type. I think we should still reraise though if it isn't one of the very simple literals like sym, str, int, float, array, etc. Obviously I am not going to parse and eval arbitrarily complex ruby

backus avatar Mar 20 '17 01:03 backus