Skip to content

Commit

Permalink
refactor(core/assembler): process pending chunks inside try block
Browse files Browse the repository at this point in the history
  • Loading branch information
exuanbo committed Nov 27, 2024
1 parent fef49f9 commit 95bebcf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/assembler/assembler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export class Assembler {
while (true) {
const { done, value: node } = parser.next()
if (done) {
this.processPendingChunks()
return node
}
this.collectErrors(context)
Expand All @@ -84,7 +85,6 @@ export class Assembler {
finally {
context.checkLabels()
this.collectErrors(context)
this.processPendings()
}
return null
}
Expand Down Expand Up @@ -194,7 +194,7 @@ export class Assembler {
})
}

private processPendings(): void {
private processPendingChunks(): void {
this.pendings.forEach((chunk) => {
const state = createAssemblerState(chunk.offset)
AssemblerState.Provider({
Expand Down

0 comments on commit 95bebcf

Please sign in to comment.