Skip to content

Commit 5422ba6

Browse files
Implement API for errors
1 parent 04a68b8 commit 5422ba6

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

library/src/scala/compiletime/testing/package.scala

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@ import scala.quoted._
44

55
package object testing {
66

7+
case class Error(message: String, lineContent: String, column: Int, kind: ErrorKind)
8+
9+
/** An error can be either a parse-time or a typecheck-time */
10+
sealed trait ErrorKind // TODO make this enum, so far not doable because ScalaJS compilation fails on it
11+
12+
object ErrorKind
13+
case object Parser extends ErrorKind
14+
case object Typer extends ErrorKind
15+
716
/** Whether the code type checks in the current context?
817
*
918
* @param code The code to be type checked

0 commit comments

Comments
 (0)