feat: added label matcher to PatternMatcher

This commit is contained in:
zaaarf 2023-02-07 16:53:24 +01:00
parent e21401b41b
commit 86a40645d2
No known key found for this signature in database
GPG key ID: 82240E075E31FA4C

View file

@ -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