@Override
  public void visitLiteralExpression(@NotNull PsiLiteralExpression expression) {
    final PsiLiteralExpression other = getExpression(PsiLiteralExpression.class, expression);
    if (other == null) return;
    final PsiType type1 = expression.getType();
    if (type1 != null && !myMatchingVisitor.setResult(type1.equals(other.getType()))) {
      return;
    }
    final MatchingHandler handler = expression.getUserData(CompiledPattern.HANDLER_KEY);
    if (handler instanceof SubstitutionHandler) {
      int offset = 0;
      int length = other.getTextLength();
      final String text = other.getText();

      if (StringUtil.isQuotedString(text)) {
        length--;
        offset++;
      }
      myMatchingVisitor.setResult(((SubstitutionHandler)handler).handle(other, offset, length, myMatchingVisitor.getMatchContext()));
    }
    else if (handler != null) {
      myMatchingVisitor.setResult(handler.match(expression, other, myMatchingVisitor.getMatchContext()));
    }
    else {
      final Object value1 = expression.getValue();
      final Object value2 = other.getValue();
      if ((value1 instanceof String || value1 instanceof Character) && (value2 instanceof String || value2 instanceof Character)) {
        String patternValue = value1.toString();
        if (!patternValue.isEmpty() && patternValue.equals(patternValue.trim())) {
          myMatchingVisitor.setResult(myMatchingVisitor.matchText(MatchUtil.normalize(patternValue),
                                                                  MatchUtil.normalize(value2.toString())));
        }
        else {
          myMatchingVisitor.setResult(myMatchingVisitor.matchText(patternValue, value2.toString()));
        }
      }
      else if (value1 != null && value2 != null) {
        myMatchingVisitor.setResult(value1.equals(value2));
      }
      else {
        // matches null literals
        myMatchingVisitor.setResult(myMatchingVisitor.matchText(expression, other));
      }
    }
  }
@Override
  public void visitLiteralExpression(@NotNull PsiLiteralExpression expression)