protected override SyntaxNode VisitVariableDeclarator(VariableDeclaratorSyntax node) { var newNode = base.VisitVariableDeclarator(node); if ((node = newNode as VariableDeclaratorSyntax) == null) { return(newNode); } if (node.InitializerOpt == null) { return(base.VisitVariableDeclarator(node)); } EqualsValueClauseSyntax equals = node.InitializerOpt; ExpressionSyntax value = RewritePostfixUnarys(equals.Value); equals = equals.Update(equals.EqualsToken, GetLogExpression(node.Identifier.ValueText, value)); return(node.Update(node.Identifier, null, equals)); }
protected override SyntaxNode VisitVariableDeclarator(VariableDeclaratorSyntax node) { if (node.InitializerOpt == null) return base.VisitVariableDeclarator (node); EqualsValueClauseSyntax equals = node.InitializerOpt; equals = equals.Update (equals.EqualsToken, GetLogExpression (node.Identifier.ValueText, equals.Value)); return node.Update (node.Identifier, null, equals); }
protected override SyntaxNode VisitVariableDeclarator(VariableDeclaratorSyntax node) { var newNode = base.VisitVariableDeclarator (node); if ((node = newNode as VariableDeclaratorSyntax) == null) return newNode; if (node.InitializerOpt == null) return base.VisitVariableDeclarator (node); EqualsValueClauseSyntax equals = node.InitializerOpt; ExpressionSyntax value = RewritePostfixUnarys (equals.Value); equals = equals.Update (equals.EqualsToken, GetLogExpression (node.Identifier.ValueText, value)); return node.Update (node.Identifier, null, equals); }