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

f k: v, a[b] #1622

Closed
aeosynth opened this issue Aug 22, 2011 · 12 comments
Closed

f k: v, a[b] #1622

aeosynth opened this issue Aug 22, 2011 · 12 comments

Comments

@aeosynth
Copy link
Contributor

$ coffee -e 'f k: v, b[c]'
Error: Parse error on line 1: Unexpected 'INDEX_START'

edit: added f to make it (hopefully) valid coffeescript.

@michaelficarra
Copy link
Collaborator

That's not valid coffeescript. What did you expect that to produce?

@aeosynth
Copy link
Contributor Author

I expected results similar to k: v; b[c]:

({
  k: v
}),
b;

this makes more sense as function arguments:

f k: v, b[c]

@michaelficarra
Copy link
Collaborator

I think you're forgetting that there's no comma operator in coffeescript.

@aeosynth
Copy link
Contributor Author

yeah just now I tried

k: v, b

which failed. however,

f k: v, b

worked just fine

@michaelficarra
Copy link
Collaborator

f k: v, b worked just fine

since it's an argument list. closing now.

@aeosynth
Copy link
Contributor Author

that doesn't help my original problem - isn't f k: v, a[b] also an argument list?

@michaelficarra
Copy link
Collaborator

You're right, I missed that. This may be a duplicate of another issue, but I can't find it right now. Sorry for the quick (and poor) handling of this issue.

@aeosynth
Copy link
Contributor Author

oh, it produced a different parse error, so I thought it was maybe a different issue.

from #1111

k: f a, []

errors, but

f k: a, []

works. then it errors again (with a different parse error) at

f k: a, b[c]

edit: used [] for more relevant comparison
edit: third code block

@michaelficarra
Copy link
Collaborator

seems maybe different.

Yeah, my mistake, sorry. See the above comment.

@satyr
Copy link
Collaborator

satyr commented Aug 22, 2011

#1061

@satyr satyr closed this as completed Aug 22, 2011
@michaelficarra
Copy link
Collaborator

thanks, @satyr

@TrevorBurnham
Copy link
Collaborator

Re-reported as #1877, re-closing as duplicate of #1111.

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