File tree Expand file tree Collapse file tree 1 file changed +17
-6
lines changed
packages/babel-parser/src/parser Expand file tree Collapse file tree 1 file changed +17
-6
lines changed Original file line number Diff line number Diff line change @@ -2167,18 +2167,29 @@ export default class StatementParser extends ExpressionParser {
21672167 this . expect ( tt . comma ) ;
21682168 if ( this . eat ( tt . braceR ) ) break ;
21692169 }
2170- const node = this . parseExportSpecifier ( isInTypeExport ) ;
2170+ const isMaybeTypeOnly = this . isContextual ( tt . _type ) ;
2171+ const isString = this . match ( tt . string ) ;
2172+ const local = this . parseModuleExportName ( ) ;
2173+ const node = this . parseExportSpecifier (
2174+ local ,
2175+ isString ,
2176+ isInTypeExport ,
2177+ isMaybeTypeOnly ,
2178+ ) ;
21712179 nodes . push ( node ) ;
21722180 }
21732181
21742182 return nodes ;
21752183 }
21762184
2177- parseExportSpecifier ( isInTypeExport : boolean ) : N . ExportSpecifier {
2178- const node = this . startNode ( ) ;
2179- const isMaybeTypeOnly = this . isContextual ( tt . _type ) ;
2180- const isString = this . match ( tt . string ) ;
2181- node . local = this . parseModuleExportName ( ) ;
2185+ parseExportSpecifier (
2186+ local : N . StringLiteral | N . Identifier ,
2187+ isString : boolean ,
2188+ isInTypeExport : boolean ,
2189+ isMaybeTypeOnly : boolean ,
2190+ ) : N . ExportSpecifier {
2191+ const node = this . startNodeAtNode ( local ) ;
2192+ node . local = local ;
21822193 const canParseAsKeyword = this . parseTypeOnlyImportExportSpecifier (
21832194 node ,
21842195 /* isImport */ false ,
You can’t perform that action at this time.
0 commit comments