Reviewed by John.
[WebKit-https.git] / JavaScriptCore / kjs / grammar.y
index ec599b7df8ce993de8d814ce4d5cc24674f7e3c7..780f134f4c2f32e79499fa5d24a2c0dc3c21a079 100644 (file)
@@ -566,6 +566,7 @@ LabelledStatement:
 
 ThrowStatement:
     THROW Expr ';'                 { $$ = new ThrowNode($2); }
+  | THROW Expr error               { if (automatic()) $$ = new ThrowNode($2); else YYABORT; }
 ;
 
 TryStatement: