mirror of
https://github.com/irmen/prog8.git
synced 2024-06-14 15:29:49 +00:00
13 lines
382 B
Kotlin
13 lines
382 B
Kotlin
package prog8.code.core
|
|
|
|
interface IErrorReporter {
|
|
fun err(msg: String, position: Position)
|
|
fun warn(msg: String, position: Position)
|
|
fun noErrors(): Boolean
|
|
fun report()
|
|
fun finalizeNumErrors(numErrors: Int, numWarnings: Int) {
|
|
if(numErrors>0)
|
|
throw ErrorsReportedException("There are $numErrors errors and $numWarnings warnings.")
|
|
}
|
|
}
|