summaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
author zaaarf <zaaarf@proton.me>2023-02-07 16:53:24 +0100
committer zaaarf <zaaarf@proton.me>2023-02-07 16:53:24 +0100
commit86a40645d2803e4ad183968ca782c29e1ef9bb4e (patch)
tree44d8554afd9be98039196c0ccd5d2362fd1bef2b /src/main/java
parente21401b41b27ed78e67f2fc6044165ffa7723f1d (diff)
feat: added label matcher to PatternMatcher
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/ftbsc/lll/tools/PatternMatcher.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/ftbsc/lll/tools/PatternMatcher.java b/src/main/java/ftbsc/lll/tools/PatternMatcher.java
index 2d179e1..0d71125 100644
--- a/src/main/java/ftbsc/lll/tools/PatternMatcher.java
+++ b/src/main/java/ftbsc/lll/tools/PatternMatcher.java
@@ -215,6 +215,14 @@ public class PatternMatcher {
}
/**
+ * Matches any kind of label.
+ * @return the builder's state after the operation
+ */
+ public Builder label() {
+ return check(i -> i.getType() == AbstractInsnNode.LABEL);
+ }
+
+ /**
* Tells the pattern matcher to ignore LABEL instructions.
* @return the builder's state after the operation
*/