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.
12 lines
215 B
JavaScript
12 lines
215 B
JavaScript
function switch_basic(x) {
|
|
switch (x) {
|
|
case 1:
|
|
let a = 10;
|
|
return a;
|
|
case 2:
|
|
let b = 20;
|
|
return b;
|
|
default:
|
|
return 0;
|
|
}
|
|
}
|