Example #1
0
        private static void DebugDumpCSharpSyntax(SyntaxNode tree)
        {
            if (tree == null)
            {
                throw new ArgumentNullException(nameof(tree));
            }

            var callback = new CsharpVisitorCallback()
            {
                Callback = node => { DebugClass.LogError("Node: " + node.Kind() + ": " + node.ToFullString()); }
            };

            var walker = new CustomCSharpSyntaxWalker(callback);

            walker.Visit(tree);
        }
 public CustomCSharpSyntaxWalker(CsharpVisitorCallback callback)
 {
     VisitorCallback = callback;
 }