@Override
    @NotNull
    public Type getType() {
        final IElementType type = getNode().getFirstChildNode().getElementType();
        if (type == RegExpTT.CARET) {
            return Type.LINE_START;
        } else if (type == RegExpTT.DOLLAR) {
            return Type.LINE_END;
        } else if (type == RegExpTT.BOUNDARY){
            final String text = getUnescapedText();
            return switch (text) {
              case "\\b" -> Type.WORD;
              case "\\b{g}" -> Type.UNICODE_EXTENDED_GRAPHEME;
              case "\\B" -> Type.NON_WORD;
              case "\\A" -> Type.BEGIN;
              case "\\Z" -> Type.END_NO_LINE_TERM;
              case "\\z" -> Type.END;
              case "\\G" -> Type.PREVIOUS_MATCH;
              case "\\K" -> Type.RESET_MATCH;
              default -> throw new AssertionError("unknown boundary '" + text + "'");
            };
        }
        throw new AssertionError("unknown boundary '" + getUnescapedText() + "'");
    }
@Override
    @NotNull
    public Type getType()