Skip to content

Commit 63bc505

Browse files
committed
Style tweaks and uncomment test source
1 parent f3afab4 commit 63bc505

File tree

2 files changed

+9
-16
lines changed

2 files changed

+9
-16
lines changed

compiler/src/dotty/tools/dotc/parsing/Scanners.scala

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -975,34 +975,29 @@ object Scanners {
975975
}
976976
case _ =>
977977
def fetchOther() =
978-
if (ch == '\u21D2') {
978+
if ch == '\u21D2' then
979979
nextChar(); token = ARROW
980980
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))
981-
}
982-
else if (ch == '\u2190') {
981+
else if ch == '\u2190' then
983982
nextChar(); token = LARROW
984983
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))
985-
}
986-
else if (isUnicodeIdentifierStart(ch)) {
984+
else if isUnicodeIdentifierStart(ch) then
987985
putChar(ch)
988986
nextChar()
989987
getIdentRest()
990-
if (ch == '"' && token == IDENTIFIER) token = INTERPOLATIONID
991-
}
992-
else if (isSpecial(ch)) {
988+
if ch == '"' && token == IDENTIFIER then token = INTERPOLATIONID
989+
else if isSpecial(ch) then
993990
putChar(ch)
994991
nextChar()
995992
getOperatorRest()
996-
}
997993
else if isSupplementary(ch, isUnicodeIdentifierStart) then
998994
getIdentRest()
999-
if (ch == '"' && token == IDENTIFIER) token = INTERPOLATIONID
995+
if ch == '"' && token == IDENTIFIER then token = INTERPOLATIONID
1000996
else if isSupplementary(ch, isSpecial) then
1001997
getOperatorRest()
1002-
else {
998+
else
1003999
error(s"illegal character '${toUnicode(ch)}'")
10041000
nextChar()
1005-
}
10061001
fetchOther()
10071002
}
10081003
}
@@ -1163,8 +1158,8 @@ object Scanners {
11631158
if nxch == '/' || nxch == '*' then finishNamed()
11641159
else { putChar(ch); nextChar(); getOperatorRest() }
11651160
case _ =>
1166-
if (isSpecial(ch)) { putChar(ch); nextChar(); getOperatorRest() }
1167-
else if (isSupplementary(ch, isSpecial)) getOperatorRest()
1161+
if isSpecial(ch) then { putChar(ch); nextChar(); getOperatorRest() }
1162+
else if isSupplementary(ch, isSpecial) then getOperatorRest()
11681163
else finishNamed()
11691164
}
11701165

tests/pos/t1406.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,8 @@ class Strings {
2525
implicit class Interps(sc: StringContext) {
2626
def 𝓅(parts: Any*) = "done"
2727
}
28-
/*
2928
def 𝓅 = 42
3029
def interpolated = s"$𝓅"
3130
def e = "a 𝓅 b"
32-
*/
3331
def f = 𝓅"one"
3432
}

0 commit comments

Comments
 (0)