ladybird/Libraries/LibJS/Tests/empty-statements.js
Linus Groh 32742709dc LibJS: Support empty statements
We already skipped random semicolons in Parser::parse_program(), but now
they are properly matched and parsed as empty statements - and thus
recognized as a valid body of an if / else / while / ... statement.
2020-05-03 12:57:48 +02:00

11 lines
183 B
JavaScript

try {
;;;
if (true);
if (false); else if (false); else;
while (false);
do; while (false);
console.log("PASS");
} catch (e) {
console.log("FAIL: " + e);
}