forked from openrs2/openrs2
parent
fc34f18e92
commit
ba66c47799
@ -1,15 +0,0 @@ |
||||
package dev.openrs2.deob.ast.transform; |
||||
|
||||
import com.github.javaparser.ast.CompilationUnit; |
||||
import com.github.javaparser.ast.Node; |
||||
import com.github.javaparser.ast.expr.EnclosedExpr; |
||||
import dev.openrs2.deob.ast.util.NodeUtils; |
||||
|
||||
public final class UnencloseTransformer extends Transformer { |
||||
@Override |
||||
public void transform(CompilationUnit unit) { |
||||
NodeUtils.walk(unit, Node.TreeTraversal.POSTORDER, EnclosedExpr.class, expr -> { |
||||
expr.replace(expr.getInner().clone()); |
||||
}); |
||||
} |
||||
} |
@ -0,0 +1,14 @@ |
||||
package dev.openrs2.deob.ast.transform |
||||
|
||||
import com.github.javaparser.ast.CompilationUnit |
||||
import com.github.javaparser.ast.Node |
||||
import com.github.javaparser.ast.expr.EnclosedExpr |
||||
import dev.openrs2.deob.ast.util.NodeUtils |
||||
|
||||
class UnencloseTransformer : Transformer() { |
||||
override fun transform(unit: CompilationUnit) { |
||||
NodeUtils.walk(unit, Node.TreeTraversal.POSTORDER, EnclosedExpr::class.java) { expr -> |
||||
expr.replace(expr.inner.clone()) |
||||
} |
||||
} |
||||
} |
Loading…
Reference in new issue