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

Add return types for callbacks in Ripper::SexpBuilder #2315

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

apiology
Copy link

No description provided.

@apiology
Copy link
Author

I wasn't quite sure how to test callbacks like these with your tooling - open to ideas!

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@apiology apiology marked this pull request as draft March 11, 2025 13:18
Also match tok type to token type in lexer doc example

def on_CHAR: (untyped tok) -> untyped
def on_CHAR: (String tok) -> [Symbol, String, [Integer?, Integer?]]
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@apiology
Copy link
Author

This change is limited as I'm not terribly familiar with Ripper. These changes will help https://github.com/castwide/solargraph pass its own typechecking; here's the use it makes of Ripper: https://github.com/castwide/solargraph/blob/41b892397be99fd6b445d1e308a3f512c5ec32e9/lib/solargraph/parser/comment_ripper.rb#L4

cc: @aamine in case you have thoughts

@apiology apiology marked this pull request as ready for review March 11, 2025 13:46
@apiology
Copy link
Author

Should I push up additional fixes to RBS types?

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

Successfully merging this pull request may close these issues.

None yet

1 participant