REPL, minor: Ignore empty lines (#KT-21611)
This commit is contained in:
committed by
Yan Zhulanow
parent
edcf0aef53
commit
310ee67c35
+4
@@ -31,6 +31,10 @@ class GenericReplCompilingEvaluator(val compiler: ReplCompiler,
|
||||
override fun createState(lock: ReentrantReadWriteLock): IReplStageState<*> = AggregatedReplStageState(compiler.createState(lock), evaluator.createState(lock), lock)
|
||||
|
||||
override fun compileAndEval(state: IReplStageState<*>, codeLine: ReplCodeLine, scriptArgs: ScriptArgsWithTypes?, invokeWrapper: InvokeWrapper?): ReplEvalResult {
|
||||
if (codeLine.code.trim().isEmpty()) {
|
||||
return ReplEvalResult.UnitResult()
|
||||
}
|
||||
|
||||
return state.lock.write {
|
||||
val aggregatedState = state.asState(AggregatedReplStageState::class.java)
|
||||
val compiled = compiler.compile(state, codeLine)
|
||||
|
||||
Reference in New Issue
Block a user