-
Notifications
You must be signed in to change notification settings - Fork 217
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
base: master
Are you sure you want to change the base?
Conversation
I wasn't quite sure how to test callbacks like these with your tooling - open to ideas! |
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?]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These two patterns of callbacks are defined here:
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 |
Should I push up additional fixes to RBS types? |
@apiology |
I'm sorry - I don't know how to test callbacks like these with your tooling. Do you have any ideas? A small example and I can fill in the rest. |
If it helps, I am successfully using my fork of this repo to typecheck this file: https://github.com/castwide/solargraph/blob/0e82bbdcc9da7343dd028373797f2fe0373dbf6a/lib/solargraph/parser/comment_ripper.rb |
No description provided.