-
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
Fixes (part 2) #149
Fixes (part 2) #149
Conversation
yes = true | ||
return false |
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.
I'm not sure I understand this statement, yes
is the named return, which we set to true
but then immediately override by returning false
?
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.
ast.Inspect
is an iterator that expects a function to return whether it wants to continue iteration in that part of the AST. Once we find a function literal, we return false to terminate iteration.
I copied the helper function from above and changed it slightly, since we're looking for any function literal, not just colored function literals.
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.
😓 my bad, I misread this, thanks for the precision.
Following on from #148, this PR contains various fixes:
noinline
, in case they create a closure that needs to be serialized