Implement deepCopy in JsRegExpr

This commit is contained in:
Alexey Andreev
2017-06-27 12:28:00 +03:00
parent 64331ffa40
commit 4037112f28
@@ -4,6 +4,8 @@
package org.jetbrains.kotlin.js.backend.ast;
import org.jetbrains.annotations.NotNull;
public final class JsRegExp extends JsLiteral.JsValueLiteral {
private String flags;
private String pattern;
@@ -37,4 +39,13 @@ public final class JsRegExp extends JsLiteral.JsValueLiteral {
v.visit(this, ctx);
v.endVisit(this, ctx);
}
@NotNull
@Override
public JsRegExp deepCopy() {
JsRegExp copy = new JsRegExp().withMetadataFrom(this);
copy.setFlags(flags);
copy.setPattern(pattern);
return copy;
}
}