Skip to content

Commit ae0624e

Browse files
committed
internal: Fix comment for astDtorListUnscope()
(cherry picked from commit 68025ea)
1 parent b0caf4d commit ae0624e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/compiler/ast-misc.bas

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1135,10 +1135,14 @@ function astDtorListScopeEnd( ) as integer
11351135
end with
11361136
end function
11371137

1138+
'' Remove cookie markers from the dtor list entries for the given scope,
1139+
'' indicating that they should be destroyed by the next toplevel
1140+
'' astDtorListFlush(0).
1141+
'' This is useful if an expression was at first parsed with a dtor list scope,
1142+
'' but then it turns out that that's not needed, and can be undone using this
1143+
'' function.
11381144
sub astDtorListUnscope( byval cookie as integer )
11391145
dim as AST_DTORLIST_ITEM ptr i = any
1140-
1141-
'' call the dtors in the reverse order
11421146
i = listGetTail( @ast.dtorlist )
11431147
while( i )
11441148
if( i->cookie = cookie ) then

0 commit comments

Comments
 (0)