File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -35,13 +35,15 @@ export class CFGBuilder {
3535 const bodyNode = functionNode . childForFieldName ( "body" ) ;
3636 if ( bodyNode ) {
3737 const blockHandler = new BlockHandler ( ) ;
38- const { entry } = blockHandler . update (
38+ const { entry, exit } = blockHandler . update (
3939 this . processStatements ( bodyNode . namedChildren ) ,
4040 ) ;
4141
4242 const startNode = this . addNode ( "START" , "START" ) ;
43+ const endNode = this . addNode ( "RETURN" , "implicit return" ) ;
4344 // `entry` will be non-null for any valid code
4445 if ( entry ) this . addEdge ( startNode , entry ) ;
46+ if ( exit ) this . addEdge ( exit , endNode )
4547 this . entry = startNode ;
4648 }
4749 return { graph : this . graph , entry : this . entry } ;
Original file line number Diff line number Diff line change @@ -163,5 +163,15 @@ def try_finally():
163163 if x :
164164 return
165165 pass
166+ finally :
167+ pass
168+
169+ # exits: 5,
170+ # render: true
171+ def try_finally ():
172+ try :
173+ with x :
174+ return
175+ pass
166176 finally :
167177 pass
You can’t perform that action at this time.
0 commit comments