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

support empty comma seperated arguments and parameters #78

Open
plexigras opened this issue Jun 4, 2018 · 2 comments
Open

support empty comma seperated arguments and parameters #78

plexigras opened this issue Jun 4, 2018 · 2 comments
Labels
discussion Issues with subject matter open for discussion; input sought from contributors. enhancement language Core language and syntax design issues parser

Comments

@plexigras
Copy link

just so x(, b) => y(, b) compile to const x = (arg0, b) => y(undefined, b)

@wcjohnson wcjohnson added enhancement parser language Core language and syntax design issues labels Jun 4, 2018
@wcjohnson
Copy link
Owner

Yes, I think this is a good idea at broad strokes, but I would like to bikeshed the syntax a bit before implementing it.

For example, a double comma ,, is a very common typo -- I don't know if it's a good idea for that to compile and produce difficult-to-diagnose runtime crashes.

Perhaps a whitespace should be required between the omitted arg list entries.

@wcjohnson wcjohnson added the discussion Issues with subject matter open for discussion; input sought from contributors. label Jun 4, 2018
@plexigras
Copy link
Author

I didn't think about it potentially being a typo but now that I think about it I think it might be better if eslint would warn you about the potential typo over having it directly in the transpiler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Issues with subject matter open for discussion; input sought from contributors. enhancement language Core language and syntax design issues parser
Projects
None yet
Development

No branches or pull requests

2 participants