JS: when resolving temporary functions, don't rely on JsScope hierarchy, build this hierarchy instead, based on scoping rules for function, var, etc expressions

This commit is contained in:
Alexey Andreev
2017-02-10 19:55:45 +03:00
parent a6bb5743db
commit 9530ce6c26
11 changed files with 315 additions and 74 deletions
@@ -0,0 +1,28 @@
function foo() {
$a: {
$b: {
console.log("1");
console.log(function() {
$aa: {
console.log("2");
}
});
if (condition()) {
break $a;
}
else {
break $b;
}
}
}
$c: {
$d: {
console.log("1");
}
$e: {
console.log("1");
}
}
}