1
0
Fork 0
mirror of https://github.com/jashkenas/coffeescript.git synced 2022-11-09 12:23:24 -05:00

Stop treating debugger statements as jumps

Since in most debuggers you can continue past them.

No tests added, since I wasn't sure how to test code with `debugger`
in it.
This commit is contained in:
Marijn Haverbeke 2011-11-24 11:43:33 +01:00
parent 7d22a011ab
commit 24836ccf6d
2 changed files with 4 additions and 6 deletions

View file

@ -390,12 +390,10 @@
};
Literal.prototype.jumps = function(o) {
if (!this.isStatement()) return false;
if (!(o && (o.loop || o.block && (this.value !== 'continue')))) {
if (this.value === 'break' && !((o != null ? o.loop : void 0) || (o != null ? o.block : void 0))) {
return this;
} else {
return false;
}
if (this.value === 'continue' && !(o != null ? o.loop : void 0)) return this;
};
Literal.prototype.compileNode = function(o) {