File tree 3 files changed +9
-1
lines changed
tests/fixtures/ecma-features/modules
3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -4716,6 +4716,7 @@ function parseExportDefaultDeclaration() {
4716
4716
var declaration = null ,
4717
4717
expression = null ,
4718
4718
possibleIdentifierToken ,
4719
+ allowClasses = extra . ecmaFeatures . classes ,
4719
4720
marker = markerCreate ( ) ;
4720
4721
4721
4722
// covers:
@@ -4738,7 +4739,7 @@ function parseExportDefaultDeclaration() {
4738
4739
if ( lookahead . value === "function" ) {
4739
4740
declaration = parseFunctionDeclaration ( true ) ;
4740
4741
return markerApply ( marker , astNodeFactory . createExportDefaultDeclaration ( declaration ) ) ;
4741
- } else if ( lookahead . value === "class" ) {
4742
+ } else if ( allowClasses && lookahead . value === "class" ) {
4742
4743
declaration = parseClassDeclaration ( true ) ;
4743
4744
return markerApply ( marker , astNodeFactory . createExportDefaultDeclaration ( declaration ) ) ;
4744
4745
}
Original file line number Diff line number Diff line change
1
+ module . exports = {
2
+ "index" : 15 ,
3
+ "lineNumber" : 1 ,
4
+ "column" : 16 ,
5
+ "description" : "Unexpected reserved word"
6
+ } ;
Original file line number Diff line number Diff line change
1
+ export default class { }
You can’t perform that action at this time.
0 commit comments