Compare commits
1 Commits
9bc514a782
...
a6261fce7f
| Author | SHA1 | Date | |
|---|---|---|---|
| a6261fce7f |
|
|
@ -278,12 +278,13 @@ export class Compiler {
|
||||||
return bodyInstructions
|
return bodyInstructions
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If function has catch or finally, wrap body in try/catch/finally
|
||||||
if (catchVariable || finallyBody) {
|
if (catchVariable || finallyBody) {
|
||||||
// If function has catch or finally, wrap body in try/catch/finally
|
|
||||||
instructions.push(
|
instructions.push(
|
||||||
...this.#compileTryCatchFinally(compileFunctionBody, catchVariable, catchBody, finallyBody, input)
|
...this.#compileTryCatchFinally(compileFunctionBody, catchVariable, catchBody, finallyBody, input)
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
|
// Normal function without catch/finally
|
||||||
instructions.push(...compileFunctionBody())
|
instructions.push(...compileFunctionBody())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user