It would be very useful to have CSharpOutputVisitor methods as virtual. Currently the class implements IAstVisitor without making its implementation virtual, which means it is useless to subclass.
I have enough scenarios where I mostly want the base visitor to generate C# code for me, in accordance with the provided CSharpFormattingOptions but in some cases need to customize visitation when writing code.
For example, I intentionally insert TextNode nodes in an AST for annotation purposes with the intention of causing invalid C#/compilation failure so that generated code forces an audit in some cases.
It would be very useful to have
CSharpOutputVisitor
methods asvirtual
. Currently the class implementsIAstVisitor
without making its implementationvirtual
, which means it is useless to subclass.I have enough scenarios where I mostly want the base visitor to generate C# code for me, in accordance with the provided
CSharpFormattingOptions
but in some cases need to customize visitation when writing code.For example, I intentionally insert
TextNode
nodes in an AST for annotation purposes with the intention of causing invalid C#/compilation failure so that generated code forces an audit in some cases.