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

fix: `yield` expression should be callable #823

merged 2 commits into from Feb 1, 2016


Copy link

@summivox summivox commented Jan 25, 2016

Since yield expressions evaluate to argument passed to next, if a function is passed it should be callable.


f = ->* (yield)!
g = -> console.log 'hit'
f!! g

should compile to:

var f, g, x$;
f = function*(){
  return (yield)();
g = function(){
  return console.log('hit');
x$ = f();
Copy link

@vendethiel vendethiel commented Jan 31, 2016

Please add some tests :).

@summivox summivox mentioned this pull request Jan 31, 2016
@summivox summivox force-pushed the summivox:yield-callable branch from 7ff8abe to fade767 Jan 31, 2016
Copy link
Contributor Author

@summivox summivox commented Jan 31, 2016

vendethiel added a commit that referenced this pull request Feb 1, 2016
fix: `yield` expression should be callable
@vendethiel vendethiel merged commit 856ab6b into gkz:master Feb 1, 2016
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Copy link

@vendethiel vendethiel commented Feb 1, 2016


@summivox summivox deleted the summivox:yield-callable branch Feb 1, 2016
This was referenced Jan 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants