mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-11 17:37:33 +02:00
Add 39 test cases exercising AST dump output and scope analysis. Tests cover local/global identifier marking, eval/with poisoning, destructuring, closures, hoisting, classes, generators, and more.
23 lines
307 B
JavaScript
23 lines
307 B
JavaScript
function with_eval() {
|
|
let x = 1;
|
|
eval("");
|
|
return x;
|
|
}
|
|
|
|
function eval_in_nested_scope() {
|
|
let x = 1;
|
|
{
|
|
eval("");
|
|
}
|
|
return x;
|
|
}
|
|
|
|
function nested_function_unaffected() {
|
|
eval("");
|
|
function inner() {
|
|
let y = 2;
|
|
return y;
|
|
}
|
|
return inner();
|
|
}
|