Type () { final IElementType elementType = getNode().getFirstChildNode().getElementType(); if (elementType == RegExpTT.GROUP_BEGIN) { return Type.CAPTURING_GROUP; } else if (elementType == RegExpTT.RUBY_NAMED_GROUP) { return Type.NAMED_GROUP; } else if (elementType == RegExpTT.PYTHON_NAMED_GROUP) { return Type.PYTHON_NAMED_GROUP; } else if (elementType == RegExpTT.RUBY_QUOTED_NAMED_GROUP) { return Type.QUOTED_NAMED_GROUP; } else if (elementType == RegExpTT.ATOMIC_GROUP) { return Type.ATOMIC; } else if (elementType == RegExpTT.NON_CAPT_GROUP) { return Type.NON_CAPTURING; } else if (elementType == RegExpTT.SET_OPTIONS) { return Type.OPTIONS; } else if (elementType == RegExpTT.POS_LOOKAHEAD) { return Type.POSITIVE_LOOKAHEAD; } else if (elementType == RegExpTT.NEG_LOOKAHEAD) { return Type.NEGATIVE_LOOKAHEAD; } else if (elementType == RegExpTT.POS_LOOKBEHIND) { return Type.POSITIVE_LOOKBEHIND; } else if (elementType == RegExpTT.NEG_LOOKBEHIND) { return Type.NEGATIVE_LOOKBEHIND; } else if (elementType == RegExpTT.PCRE_BRANCH_RESET) { return Type.PCRE_BRANCH_RESET; } throw new AssertionError(); }