void (RegExpClosure closure) { if (mySupport == RegExpLanguageHost.Lookbehind.FULL) { return; } final RegExpQuantifier quantifier = closure.getQuantifier(); if (quantifier.isCounted()) { if (mySupport == RegExpLanguageHost.Lookbehind.FIXED_LENGTH_ALTERNATION || mySupport == RegExpLanguageHost.Lookbehind.VARIABLE_LENGTH_ALTERNATION) { final RegExpNumber minElement = quantifier.getMin(); final RegExpNumber maxElement = quantifier.getMax(); if (minElement != null && maxElement != null) { final Number min = minElement.getValue(); if (min == null) { myStop = true; return; } final Number max = maxElement.getValue(); if (min.equals(max)) { final int length = myLength; myLength = 0; final RegExpAtom atom = closure.getAtom(); atom.accept(this); final int atomLength = myLength; myLength = length + (atomLength * min.intValue()); return; } } stopAndReportError(quantifier, RegExpBundle.message("error.unequal.min.and.max.in.counted.quantifier.not.allowed.inside.lookbehind")); } } else { final ASTNode token = quantifier.getToken(); assert token != null; if (token.getElementType().equals(RegExpTT.QUEST) && mySupport == RegExpLanguageHost.Lookbehind.FINITE_REPETITION) { return; } stopAndReportError(quantifier, RegExpBundle.message("error.0.repetition.not.allowed.inside.lookbehind", quantifier.getText())); } }