Skip to content

Commit 18ef0fe

Browse files
committed
Style tweaks and uncomment test source
1 parent bde1057 commit 18ef0fe

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
@@ -994,34 +994,29 @@ object Scanners {
994994
}
995995
case _ =>
996996
def fetchOther() =
997-
if (ch == '\u21D2') {
997+
if ch == '\u21D2' then
998998
nextChar(); token = ARROW
999999
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))
1000-
}
1001-
else if (ch == '\u2190') {
1000+
else if ch == '\u2190' then
10021001
nextChar(); token = LARROW
10031002
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))
1004-
}
1005-
else if (isUnicodeIdentifierStart(ch)) {
1003+
else if isUnicodeIdentifierStart(ch) then
10061004
putChar(ch)
10071005
nextChar()
10081006
getIdentRest()
1009-
if (ch == '"' && token == IDENTIFIER) token = INTERPOLATIONID
1010-
}
1011-
else if (isSpecial(ch)) {
1007+
if ch == '"' && token == IDENTIFIER then token = INTERPOLATIONID
1008+
else if isSpecial(ch) then
10121009
putChar(ch)
10131010
nextChar()
10141011
getOperatorRest()
1015-
}
10161012
else if isSupplementary(ch, isUnicodeIdentifierStart) then
10171013
getIdentRest()
1018-
if (ch == '"' && token == IDENTIFIER) token = INTERPOLATIONID
1014+
if ch == '"' && token == IDENTIFIER then token = INTERPOLATIONID
10191015
else if isSupplementary(ch, isSpecial) then
10201016
getOperatorRest()
1021-
else {
1017+
else
10221018
error(s"illegal character '${toUnicode(ch)}'")
10231019
nextChar()
1024-
}
10251020
fetchOther()
10261021
}
10271022
}
@@ -1182,8 +1177,8 @@ object Scanners {
11821177
if nxch == '/' || nxch == '*' then finishNamed()
11831178
else { putChar(ch); nextChar(); getOperatorRest() }
11841179
case _ =>
1185-
if (isSpecial(ch)) { putChar(ch); nextChar(); getOperatorRest() }
1186-
else if (isSupplementary(ch, isSpecial)) getOperatorRest()
1180+
if isSpecial(ch) then { putChar(ch); nextChar(); getOperatorRest() }
1181+
else if isSupplementary(ch, isSpecial) then getOperatorRest()
11871182
else finishNamed()
11881183
}
11891184

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)