(node *ast.Node)
| 2412 | } |
| 2413 | |
| 2414 | func (b *Binder) bindCallExpressionFlow(node *ast.Node) { |
| 2415 | call := node.AsCallExpression() |
| 2416 | if ast.IsOptionalChain(node) { |
| 2417 | b.bindOptionalChainFlow(node) |
| 2418 | } else { |
| 2419 | // If the target of the call expression is a function expression or arrow function we have |
| 2420 | // an immediately invoked function expression (IIFE). Initialize the flowNode property to |
| 2421 | // the current control flow (which includes evaluation of the IIFE arguments). |
| 2422 | expr := ast.SkipParentheses(call.Expression) |
| 2423 | if expr.Kind == ast.KindFunctionExpression || expr.Kind == ast.KindArrowFunction { |
| 2424 | b.bindNodeList(call.TypeArguments) |
| 2425 | b.bindEach(call.Arguments.Nodes) |
| 2426 | b.bind(call.Expression) |
| 2427 | } else { |
| 2428 | b.bindEachChild(node) |
| 2429 | if call.Expression.Kind == ast.KindSuperKeyword { |
| 2430 | b.currentFlow = b.createFlowCall(b.currentFlow, node) |
| 2431 | } |
| 2432 | } |
| 2433 | } |
| 2434 | if ast.IsPropertyAccessExpression(call.Expression) { |
| 2435 | access := call.Expression.AsPropertyAccessExpression() |
| 2436 | if ast.IsIdentifier(access.Name()) && isNarrowableOperand(access.Expression) && ast.IsPushOrUnshiftIdentifier(access.Name()) { |
| 2437 | b.currentFlow = b.createFlowMutation(ast.FlowFlagsArrayMutation, b.currentFlow, node) |
| 2438 | } |
| 2439 | } |
| 2440 | } |
| 2441 | |
| 2442 | func (b *Binder) bindNonNullExpressionFlow(node *ast.Node) { |
| 2443 | if ast.IsOptionalChain(node) { |
no test coverage detected