Skip to content

Commit cc54ef1

Browse files
committed
Cleaned up commit.
1 parent 293a946 commit cc54ef1

File tree

1 file changed

+1
-40
lines changed

1 file changed

+1
-40
lines changed

src/com/google/javascript/jscomp/parsing/parser/Scanner.java

Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -917,49 +917,10 @@ private static boolean isCombiningMark(char ch) {
917917
// FE20–FE2F
918918
(0xFE20 <= ch & ch <= 0xFE2F)
919919
);
920-
// TODO (ctjl): Implement in a more reliable and future-proofed way, i.e.:
921-
// return Character.getType(ch) == Character.NON_SPACING_MARK;
922-
}
923-
924-
// TODO (ctjl): Implement
925-
private static boolean isConnectorPunctuation() {
926-
return true;
927-
}
928-
929-
// TODO (ctjl): Implement
930-
private static boolean isZeroWidthJoiner() {
931-
return true;
932-
}
933-
934-
// TODO (ctjl): Implement
935-
private static boolean isZeroWidthNonJoiner() {
936-
return true;
937920
}
938921

939922
@SuppressWarnings("ShortCircuitBoolean") // Intentional to minimize branches in this code
940923
private static boolean isIdentifierPart(char ch) {
941-
/**
942-
https://www.ecma-international.org/ecma-262/5.1/#sec-7.6
943-
IdentifierPart ::
944-
IdentifierStart
945-
✓ isIdentifierPart()
946-
947-
UnicodeCombiningMark
948-
✓ isCombiningMark()
949-
950-
UnicodeDigit
951-
✓ Character.isDigit()
952-
953-
UnicodeConnectorPunctuation
954-
✓ isConnectorPunctuation()
955-
956-
<ZWNJ>
957-
✓ isZeroWidthNonJoiner()
958-
959-
<ZWJ>
960-
✓ isZeroWidthJoiner()
961-
*/
962-
963924
// Most code is written in pure ASCII, so create a fast path here.
964925
if (ch <= 127) {
965926
return ((ch >= 'A' & ch <= 'Z')
@@ -970,7 +931,7 @@ private static boolean isIdentifierPart(char ch) {
970931

971932
// Handle non-ASCII characters.
972933
// TODO(tjgq): This should include all characters with the ID_Continue property, plus
973-
// TODO(ctjl): Implement remaining grammar (zero-width joiners, etc.)
934+
// Zero Width Non-Joiner and Zero Width Joiner.
974935
return isIdentifierStart(ch)
975936
|| isCombiningMark(ch)
976937
|| Character.isDigit(ch);

0 commit comments

Comments
 (0)