Skip to content

[Feature Request/Idea] For certain bindings and references such as foo-bar the compiler uses bracket notation. #1633

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

Closed
GarrettGeorge opened this issue Aug 5, 2018 · 0 comments

Comments

@GarrettGeorge
Copy link

Inspired by issue #1613 I think instead of simply throwing an error we could use bracket notation when bind:, ref:, etc. are binding or referencing, respectively, a value like ref:foo-bar.

Example Output:

this.refs['foo-bar']

Alternatively we can throw an error that's more specific than the one that Acorn throws, but since bracket notation is syntactically correct I figure it makes sense to support it.

I'm interesting in something of this nature as being my first contribution towards Svelte (the JSConf EU talk got me inspired).

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