Ejemplo n.º 1
0
            public override SyntaxList <StatementSyntax> VisitEraseStatement(VBSyntax.EraseStatementSyntax node)
            {
                var eraseStatements = node.Expressions.Select <VBSyntax.ExpressionSyntax, StatementSyntax>(arrayExpression => {
                    var lhs = arrayExpression.Accept(_nodesVisitor);
                    var rhs = SyntaxFactory.LiteralExpression(SyntaxKind.NullLiteralExpression);
                    var assignmentExpressionSyntax =
                        SyntaxFactory.AssignmentExpression(SyntaxKind.SimpleAssignmentExpression, (ExpressionSyntax)lhs,
                                                           rhs);
                    return(SyntaxFactory.ExpressionStatement(assignmentExpressionSyntax));
                });

                return(SyntaxFactory.List(eraseStatements));
            }
Ejemplo n.º 2
0
 public override SyntaxList <StatementSyntax> VisitEraseStatement(VBSyntax.EraseStatementSyntax node) => AddLocalVariables(node);
Ejemplo n.º 3
0
 public override Task <SyntaxList <StatementSyntax> > VisitEraseStatement(VBSyntax.EraseStatementSyntax node) => AddLocalVariablesAsync(node);