@Nullable
  private static StringKind getStringKindByStringElement(@NotNull PsiElement templateStringElement) {
    IElementType elementType = templateStringElement.getNode().getElementType();
    if (elementType == GSTRING) {
      return isMultiline(templateStringElement) ? StringKind.TRIPLE_DOUBLE_QUOTED : StringKind.DOUBLE_QUOTED;
    }
    else if (elementType == REGEX) {
      IElementType quoteType = templateStringElement.getFirstChild().getNode().getElementType();
      return quoteType == SLASHY_BEGIN ? StringKind.SLASHY : StringKind.DOLLAR_SLASHY;
    }
    else if (elementType == SLASHY_LITERAL) {
      return StringKind.SLASHY;
    }
    else if (elementType == DOLLAR_SLASHY_LITERAL) {
      return StringKind.DOLLAR_SLASHY;
    }
    else {
      return null;
    }
  }
@Nullable
  private static StringKind getStringKindByStringElement(@NotNull PsiElement templateStringElement)