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