Add unimplemented yield* instruction

This commit is contained in:
Andrew Morris
2023-06-01 09:05:55 +10:00
parent ea4571fe82
commit 76f78eb8ec
8 changed files with 25 additions and 3 deletions

View File

@@ -1225,7 +1225,10 @@ impl<'a> ExpressionCompiler<'a> {
}
};
let instr = Instruction::Yield(self.fnc.use_(arg_compiled), dst.clone());
let instr = match yield_expr.delegate {
false => Instruction::Yield(self.fnc.use_(arg_compiled), dst.clone()),
true => Instruction::YieldStar(self.fnc.use_(arg_compiled), dst.clone()),
};
self.fnc.push(instr);