Skip to content

Commit f7634fb

Browse files
committed
refactor(core/assembler): rename function and param
1 parent abee505 commit f7634fb

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/core/assembler/assembler.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
type AssemblyNode,
1010
type AssemblyUnit,
1111
type CodeChunk,
12-
finish,
12+
finalize,
1313
initUnit,
1414
} from './assemblyunit'
1515
import * as AST from './ast'
@@ -64,8 +64,8 @@ class AssemblerImpl implements Assembler {
6464
const unit = this.setup()
6565
const ast = this.parse()
6666
return this.hasError()
67-
? finish(unit, { chunks: [] })
68-
: finish(unit, { ast, labels: context.labels })
67+
? finalize(unit, { chunks: [] })
68+
: finalize(unit, { ast, labels: context.labels })
6969
},
7070
})
7171
}

src/core/assembler/assemblyunit.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ export function initUnit(): AssemblyUnit {
4040
}
4141
}
4242

43-
export function finish(unit: AssemblyUnit, partial: Partial<AssemblyUnit>): AssemblyUnit {
43+
export function finalize(unit: AssemblyUnit, updates: Partial<AssemblyUnit>): AssemblyUnit {
4444
const updated: AssemblyUnit = {
4545
...unit,
46-
...partial,
46+
...updates,
4747
}
4848
mergeErrors(updated.warnings)
4949
mergeErrors(updated.errors)

0 commit comments

Comments
 (0)