You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if isValidCodePoint(codepoint) && test(codepoint) then
801
-
putChar(high)
802
-
putChar(low)
803
-
res =true
800
+
if isValidCodePoint(codepoint) then
801
+
if test(codepoint) then
802
+
putChar(high)
803
+
putChar(low)
804
+
nextChar()
805
+
nextChar()
806
+
res =true
804
807
else
805
808
error(s"illegal character '${toUnicode(high)}${toUnicode(low)}'")
806
809
elseif!strict then
807
810
putChar(high)
811
+
nextChar()
808
812
res =true
809
813
else
810
814
error(s"illegal character '${toUnicode(high)}' missing low surrogate")
@@ -904,7 +908,6 @@ object Scanners {
904
908
if (ch =='\"') {
905
909
if (lookaheadChar() =='\"') {
906
910
nextRawChar()
907
-
//offset += 3 // first part is positioned at the quote
908
911
nextRawChar()
909
912
stringPart(multiLine =true)
910
913
}
@@ -915,7 +918,6 @@ object Scanners {
915
918
}
916
919
}
917
920
else {
918
-
//offset += 1 // first part is positioned at the quote
919
921
stringPart(multiLine =false)
920
922
}
921
923
}
@@ -1000,10 +1002,11 @@ object Scanners {
1000
1002
nextChar(); token =LARROW
1001
1003
report.deprecationWarning("The unicode arrow `β` is deprecated, use `<-` instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.", sourcePos(offset))
1002
1004
}
1003
-
elseif (Character.isUnicodeIdentifierStart(ch)) {
1005
+
elseif (isUnicodeIdentifierStart(ch)) {
1004
1006
putChar(ch)
1005
1007
nextChar()
1006
1008
getIdentRest()
1009
+
if (ch =='"'&& token ==IDENTIFIER) token =INTERPOLATIONID
1007
1010
}
1008
1011
elseif (isSpecial(ch)) {
1009
1012
putChar(ch)
@@ -1012,6 +1015,9 @@ object Scanners {
1012
1015
}
1013
1016
elseif isSupplementary(ch, isUnicodeIdentifierStart) then
1014
1017
getIdentRest()
1018
+
if (ch =='"'&& token ==IDENTIFIER) token =INTERPOLATIONID
1019
+
elseif isSupplementary(ch, isSpecial) then
1020
+
getOperatorRest()
1015
1021
else {
1016
1022
error(s"illegal character '${toUnicode(ch)}'")
1017
1023
nextChar()
@@ -1130,7 +1136,7 @@ object Scanners {
1130
1136
else error("unclosed quoted identifier")
1131
1137
}
1132
1138
1133
-
privatedefgetIdentRest():Unit= (ch: @switch) match {
1139
+
@tailrec privatedefgetIdentRest():Unit= (ch: @switch) match {
1134
1140
case'A'|'B'|'C'|'D'|'E'|
1135
1141
'F'|'G'|'H'|'I'|'J'|
1136
1142
'K'|'L'|'M'|'N'|'O'|
@@ -1165,7 +1171,7 @@ object Scanners {
1165
1171
finishNamed()
1166
1172
}
1167
1173
1168
-
privatedefgetOperatorRest():Unit= (ch: @switch) match {
1174
+
@tailrec privatedefgetOperatorRest():Unit= (ch: @switch) match {
0 commit comments