boolean (RegExpChar aChar) { PsiElement prev = aChar.getPrevSibling(); while (prev instanceof RegExpChar) { prev = prev.getPrevSibling(); } if (isEscapeSequenceStart(prev)) { return true; } final PsiElement parent = aChar.getParent(); if (prev != null || !(parent instanceof RegExpBranch)) { return false; } final PsiElement grandParent = parent.getParent(); return grandParent instanceof RegExpPattern && isEscapeSequenceStart(grandParent.getPrevSibling()); }