package org.shedlang.compiler.shid.instructions; import org.shedlang.compiler.sources.Source; import org.shedlang.compiler.types.SimpleStructType; import java.util.List; /** * Pop a value from the temporary value stack, find the case corresponding to * that value's type, and execute the case's body. If there is no such case, the * behaviour of this instruction is not defined. *

* Each case body should push exactly one value onto the temporary value stack. */ public record ShidSwitch( List cases, Source source ) implements ShidInstruction { public record Case(SimpleStructType caseType, ShidBlock body, Source source) { } @Override public boolean isBlockTerminator() { return false; } }