(node: N.NormalFunction)
| 1585 | } |
| 1586 | |
| 1587 | registerFunctionStatementId(node: N.NormalFunction): void { |
| 1588 | if (!node.id) return; |
| 1589 | |
| 1590 | // If it is a regular function declaration in sloppy mode, then it is |
| 1591 | // subject to Annex B semantics (BindingFlag.TYPE_FUNCTION). Otherwise, the binding |
| 1592 | // mode depends on properties of the current scope (see |
| 1593 | // treatFunctionsAsVar). |
| 1594 | this.scope.declareName( |
| 1595 | node.id.name, |
| 1596 | !this.options.annexB || this.state.strict || node.generator || node.async |
| 1597 | ? this.scope.treatFunctionsAsVar |
| 1598 | ? BindingFlag.TYPE_VAR |
| 1599 | : BindingFlag.TYPE_LEXICAL |
| 1600 | : BindingFlag.TYPE_FUNCTION, |
| 1601 | node.id.start!, |
| 1602 | ); |
| 1603 | } |
| 1604 | |
| 1605 | // Parse a class declaration or literal (depending on the |
| 1606 | // `isStatement` parameter). |
nothing calls this directly
no test coverage detected