This commit is contained in:
Alwinfy 2022-11-16 13:39:24 -05:00
parent f76d71bfe0
commit cec40696d1
No known key found for this signature in database
GPG key ID: 2CCB99445F0C949E
2 changed files with 11 additions and 1 deletions

View file

@ -18,6 +18,15 @@ object OpEval : Action {
ctx: CastingContext
): OperationResult {
val datum = stack.removeLast()
return exec(continuation, datum, stack, ravenmind, ctx)
}
fun exec(
continuation: SpellContinuation,
datum: Iota,
stack: MutableList<Iota>,
ravenmind: Iota?,
ctx: CastingContext
): OperationResult {
val instrs = evaluatable(datum, 0)
instrs.ifRight {

View file

@ -17,7 +17,8 @@ object OpEvalBreakable : Action {
ravenmind: Iota?,
ctx: CastingContext
): OperationResult {
val datum = stack.removeLast()
stack.add(ContinuationIota(continuation))
return OpEval.operate(continuation, stack, ravenmind, ctx)
return OpEval.exec(continuation, datum, stack, ravenmind, ctx)
}
}