Zac Sweers
10/13/2025, 10:17 PMfoo<bar even though it won't be legal in the JVM (and fail later). Java has things like Character.isJavaIdentifierPart(), is there anything/reference we should have for targeting other platforms like JS for ensuring names are safely escaped?ephemient
10/13/2025, 10:33 PMisJavaIdentifier is stricter than what the JVM will acceptephemient
10/13/2025, 10:33 PMZac Sweers
10/13/2025, 10:34 PMephemient
10/13/2025, 10:35 PMZac Sweers
10/13/2025, 10:37 PMephemient
10/13/2025, 10:37 PMZac Sweers
10/13/2025, 10:38 PMName class allowsephemient
10/13/2025, 10:39 PMZac Sweers
10/13/2025, 10:41 PMmadisp
10/13/2025, 11:00 PMmadisp
10/13/2025, 11:01 PMmadisp
10/13/2025, 11:05 PMmadisp
10/13/2025, 11:08 PMmadisp
10/13/2025, 11:08 PM$ or `_`; cannot start with a digit)ephemient
10/13/2025, 11:10 PM-XXLanguage:+JsAllowInvalidCharsIdentifiersEscaping or by default in newer versions), so JS's own identifier restrictions don't necessarily applyephemient
10/13/2025, 11:12 PMZac Sweers
10/14/2025, 3:12 AMbnorm
10/14/2025, 4:46 PMvalidateDeclarationOnConsumableName to check against a couple special and reserved keywords and makes sure the sanitized name is the same as the original name. Sanitization is driven by the ES 5.1 spec: https://262.ecma-international.org/5.1/#sec-7.6.
Native has FirNativeIdentifierChecker.
Sadly, I haven't found anything which unifies all of these that compiler plugin could use.