Ejemplo n.º 1
0
        protected virtual SyntaxBase ReplacePropertyAccessSyntax(PropertyAccessSyntax syntax)
        {
            var hasChanges = TryRewrite(syntax.BaseExpression, out var baseExpression);

            hasChanges |= TryRewriteStrict(syntax.Dot, out var dot);
            hasChanges |= TryRewriteStrict(syntax.PropertyName, out var propertyName);

            if (!hasChanges)
            {
                return(syntax);
            }

            return(new PropertyAccessSyntax(baseExpression, dot, propertyName));
        }
Ejemplo n.º 2
0
 void ISyntaxVisitor.VisitPropertyAccessSyntax(PropertyAccessSyntax syntax) => ReplaceCurrent(syntax, ReplacePropertyAccessSyntax);
Ejemplo n.º 3
0
 public virtual void VisitPropertyAccessSyntax(PropertyAccessSyntax syntax)
 {
     this.Visit(syntax.BaseExpression);
     this.Visit(syntax.Dot);
     this.Visit(syntax.PropertyName);
 }