Skip to content

Chaining semantics after arguments with outdent #3317

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

Merged
merged 1 commit into from
Jan 21, 2014

Conversation

xixixao
Copy link
Contributor

@xixixao xixixao commented Jan 21, 2014

After adding chaining syntax in #3263 there has been a problem that kept bugging me:

callA callB ->
  body
.method()
# and
callA callB -> body
.method()
# Compiles to:    callA(callB(function() { return body; }).method());

but

callA callB expression
.method()
# Compiles to:    callA(callB(expression)).method();

This fixes the issue and makes functions and objects behave as any other argument.

@vendethiel
Copy link
Collaborator

👍 Really feels more natural that way

jashkenas added a commit that referenced this pull request Jan 21, 2014
Chaining semantics after arguments with outdent
@jashkenas jashkenas merged commit 1cc583b into jashkenas:master Jan 21, 2014
@michaelficarra
Copy link
Collaborator

This begs the question: should whitespace before member access always close implicit calls/objects a la Coco/LiveScript?

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

Successfully merging this pull request may close these issues.

4 participants