Implement defer

Closes #8086
Closes #12589
This commit is contained in:
Bjørn Erik Pedersen
2024-06-08 11:52:22 +02:00
parent 8731d88222
commit 6cd0784e44
33 changed files with 1033 additions and 148 deletions

View File

@@ -39,6 +39,16 @@ func init() {
},
)
ns.AddMethodMapping(ctx.Defer,
nil, // No aliases to keep the AST parsing simple.
[][2]string{},
)
ns.AddMethodMapping(ctx.DoDefer,
[]string{"doDefer"},
[][2]string{},
)
return ns
}