@@ -573,11 +573,9 @@ template <class TreeBuilder> TreeStatement Parser<LexerType>::parseStatementList
573573
574574 break ;
575575 }
576- #if ENABLE(ES6_CLASS_SYNTAX)
577576 case CLASSTOKEN :
578577 result = parseClassDeclaration (context);
579578 break ;
580- #endif
581579 case FUNCTION :
582580 result = parseFunctionDeclaration (context);
583581 break ;
@@ -2828,11 +2826,7 @@ template <class TreeBuilder> TreeStatement Parser<LexerType>::parseExportDeclara
28282826 SavePoint savePoint = createSavePoint ();
28292827
28302828 bool startsWithFunction = match (FUNCTION );
2831- if (startsWithFunction
2832- #if ENABLE(ES6_CLASS_SYNTAX)
2833- || match (CLASSTOKEN )
2834- #endif
2835- ) {
2829+ if (startsWithFunction || match (CLASSTOKEN )) {
28362830 isFunctionOrClassDeclaration = true ;
28372831 next ();
28382832
@@ -2851,13 +2845,10 @@ template <class TreeBuilder> TreeStatement Parser<LexerType>::parseExportDeclara
28512845 DepthManager statementDepth (&m_statementDepth);
28522846 m_statementDepth = 1 ;
28532847 result = parseFunctionDeclaration (context);
2854- }
2855- #if ENABLE(ES6_CLASS_SYNTAX)
2856- else {
2848+ } else {
28572849 ASSERT (match (CLASSTOKEN ));
28582850 result = parseClassDeclaration (context);
28592851 }
2860- #endif
28612852 } else {
28622853 // export default expr;
28632854 //
@@ -2968,11 +2959,9 @@ template <class TreeBuilder> TreeStatement Parser<LexerType>::parseExportDeclara
29682959 break ;
29692960 }
29702961
2971- #if ENABLE(ES6_CLASS_SYNTAX)
29722962 case CLASSTOKEN :
29732963 result = parseClassDeclaration (context, ExportType::Exported);
29742964 break ;
2975- #endif
29762965
29772966 default :
29782967 failWithMessage (" Expected either a declaration or a variable statement" );
@@ -3721,12 +3710,10 @@ template <class TreeBuilder> TreeExpression Parser<LexerType>::parsePrimaryExpre
37213710 switch (m_token.m_type ) {
37223711 case FUNCTION :
37233712 return parseFunctionExpression (context);
3724- #if ENABLE(ES6_CLASS_SYNTAX)
37253713 case CLASSTOKEN : {
37263714 ParserClassInfo<TreeBuilder> info;
37273715 return parseClass (context, FunctionNoRequirements, info);
37283716 }
3729- #endif
37303717 case OPENBRACE :
37313718 if (strictMode ())
37323719 return parseStrictObjectLiteral (context);
@@ -3906,12 +3893,8 @@ template <class TreeBuilder> TreeExpression Parser<LexerType>::parseMemberExpres
39063893 newCount++;
39073894 }
39083895
3909- #if ENABLE(ES6_CLASS_SYNTAX)
39103896 bool baseIsSuper = match (SUPER );
39113897 semanticFailIfTrue (baseIsSuper && newCount, " Cannot use new with super" );
3912- #else
3913- bool baseIsSuper = false ;
3914- #endif
39153898
39163899 bool baseIsNewTarget = false ;
39173900 if (newCount && match (DOT )) {
0 commit comments