Пример #1
0
 public void VisitBinaryExpression(BinaryExpression binaryExpression)
 {
     binaryExpression.LeftOperand.AcceptVisitor (this);
     if (!(binaryExpression is NamedExpression) || binaryExpression.Operator != TokenType.Colon)
         writer.Write (' ');
     writer.Write (binaryExpression.Operator.AsWritten ());
     writer.Write (' ');
     binaryExpression.RightOperand.AcceptVisitor (this);
 }
            public override void VisitBinaryExpression(BinaryExpression binaryExpression)
            {
                var nameExpr = binaryExpression.LeftOperand as LiteralExpression;
                if (nameExpr != null && (binaryExpression.Operator == TokenType.Assign ||
                    binaryExpression.Operator == TokenType.Colon)) {
                    switch (nameExpr.Value) {
                    case "Introduced":
                    case "introduced":
                        currentAvailability = "Introduced";
                        break;
                    case "Deprecated":
                    case "deprecated":
                        currentAvailability = "Deprecated";
                        break;
                    case "Obsoleted":
                    case "obsoleted":
                        currentAvailability = "Obsoleted";
                        break;
                    case "Unavailable":
                    case "unavailable":
                        currentAvailability = "Obsoleted";
                        break;
                    case "Message":
                    case "message":
                        var messageExpr = binaryExpression.RightOperand as LiteralExpression;
                        if (messageExpr != null)
                            message = messageExpr.Value;
                        break;
                    }
                }

                base.VisitBinaryExpression (binaryExpression);
            }