File tree Expand file tree Collapse file tree 6 files changed +25
-4
lines changed
src/com/google/javascript/jscomp/parsing/parser Expand file tree Collapse file tree 6 files changed +25
-4
lines changed Original file line number Diff line number Diff line change
1
+ /home/christian/.cache/bazel/_bazel_christian/104d3f45ba5206b8827c9e2fc4354936/execroot/com_google_javascript_jscomp/bazel-out/k8-fastbuild/bin
Original file line number Diff line number Diff line change
1
+ /home/christian/.cache/bazel/_bazel_christian/104d3f45ba5206b8827c9e2fc4354936/execroot/com_google_javascript_jscomp
Original file line number Diff line number Diff line change
1
+ /home/christian/.cache/bazel/_bazel_christian/104d3f45ba5206b8827c9e2fc4354936/execroot/com_google_javascript_jscomp/bazel-out
Original file line number Diff line number Diff line change
1
+ /home/christian/.cache/bazel/_bazel_christian/104d3f45ba5206b8827c9e2fc4354936/execroot/com_google_javascript_jscomp/bazel-out/k8-fastbuild/testlogs
Original file line number Diff line number Diff line change 23
23
import com .google .javascript .jscomp .parsing .parser .util .SourcePosition ;
24
24
import com .google .javascript .jscomp .parsing .parser .util .SourceRange ;
25
25
import java .util .ArrayList ;
26
+ import java .lang .Character ;
26
27
import javax .annotation .Nullable ;
27
28
28
29
/**
@@ -901,11 +902,24 @@ private static boolean isIdentifierStart(char ch) {
901
902
| (ch >= 0x03B1 & ch <= 0x03C9 ); // Greek lowercase letters
902
903
}
903
904
904
- /**
905
- Implement ECMAScript grammar for isIdentifierPart.
906
- */
905
+ // Check if char is Unicode Category "Combining spacing mark (Mc)"
906
+ // This list is not exhaustive!
907
+ @ SuppressWarnings ( "ShortCircuitBoolean" ) // Intentional to minimize branches in this code
907
908
private static boolean isCombiningMark (char ch ) {
908
- return Character .getType (ch ) == Character .NON_SPACING_MARK ;
909
+ return (
910
+ // 0300-036F
911
+ (0x0300 <= ch & ch <= 0x036F ) |
912
+ // 1AB0–1AFF
913
+ (0x1AB0 <= ch & ch <= 0x1AFF ) |
914
+ // 1DC0–1DFF
915
+ (0x1DC0 <= ch & ch <= 0x1DFF ) |
916
+ // 20D0–20FF
917
+ (0x20D0 <= ch & ch <= 0x20FF ) |
918
+ // FE20–FE2F
919
+ (0xFE20 <= ch & ch <= 0xFE2F )
920
+ );
921
+ // TODO (ctjl): Implement in a more reliable and future-proofed way, i.e.:
922
+ // return Character.getType(ch) == Character.NON_SPACING_MARK;
909
923
}
910
924
911
925
// TODO (ctjl): Implement
Original file line number Diff line number Diff line change
1
+ var bar = {
2
+ İ : "foo"
3
+ } ;
You can’t perform that action at this time.
0 commit comments