Skip to content
This repository has been archived by the owner on Dec 5, 2022. It is now read-only.

Update handling of invalid identifiers #63

Open
derekxu16 opened this issue Nov 8, 2019 · 0 comments
Open

Update handling of invalid identifiers #63

derekxu16 opened this issue Nov 8, 2019 · 0 comments

Comments

@derekxu16
Copy link
Contributor

derekxu16 commented Nov 8, 2019

Certain identifiers are acceptable in JavaScript but not in Dart. One common case where these identifiers get used is in Object properties. obj[string] can be used to give an object a property with any name.

In dart2js, JS$ can be prepended to fix certain invalid identifiers, but this won't work for identifiers that contain invalid characters. Additionally, DDC no longer supports JS$. Instead of using JS$, the generator should be able to determine which invalid identifiers are renamable and expose extension methods that rename them (by accessing the JS entity with js_util). For identifiers that aren't renamable, it should suppress that declaration and emit a warning.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant