- extend expression types
- `a++`
- `a=x;`
- extend scan range
- `for(init;;);`
- `switch(expr){case expr:}`
- `a = x; a = a || y;`
- terminate upon `debugger;`
closes #1821
fixes #27
fixes #315
fixes #1858
53 lines
1.0 KiB
JavaScript
53 lines
1.0 KiB
JavaScript
chained_evaluation_1: {
|
|
options = {
|
|
collapse_vars: true,
|
|
evaluate: true,
|
|
reduce_vars: true,
|
|
unused: true,
|
|
}
|
|
input: {
|
|
(function() {
|
|
var a = 1;
|
|
(function() {
|
|
var b = a, c;
|
|
c = f(b);
|
|
c.bar = b;
|
|
})();
|
|
})();
|
|
}
|
|
expect: {
|
|
(function() {
|
|
(function() {
|
|
f(1).bar = 1;
|
|
})();
|
|
})();
|
|
}
|
|
}
|
|
|
|
chained_evaluation_2: {
|
|
options = {
|
|
collapse_vars: true,
|
|
evaluate: true,
|
|
reduce_vars: true,
|
|
unused: true,
|
|
}
|
|
input: {
|
|
(function() {
|
|
var a = "long piece of string";
|
|
(function() {
|
|
var b = a, c;
|
|
c = f(b);
|
|
c.bar = b;
|
|
})();
|
|
})();
|
|
}
|
|
expect: {
|
|
(function() {
|
|
(function() {
|
|
var b = "long piece of string";
|
|
f(b).bar = b;
|
|
})();
|
|
})();
|
|
}
|
|
}
|