@ Nullable private ScopeBlock findScopeBlock ( ScopeBlock sb , int pc ) { if ( ( pc <= sb . getStart ( ) ) || ( pc >= sb . getFinish ( ) ) ) { return null ; } List < ScopeBlock > children = sb . getChildren ( ) ; if ( children != null ) { for ( ScopeBlock child : children ) { ScopeBlock foundSb = findScopeBlock ( child , pc ) ; if ( foundSb != null ) { return foundSb ; } } } return sb ; }
returns the scope block in which this register was assigned by traversing the scope block tree