logo       

Re: Printing comments with BooPrinterVisitor: msg#00054

lang.boo.devel

Subject: Re: Printing comments with BooPrinterVisitor

On 9/10/05, Daniel Grunwald
<daniel-c/LZLyLxtvmTUrhO6CyE8bNAH6kLmebB@xxxxxxxxxxxxxxxx> wrote:
> Rodrigo B. de Oliveira wrote:
> On 9/10/05, Daniel Grunwald
> <daniel-c/LZLyLxtvmTUrhO6CyE8bNAH6kLmebB@xxxxxxxxxxxxxxxx> wrote:
>
> ...
> 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.
>
> But I'm not creating my own visitor, I'm extending BooPrinterVisitor which
> inherits from TextEmitter which inherits from DepthFirstVisitor.
>

Right. Then, yes, making Visit(Node) virtual could work.
--
bamboo
http://blogs.codehaus.org/people/bamboo/
Got objects? http://www.db4o.com/



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise