blob: 82f2e08301d6911ab199e579e450ed77c2550676 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
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.
* <p>
* If the body runs to completion, it should leave a single value on the
* temporary value stack.
*/
public record ShidTry(
UserDefinedEffect handledEffect,
List<String> handlerMethodNames,
ShidBlock body,
Source source
) implements ShidInstruction {
@Override
public boolean isBlockTerminator() {
return false;
}
}
|