Skip to content

Commit 816790e

Browse files
committed
fix(compile): remove unused variables
1 parent 915ef59 commit 816790e

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

src/compile.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ export function compile<TResult>(
315315
nextIndex++;
316316

317317
// 递归编译右操作数
318-
const rightIdx = compileAst(node.right);
318+
compileAst(node.right);
319319

320320
// 修复 br 的 offset:跳过右操作数的所有指令
321321
const skipCount = expressions.length - branchIdx - 1;
@@ -341,17 +341,14 @@ export function compile<TResult>(
341341
nextIndex++;
342342

343343
// 编译 else 分支(alternate)
344-
const elseStartIdx = expressions.length;
345344
compileAst(node.alternate);
346-
const elseEndIdx = expressions.length;
347345

348346
// 生成 jmp 跳过 then 分支
349347
const jmpIdx = expressions.length;
350348
expressions.push(["jmp", 0] as JumpNode); // 占位
351349
nextIndex++;
352350

353351
// 编译 then 分支(consequent)
354-
const thenStartIdx = expressions.length;
355352
compileAst(node.consequent);
356353
const thenEndIdx = expressions.length;
357354

0 commit comments

Comments
 (0)