@@ -221,12 +221,12 @@ module Trees {
221
221
final override predicate succEntry ( Ast n , Completion c ) { n = this and completionIsSimple ( c ) }
222
222
}
223
223
224
- class NamedBlockTree extends StandardPostOrderTree instanceof NamedBlock {
224
+ class NamedBlockTree extends StandardPreOrderTree instanceof NamedBlock {
225
225
// TODO: Handle trap
226
- override AstNode getChildNode ( int i ) { result = super .getStatement ( i ) }
226
+ override AstNode getChildNode ( int i ) { result = super .getStmt ( i ) }
227
227
}
228
228
229
- class AssignStmtTree extends StandardPostOrderTree instanceof AssignStmt {
229
+ class AssignStmtTree extends StandardPreOrderTree instanceof AssignStmt {
230
230
override AstNode getChildNode ( int i ) {
231
231
i = 0 and result = super .getLeftHandSide ( )
232
232
or
@@ -348,6 +348,11 @@ module Trees {
348
348
last ( this .getBody ( ) , pred , c ) and
349
349
completionIsNormal ( c ) and
350
350
first ( super .getIterator ( ) , succ )
351
+ or
352
+ // Iterator -> condition
353
+ last ( super .getIterator ( ) , pred , c ) and
354
+ completionIsNormal ( c ) and
355
+ first ( super .getCondition ( ) , succ )
351
356
}
352
357
}
353
358
@@ -381,7 +386,7 @@ module Trees {
381
386
completionIsSimple ( c )
382
387
or
383
388
// Variable declaration to body
384
- last ( super .getVarAccess ( ) , succ , c ) and
389
+ last ( super .getVarAccess ( ) , pred , c ) and
385
390
completionIsNormal ( c ) and
386
391
first ( this .getBody ( ) , succ )
387
392
or
0 commit comments