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
786
-
putChar(high)
787
-
putChar(low)
788
-
res =true
785
+
if isValidCodePoint(codepoint) then
786
+
if test(codepoint) then
787
+
putChar(high)
788
+
putChar(low)
789
+
nextChar()
790
+
nextChar()
791
+
res =true
789
792
else
790
793
error(em"illegal character '${toUnicode(high)}${toUnicode(low)}'")
791
794
elseif!strict then
792
795
putChar(high)
796
+
nextChar()
793
797
res =true
794
798
else
795
799
error(em"illegal character '${toUnicode(high)}' missing low surrogate")
@@ -889,7 +893,6 @@ object Scanners {
889
893
if (ch =='\"') {
890
894
if (lookaheadChar() =='\"') {
891
895
nextRawChar()
892
-
//offset += 3 // first part is positioned at the quote
893
896
nextRawChar()
894
897
stringPart(multiLine =true)
895
898
}
@@ -900,7 +903,6 @@ object Scanners {
900
903
}
901
904
}
902
905
else {
903
-
//offset += 1 // first part is positioned at the quote
904
906
stringPart(multiLine =false)
905
907
}
906
908
}
@@ -985,10 +987,11 @@ object Scanners {
985
987
nextChar(); token =LARROW
986
988
report.deprecationWarning(em"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))
987
989
}
988
-
elseif (Character.isUnicodeIdentifierStart(ch)) {
990
+
elseif (isUnicodeIdentifierStart(ch)) {
989
991
putChar(ch)
990
992
nextChar()
991
993
getIdentRest()
994
+
if (ch =='"'&& token ==IDENTIFIER) token =INTERPOLATIONID
992
995
}
993
996
elseif (isSpecial(ch)) {
994
997
putChar(ch)
@@ -997,6 +1000,9 @@ object Scanners {
997
1000
}
998
1001
elseif isSupplementary(ch, isUnicodeIdentifierStart) then
999
1002
getIdentRest()
1003
+
if (ch =='"'&& token ==IDENTIFIER) token =INTERPOLATIONID
1004
+
elseif isSupplementary(ch, isSpecial) then
1005
+
getOperatorRest()
1000
1006
else {
1001
1007
error(em"illegal character '${toUnicode(ch)}'")
1002
1008
nextChar()
@@ -1115,7 +1121,7 @@ object Scanners {
1115
1121
else error(em"unclosed quoted identifier")
1116
1122
}
1117
1123
1118
-
privatedefgetIdentRest():Unit= (ch: @switch) match {
1124
+
@tailrec privatedefgetIdentRest():Unit= (ch: @switch) match {
1119
1125
case'A'|'B'|'C'|'D'|'E'|
1120
1126
'F'|'G'|'H'|'I'|'J'|
1121
1127
'K'|'L'|'M'|'N'|'O'|
@@ -1150,7 +1156,7 @@ object Scanners {
1150
1156
finishNamed()
1151
1157
}
1152
1158
1153
-
privatedefgetOperatorRest():Unit= (ch: @switch) match {
1159
+
@tailrec privatedefgetOperatorRest():Unit= (ch: @switch) match {
0 commit comments