From 86a40645d2803e4ad183968ca782c29e1ef9bb4e Mon Sep 17 00:00:00 2001 From: zaaarf Date: Tue, 7 Feb 2023 16:53:24 +0100 Subject: feat: added label matcher to PatternMatcher --- src/main/java/ftbsc/lll/tools/PatternMatcher.java | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/main/java/ftbsc') 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 @@ -214,6 +214,14 @@ public class PatternMatcher { return check(i -> i.getType() == AbstractInsnNode.JUMP_INSN); } + /** + * 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 -- cgit v1.2.3-56-ga3b1