void pruneOrphanedNames ( ) { nextSymbol : for ( Symbol s : getAllSymbols ( ) ) { if ( s . isProperty ( ) ) { continue ; } String currentName = s . getName ( ) ; int dot = - 1 ; while ( - 1 != ( dot = currentName . lastIndexOf ( ' ' ) ) ) { currentName = currentName . substring ( 0 , dot ) ; Symbol owner = s . scope . getQualifiedSlot ( currentName ) ; if ( owner != null && getType ( owner ) != null && ( getType ( owner ) . isNominalConstructor ( ) || getType ( owner ) . isFunctionPrototypeType ( ) || getType ( owner ) . isEnumType ( ) ) ) { removeSymbol ( s ) ; continue nextSymbol ; } } } }
Removes symbols where the namespace they re on has been removed .