File tree 3 files changed +10
-3
lines changed
3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ import dotty.tools.dotc.core.Flags
7
7
import dotty .tools .dotc .core .Flags .FlagSet
8
8
9
9
import scala .language .implicitConversions
10
-
11
10
import JavaTokens ._
12
11
import JavaScanners ._
13
12
import Scanners .Offset
@@ -21,8 +20,10 @@ import Symbols._
21
20
import ast .Trees ._
22
21
import Decorators ._
23
22
import StdNames ._
23
+ import dotty .tools .dotc .reporting .diagnostic .messages .IdentifierExpected
24
24
import dotty .tools .dotc .util .SourceFile
25
25
import util .Positions ._
26
+
26
27
import annotation .switch
27
28
import scala .collection .mutable .ListBuffer
28
29
import scala .reflect .internal .util .Collections ._
@@ -230,7 +231,7 @@ object JavaParsers {
230
231
case AppliedTypeTree (_, _) | Select (_, _) =>
231
232
tree
232
233
case _ =>
233
- syntaxError(" identifier expected " , tree.pos)
234
+ syntaxError(IdentifierExpected () , tree.pos)
234
235
errorTypeTree
235
236
}
236
237
}
Original file line number Diff line number Diff line change @@ -316,7 +316,7 @@ object Parsers {
316
316
case id @ Select (qual, name) =>
317
317
cpy.Select (id)(qual, name.toTypeName)
318
318
case _ =>
319
- syntaxError(" identifier expected " , tree.pos)
319
+ syntaxError(IdentifierExpected () , tree.pos)
320
320
tree
321
321
}
322
322
Original file line number Diff line number Diff line change @@ -512,4 +512,10 @@ object messages {
512
512
|} """ .stripMargin
513
513
}
514
514
515
+ case class IdentifierExpected ()(implicit ctx : Context ) extends Message (19 ) {
516
+ val kind = " Syntax"
517
+ val msg = " identifier expected"
518
+ val explanation = " "
519
+ }
520
+
515
521
}
You can’t perform that action at this time.
0 commit comments