prog8/codeCore/src/prog8/code/core/IErrorReporter.kt
2022-03-10 23:46:43 +01:00

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.")
}
}