We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 3939df8 + 57f2fe9 commit 47bfc1dCopy full SHA for 47bfc1d
compiler/src/dotty/tools/dotc/printing/SyntaxHighlighting.scala
@@ -44,7 +44,7 @@ object SyntaxHighlighting {
44
45
private val typeEnders =
46
'{' :: '}' :: ')' :: '(' :: '[' :: ']' :: '=' :: ' ' :: ',' :: '.' :: '|' ::
47
- '\n' :: Nil
+ :: '&' :: '\n' :: Nil
48
49
def apply(chars: Iterable[Char]): Iterable[Char] = {
50
var prev: Char = 0
@@ -55,7 +55,7 @@ object SyntaxHighlighting {
55
@inline def keywordStart =
56
prev == 0 || prev == ' ' || prev == '{' || prev == '(' ||
57
prev == '\n' || prev == '[' || prev == ',' || prev == ':' ||
58
- prev == '|'
+ prev == '|' || prev == '&'
59
60
@inline def numberStart(c: Char) =
61
c.isDigit && (!prev.isLetter || prev == '.' || prev == ' ' || prev == '(' || prev == '\u0000')
0 commit comments