* A free identifier is an identifier that can be accessed through name lookup as a local variable. * In the expression `x.y`, `x` is a free identifier, but `y` is not.
(node, cb)
| 152515 | * In the expression `x.y`, `x` is a free identifier, but `y` is not. |
| 152516 | */ |
| 152517 | function forEachFreeIdentifier(node, cb) { |
| 152518 | if (ts.isIdentifier(node) && isFreeIdentifier(node)) |
| 152519 | cb(node); |
| 152520 | node.forEachChild(function (child) { return forEachFreeIdentifier(child, cb); }); |
| 152521 | } |
| 152522 | function isFreeIdentifier(node) { |
| 152523 | var parent = node.parent; |
| 152524 | switch (parent.kind) { |
no test coverage detected