|
|
Printing comments with BooPrinterVisitor: msg#00043
lang.boo.devel
|
Subject: |
Printing comments with BooPrinterVisitor |
I want to extend BooPrinterVisitor to print comments for the C# ->
Boo conversion.
I have a list of comments with line+column number, and the comment text.
All nodes in the AST carry LexicalInfo representing the location of the
node in the C# document.
So basically I want to intercept writing ANY node (or at least any
statement) and print all comments up to the line of the statement.
My problem is: Do I really need to override all On...Statement methods?
It would be much easier if DepthFirstVisitor.Visit(INode) was virtual.
So should I make DepthFirstVisitor.Visit virtual? Or override all
...Statement methods (with the risk that future statements are
forgotten to be inserted)?
Or is there any other way?
Daniel
|
| |