@Override
  //doesn't visit GrString and regexps
  public void visitLiteralExpression(@NotNull GrLiteral literal) {
    final TypeConstraint[] constraints = GroovyExpectedTypesProvider.calculateTypeConstraints(literal);

    boolean isChar = false;
    for (TypeConstraint constraint : constraints) {
      if (constraint instanceof SubtypeConstraint && PsiTypes.charType().equals(TypesUtil.unboxPrimitiveTypeWrapper(constraint.getDefaultType()))) {
        isChar = true;
      }
    }

    final String text = literal.getText();
    final String value = GrStringUtil.unescapeString(GrStringUtil.removeQuotes(text));
    if (text.startsWith("'''") || text.startsWith("\"\"\"")) {
      if (com.intellij.psi.util.PsiUtil.isAvailable(JavaFeature.TEXT_BLOCKS, literal)) {
        String content = PsiLiteralUtil.escapeTextBlockCharacters(StringUtil.escapeStringCharacters(value));
        if (!content.endsWith("\n") && PsiLiteralUtil.getTextBlockIndent(content.split("\n", -1)) > 0) {
          builder.append("\"\"\"\n").append(content).append("\\\n").append("\"\"\"");
        }
        else {
          builder.append("\"\"\"\n").append(content).append("\"\"\"");
        }
      }
      else {
        String content = StringUtil.escapeStringCharacters(value).replaceAll("\\\\n([^\"])", "\\\\n\" +\n \"$1");
        builder.append('"').append(content).append('"');
      }
    }
    else if (text.startsWith("'")) {
      if (isChar) {
        builder.append(text);
      }
      else {
        builder.append('"').append(StringUtil.escapeStringCharacters(value)).append('"');
      }
    }
    else if (text.startsWith("\"")) {
      if (isChar) {
        builder.append('\'').append(StringUtil.escapeCharCharacters(value)).append('\'');
      }
      else {
        builder.append('"').append(StringUtil.escapeStringCharacters(value)).append('"');
      }
    }
    else {
      builder.append(text);
    }
  }
@Override
  //doesn't visit GrString and regexps
  public void visitLiteralExpression(@NotNull GrLiteral literal)