(this: Parser)
| 1051 | } |
| 1052 | |
| 1053 | parseCatchClauseParam(this: Parser) { |
| 1054 | const param = this.parseBindingAtom(); |
| 1055 | |
| 1056 | this.scope.enter( |
| 1057 | this.options.annexB && param.type === "Identifier" |
| 1058 | ? ScopeFlag.SIMPLE_CATCH |
| 1059 | : ScopeFlag.OTHER, |
| 1060 | ); |
| 1061 | this.checkLVal( |
| 1062 | param, |
| 1063 | { type: "CatchClause" }, |
| 1064 | BindingFlag.TYPE_CATCH_PARAM, |
| 1065 | ); |
| 1066 | |
| 1067 | // checkLVal ensures that VoidPattern can not be used as a catch clause parameter. |
| 1068 | return param as Exclude< |
| 1069 | ReturnType<typeof this.parseBindingAtom>, |
| 1070 | N.VoidPattern |
| 1071 | >; |
| 1072 | } |
| 1073 | |
| 1074 | parseTryStatement( |
| 1075 | this: Parser, |
nothing calls this directly
no test coverage detected