IAstVisitor is an interface used for visiting syntax trees in C#. It defines a set of methods that can be implemented by a class to traverse specific types of syntax nodes in an abstract syntax tree.
Example:
In the Microsoft.CodeAnalysis.CSharp assembly, the following code implements the IAstVisitor interface and demonstrates how to visit syntax nodes:
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
class MyVisitor : CSharpSyntaxVisitor