Implement deepCopy in JsRegExpr
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user