Skip to content

Conversation

@wycats
Copy link
Contributor

@wycats wycats commented Oct 24, 2024

This is an initial implementation of array and hash literals.

Of note:

  • The hash literal syntaxes ((key1=value1 key2=value2) and {{key1=value1 key2=value2}}) are currently syntax errors, so they can be added without breaking changes or any form of opt-in.
  • The array literal syntax ([a b c]) is ambiguous with the this-less escaped property path ([a b] currently means this.[a b], which translates to this["a b"] in JavaScript).

The latter form is disallowed in Ember, which does not support the implicit this form.

To avoid breaking existing consumers, this PR makes the array-literal syntax opt-in via a parser option.

@wycats wycats merged commit a095229 into master Oct 25, 2024
2 checks passed
@wycats wycats deleted the feature/array-and-hash-literals branch October 25, 2024 05:29
@github-actions github-actions bot mentioned this pull request Mar 19, 2025
@NullVoxPopuli NullVoxPopuli added the enhancement New feature or request label Mar 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants