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
}
@@ -977,30 +979,29 @@ object Scanners {
977
979
}
978
980
case _ =>
979
981
deffetchOther() =
980
-
if(ch =='\u21D2') {
982
+
if ch =='\u21D2'then
981
983
nextChar(); token =ARROW
982
984
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))
983
-
}
984
-
elseif (ch =='\u2190') {
985
+
elseif ch =='\u2190'then
985
986
nextChar(); token =LARROW
986
987
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
-
}
988
-
elseif (Character.isUnicodeIdentifierStart(ch)) {
988
+
elseif isUnicodeIdentifierStart(ch) then
989
989
putChar(ch)
990
990
nextChar()
991
991
getIdentRest()
992
-
}
993
-
elseif(isSpecial(ch)) {
992
+
if ch =='"'&& token ==IDENTIFIERthen token =INTERPOLATIONID
993
+
elseif isSpecial(ch)then
994
994
putChar(ch)
995
995
nextChar()
996
996
getOperatorRest()
997
-
}
998
997
elseif isSupplementary(ch, isUnicodeIdentifierStart) then
999
998
getIdentRest()
1000
-
else {
999
+
if ch =='"'&& token ==IDENTIFIERthen token =INTERPOLATIONID
1000
+
elseif isSupplementary(ch, isSpecial) then
1001
+
getOperatorRest()
1002
+
else
1001
1003
error(em"illegal character '${toUnicode(ch)}'")
1002
1004
nextChar()
1003
-
}
1004
1005
fetchOther()
1005
1006
}
1006
1007
}
@@ -1115,7 +1116,7 @@ object Scanners {
1115
1116
else error(em"unclosed quoted identifier")
1116
1117
}
1117
1118
1118
-
privatedefgetIdentRest():Unit= (ch: @switch) match {
1119
+
@tailrec privatedefgetIdentRest():Unit= (ch: @switch) match {
1119
1120
case'A'|'B'|'C'|'D'|'E'|
1120
1121
'F'|'G'|'H'|'I'|'J'|
1121
1122
'K'|'L'|'M'|'N'|'O'|
@@ -1150,7 +1151,7 @@ object Scanners {
1150
1151
finishNamed()
1151
1152
}
1152
1153
1153
-
privatedefgetOperatorRest():Unit= (ch: @switch) match {
1154
+
@tailrec privatedefgetOperatorRest():Unit= (ch: @switch) match {
0 commit comments