JS backend: catch fix refactoring

This commit is contained in:
Alexey Tsvetkov
2014-10-08 18:42:09 +04:00
committed by Michael Nedzelsky
parent 787b8f72c5
commit 5649797461
5 changed files with 190 additions and 115 deletions
@@ -24,6 +24,15 @@ public class JsCatch extends SourceInfoAwareJsNode implements HasCondition {
param = new JsParameter(scope.findName(ident));
}
public JsCatch(JsScope parent, @NotNull String ident, @NotNull JsStatement catchBody) {
this(parent, ident);
if (catchBody instanceof JsBlock) {
body = (JsBlock) catchBody;
} else {
body = new JsBlock(catchBody);
}
}
public JsBlock getBody() {
return body;
}