nl_tokens: Finds the first node that embraces the position so that one may accurately aggregate locals from the closest containing scope .
pl_tokens: function getScopeNode ( initialToken , <mask> , sourceFile ) { var scope = initialToken ; while ( scope && ! ts . positionBelongsToNode ( scope , position , sourceFile ) ) { scope = scope . parent ; } return scope ; }