Skip to content

J2CL transpiled compiler Scanner.java doesn't understand non-ascii characters. #2383

Closed as not planned
@brad4d

Description

@brad4d

JavaScript is supposed to allow non-ASCII unicode letters in identifiers, but the gwt-compiled version of Scanner.java doesn't recognize them because GWT's version of Character.isLetter() doesn't understand unicode..

https://github.com/google/closure-compiler/blob/master/src/com/google/javascript/jscomp/parsing/parser/Scanner.java#L775

Esprima has written their own logic for this in TypeScript here.
https://github.com/jquery/esprima/blob/master/src/character.ts

We should emulate this logic in Scanner.java instead of relying on Character, since it's buggy in GWT.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions