Unwrap program

This commit is contained in:
Jordan Eldredge 2019-07-23 20:23:46 -07:00
parent d30e0a6f5f
commit 7b3026e5fb
2 changed files with 4 additions and 3 deletions

View file

@ -134,8 +134,7 @@ function Debugger({ maki }) {
const nextValue = React.useCallback(
value => {
const { i, stack, program } = value;
const { variables, commands } = program;
const { i, stack, variables, commands } = value;
dispatch({
type: "STEPPED",
variables,

View file

@ -35,7 +35,9 @@ function* interpret(start, program, stack = []) {
let i = start;
while (i < commands.length) {
const command = commands[i];
yield { i, command, stack, variables, program };
{
yield { i, command, stack, variables, commands };
}
switch (command.opcode) {
// push