fix corner case in directives & expression (#5369)

fixes #5368
This commit is contained in:
Alex Lam S.L
2022-02-23 21:04:04 +00:00
committed by GitHub
parent 313e4974a4
commit a9d0ddea9d
2 changed files with 45 additions and 15 deletions

View File

@@ -129,3 +129,32 @@ valid_after_invalid_2: {
}
expect_stdout: "undefined"
}
issue_5368_1: {
options = {
directives: true,
expression: true,
}
input: {
"foo";
}
expect: {
"foo";
}
}
issue_5368_2: {
options = {
directives: true,
expression: true,
}
input: {
"foo";
(function() {
"bar";
})();
}
expect: {
(function() {})();
}
}