Lines Matching defs:matcher
32 * A simple recursive pattern matcher for a DAG of nodes.
56 final MatchPattern matcher;
58 Result(MatchResultCode result, Node node, MatchPattern matcher) {
61 this.matcher = matcher;
79 static Result wrongClass(Node node, MatchPattern matcher) {
81 return Debug.isLogEnabled() ? new Result(MatchResultCode.WRONG_CLASS, node, matcher) : CACHED_WRONG_CLASS;
84 static Result namedValueMismatch(Node node, MatchPattern matcher) {
86 return Debug.isLogEnabled() ? new Result(MatchResultCode.NAMED_VALUE_MISMATCH, node, matcher) : CACHED_NAMED_VALUE_MISMATCH;
89 static Result tooManyUsers(Node node, MatchPattern matcher) {
91 return Debug.isLogEnabled() ? new Result(MatchResultCode.TOO_MANY_USERS, node, matcher) : CACHED_TOO_MANY_USERS;
94 static Result notInBlock(Node node, MatchPattern matcher) {
96 return Debug.isLogEnabled() ? new Result(MatchResultCode.NOT_IN_BLOCK, node, matcher) : CACHED_NOT_IN_BLOCK;
99 static Result notSafe(Node node, MatchPattern matcher) {
101 return Debug.isLogEnabled() ? new Result(MatchResultCode.NOT_SAFE, node, matcher) : CACHED_NOT_SAFE;
104 static Result alreadyUsed(Node node, MatchPattern matcher) {
106 return Debug.isLogEnabled() ? new Result(MatchResultCode.ALREADY_USED, node, matcher) : CACHED_ALREADY_USED;
117 return code + " " + node.toString(Verbosity.Id) + "|" + node.getClass().getSimpleName() + " " + matcher;