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

:expr doesn't allow function calls #28

Closed
disnet opened this issue Oct 3, 2012 · 4 comments
Closed

:expr doesn't allow function calls #28

disnet opened this issue Oct 3, 2012 · 4 comments

Comments

@disnet
Copy link
Member

disnet commented Oct 3, 2012

This fails to match:

macro m {
  case ($x:expr) => {$x}
}
function id (x) { return x; }
var x = m( id(4) )

This is related to the outside-in/inside-out expansion stuff. Right now when trying to match the :expr the syntax is completely unexpanded but what we really need to do is a local-expand sort of thing.

@disnet
Copy link
Member Author

disnet commented Apr 17, 2013

Fixed last week. Example passing tests here

@gmarceau
Copy link

This piece of documentation still claims it doesn't work. Scroll down to Can't use arrays directly because of #28.

@acjay
Copy link

acjay commented Jan 18, 2014

Is it still broken? Documentation still says so

@natefaubion
Copy link
Contributor

No, this is not broken. It's not documentation per se, just an example someone put on the wiki. The comment should be removed. You can see a comprehensive do-notation macro here: https://github.com/puffnfresh/sweet-fantasies/blob/master/src/do.sjs

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

No branches or pull requests

4 participants