()
| 2858 | |
| 2859 | // https://tc39.es/ecma262/#prod-ModuleExportName |
| 2860 | parseModuleExportName(): N.StringLiteral | N.Identifier { |
| 2861 | if (this.match(tt.string)) { |
| 2862 | const result = this.parseStringLiteral(this.state.value); |
| 2863 | const surrogate = loneSurrogate.exec(result.value); |
| 2864 | if (surrogate) { |
| 2865 | this.raise(Errors.ModuleExportNameHasLoneSurrogate, result, { |
| 2866 | surrogateCharCode: surrogate[0].charCodeAt(0), |
| 2867 | }); |
| 2868 | } |
| 2869 | return result; |
| 2870 | } |
| 2871 | return this.parseIdentifier(true); |
| 2872 | } |
| 2873 | |
| 2874 | // Converts the specifiers parsed in `{ ... }` to the list of names of a |
| 2875 | // filtered namespace (`{ ... } as ns`). |
nothing calls this directly
no test coverage detected