-
Notifications
You must be signed in to change notification settings - Fork 12
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
feat: add support for yield return
#143
feat: add support for yield return
#143
Conversation
Progress toward decaffeinate/decaffeinate#688
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.
Feel like taking a stab at the mapper for yield too?
Heh, sure. Yeah, I guess at this point it shouldn't be so bad. :-) |
5e2b267
to
93ad71e
Compare
(I just updated the PR with mappers for |
@@ -48,3 +54,29 @@ function mapMultiplyOp(context: ParseContext, node: CoffeeOp) { | |||
mapAny(context, node.second) | |||
); | |||
} | |||
|
|||
function mapYieldOp(context: ParseContext, node: CoffeeOp) { |
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.
Missing return type.
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.
mapMultiplyOp
was as well, and then I looked it up and learned that typescript can infer the type based on what's actually returned. But I guess you prefer to have explicit return types anyway? Would be nice if there was a tslint rule for that, although from a quick glance I don't see one.
} | ||
} | ||
|
||
function mapYieldFromOp(context: ParseContext, node: CoffeeOp) { |
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.
Missing return type.
Progress toward decaffeinate/decaffeinate#688