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