package org.shedlang.compiler.shid.instructions; import org.shedlang.compiler.sources.Source; import org.shedlang.compiler.types.UserDefinedEffect; import java.util.List; /** * For each handler method name, pop a value off the temporary value stack. The * first value (that is, the first pushed / last popped) corresponds to the * first handler method name, and so on. Push an effect handler for the given * effect with the popped handler methods onto the effect handler stack, and * execute the body. Once the body has exited, pop the effect handler from the * effect handler stack. *

* If the body runs to completion, it should leave a single value on the * temporary value stack. */ public record ShidTry( UserDefinedEffect handledEffect, List handlerMethodNames, ShidBlock body, Source source ) implements ShidInstruction { @Override public boolean isBlockTerminator() { return false; } }