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

the -> method chaining macro is broken #1

Open
darrencruse opened this issue Dec 1, 2015 · 0 comments
Open

the -> method chaining macro is broken #1

darrencruse opened this issue Dec 1, 2015 · 0 comments

Comments

@darrencruse
Copy link
Owner

This is the method chaining macro from LispyScript 1 as described here:
http://lispyscript.com/docs/#statements

It should still work but appears to be broken right now.

A quick test is to use the node server example from the link above:

(->
  (require "http")
  (.createServer
    (function (request response)
      (response.writeHead 200 {'Content-Type': 'text/plain'})
      (response.end "Hello World\n")))
  (.listen 3000 "localhost"))

But currently this transpiles to this(!)

(3000. listen(((function(request, response) {
  response.writeHead(200, {
    'Content-Type': 'text/plain'
  });
  return response.end("Hello World\n");
}.createServer)(require("http")))))

This is also breaking the promise macro in sugarlisp-async btw.

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

No branches or pull requests

1 participant