|
Re: Printing comments with BooPrinterVisitor: msg#00052lang.boo.devel
On 9/10/05, Daniel Grunwald <daniel-c/LZLyLxtvmTUrhO6CyE8bNAH6kLmebB@xxxxxxxxxxxxxxxx> wrote: > 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? > Use a DepthFirstTransformer and override OnNode. -- bamboo http://blogs.codehaus.org/people/bamboo/ Got objects? http://www.db4o.com/
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | [jira] Commented: (BOO-484) For loop similar to Basic's for <var> = <start> to <end> [step <step>]:, Cameron Kenneth Knight (JIRA) |
|---|---|
| Next by Date: | Re: Printing comments with BooPrinterVisitor, Daniel Grunwald |
| Previous by Thread: | Printing comments with BooPrinterVisitor, Daniel Grunwald |
| Next by Thread: | Re: Printing comments with BooPrinterVisitor, Daniel Grunwald |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |