Skip to content

Support simple literal syntax in type annotations #4

Description

@backus

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions