diff --git a/src/cpu.ts b/src/cpu.ts index 22246ac..293b07e 100644 --- a/src/cpu.ts +++ b/src/cpu.ts @@ -40,8 +40,7 @@ export function parse(code: string): Instruction[] { throw new Error('Invalid instruction!'); } - // eslint-disable-next-line @typescript-eslint/no-unused-vars - const [_fullMatch, cond, operator, raw_operands = ''] = matches; + const [, cond, operator, raw_operands = ''] = matches; const operands = raw_operands.split(/\s/).map(Number); switch (operator) { diff --git a/src/reducer.ts b/src/reducer.ts index ee31158..03fc829 100644 --- a/src/reducer.ts +++ b/src/reducer.ts @@ -35,7 +35,7 @@ export function reducer(state: State, action: Action) { return { ...state, index: state.index + 1, - onLine: state.instructions[state.index + 1]?.line ?? state.onLine, + onLine: state.instructions[state.index + 1]?.line ?? state.onLine + 1, stack: nextStack, }; }