Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot include square brackets in @overload method signature #893

Closed
xaviershay opened this issue Aug 15, 2015 · 2 comments
Closed

Cannot include square brackets in @overload method signature #893

xaviershay opened this issue Aug 15, 2015 · 2 comments

Comments

@xaviershay
Copy link

While documenting the .[] method for an array-like, I wanted to do the following:

@overload vector[index]
  @param index [Integer] The index to retrieve
@overload vector[start..end]
  @param range [Range] Range of indexes to retrieve

[index] and [start..end] are stripped out in rendering. The documentation doesn't appear to preclude this.

I tried various methods of escaping (e.g. \[) but couldn't find one that works.

Is there a way to do this?

@lsegal
Copy link
Owner

lsegal commented Aug 15, 2015

There isn't a way currently but I wouldn't be opposed to adjusting the overload syntax to support it.

The current syntax is:

# @overload [](index)

You don't usually list the object name as part of the method signature, just the method name and its arguments.

@lsegal
Copy link
Owner

lsegal commented Apr 16, 2016

Closing out old issues.

I'm marking this as closed since there are no plans to implement this on my end, but if someone put together a PR I would take a look!

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

No branches or pull requests

2 participants