@Override
	protected boolean matchDetails(PatternValue expression,
			Map<ExpressionMatcher<?>, PatternExpression> result) {
		if (expression instanceof ContextField) {
			ContextField cf = (ContextField) expression;
			long size = cf.getEndBit() - cf.getStartBit() + 1;
			return sizeMatcher.match(new ConstantValue(size), result);
		}
		if (expression instanceof TokenField) {
			TokenField tf = (TokenField) expression;
			long size = tf.getBitEnd() - tf.getBitStart() + 1;
			return sizeMatcher.match(new ConstantValue(size), result);
		}
		return false;
	}
A matcher for a token or context field, constrained by its size in bits
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/app/plugin/assembler/sleigh/expr/match/FieldSizeMatcher.java