
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.
11 lines
183 B
JavaScript
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);
|
|
}
|