Class body ending with a semicolon throws a SyntaxError
[WebKit-https.git] / Source / JavaScriptCore / parser / Parser.cpp
index 2163dbd8720c9fef8f290931474845dc2b51b125..c7088e71928cc2be5879609bb30908c1e5834559 100644 (file)
@@ -1537,8 +1537,10 @@ template <class TreeBuilder> TreeClassExpression Parser<LexerType>::parseClass(T
     TreePropertyList instanceMethodsTail = 0;
     TreePropertyList staticMethodsTail = 0;
     while (!match(CLOSEBRACE)) {
-        if (match(SEMICOLON))
+        if (match(SEMICOLON)) {
             next();
+            continue;
+        }
 
         JSTokenLocation methodLocation(tokenLocation());
         unsigned methodStart = tokenStart();