A node is an assignment target if it is on the left hand side of an '=' token, if it is parented by a property assignment in an object literal that is an assignment target, or if it is parented by an array literal that is an assignment target. Examples include 'a = xxx', '{ p: a } = xxx', '[{ a }] =
(node *Node)
| 176 | // an assignment target. Examples include 'a = xxx', '{ p: a } = xxx', '[{ a }] = xxx'. |
| 177 | // (Note that `p` is not a target in the above examples, only `a`.) |
| 178 | func IsAssignmentTarget(node *Node) bool { |
| 179 | return GetAssignmentTarget(node) != nil |
| 180 | } |
| 181 | |
| 182 | // Returns the BinaryExpression, PrefixUnaryExpression, PostfixUnaryExpression, or ForInOrOfStatement that references |
| 183 | // the given node as an assignment target |
no test coverage detected