Skip to content

Comment-based type annotations#72

Open
haileys wants to merge 12 commits intomasterfrom
comment-annotations
Open

Comment-based type annotations#72
haileys wants to merge 12 commits intomasterfrom
comment-annotations

Conversation

@haileys
Copy link
Copy Markdown
Contributor

@haileys haileys commented Oct 2, 2017

This pull request implements comment based type annotations. They're currently only supported on methods, but they can easily be extended to classes as well.

They look something like this:

# @typedruby: (String a, Integer b) => ~String
def foo(a, b)
  # do stuff
end

This will allow Ruby code to use TypedRuby without having to use our custom VM supporting syntax extensions.

@nelhage
Copy link
Copy Markdown
Contributor

nelhage commented Oct 2, 2017

Does this support annotations spanning multiple lines in comments? If so, what does the syntax look like?

Annotating classes and constants would also be great.

@haileys haileys force-pushed the comment-annotations branch from 223f087 to da0b39b Compare January 12, 2018 02:13
@haileys haileys force-pushed the comment-annotations branch from da0b39b to f4d2a7c Compare March 14, 2022 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants