Skip to content
Snippets Groups Projects
Commit 490aa263 authored by Etienne Kneuss's avatar Etienne Kneuss
Browse files

Inform the reporter of the compilation progress

parent 12154513
No related branches found
No related tags found
No related merge requests found
......@@ -43,6 +43,8 @@ abstract class Reporter(settings: Settings) {
throw LeonFatalError(None)
}
def onCompilerProgress(current: Int, total: Int) = {}
final def info(pos: Position, msg: Any): Unit = emit(account(Message(INFO, pos, msg)))
final def warning(pos: Position, msg: Any): Unit = emit(account(Message(WARNING, pos, msg)))
final def error(pos: Position, msg: Any): Unit = emit(account(Message(ERROR, pos, msg)))
......
......@@ -30,4 +30,10 @@ class ScalaCompiler(settings : NSCSettings, ctx: LeonContext) extends Global(set
)
phs foreach { phasesSet += _._1 }
}
class Run extends super.Run {
override def progress(current: Int, total: Int) {
ctx.reporter.onCompilerProgress(current, total)
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment