void (RegExpQuantifier quantifier) { if (quantifier.isCounted()) { final RegExpNumber minElement = quantifier.getMin(); final RegExpNumber maxElement = quantifier.getMax(); Number minValue = null; if (minElement != null) { minValue = myLanguageHosts.getQuantifierValue(minElement); if (minValue == null) myHolder.newAnnotation(HighlightSeverity.ERROR, RegExpBundle.message("error.repetition.value.too.large")) .range(minElement).create(); } Number maxValue = null; if (maxElement != null && minElement != maxElement) { maxValue= myLanguageHosts.getQuantifierValue(maxElement); if (maxValue == null) myHolder.newAnnotation(HighlightSeverity.ERROR, RegExpBundle.message("error.repetition.value.too.large")) .range(maxElement).create(); } if (minValue != null && maxValue != null) { if (minValue.longValue() > maxValue.longValue() || minValue.doubleValue() > maxValue.doubleValue()) { final TextRange range = new TextRange(minElement.getTextOffset(), maxElement.getTextOffset() + maxElement.getTextLength()); myHolder.newAnnotation(HighlightSeverity.ERROR, RegExpBundle.message("error.illegal.repetition.range.min.max")).range(range) .create(); } } } if (quantifier.isPossessive() && !myLanguageHosts.supportsPossessiveQuantifiers(quantifier)) { final ASTNode modifier = quantifier.getModifier(); assert modifier != null; myHolder.newAnnotation(HighlightSeverity.ERROR, RegExpBundle.message("error.nested.quantifier.in.regexp")).range(modifier).create(); } }