Prepare scripting infrastructure for REPL:
- refactor script compiler to simplify extending it for repl - add repl snippet compilation functions to the new scripting compiler - extract util functions into appropriate files - extract repl part into separate class - extract bridge definition and related definitions into separate file
This commit is contained in:
@@ -61,6 +61,10 @@ interface IReplStageState<T> {
|
||||
fun <StateT : IReplStageState<*>> asState(target: Class<out StateT>): StateT =
|
||||
if (target.isAssignableFrom(this::class.java)) this as StateT
|
||||
else throw IllegalArgumentException("$this is not an expected instance of IReplStageState")
|
||||
|
||||
fun dispose() {
|
||||
history.reset()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user