[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [DotGNU]A request for help ... a mass effort

From: Rhys Weatherley
Subject: Re: [DotGNU]A request for help ... a mass effort
Date: Wed, 20 Nov 2002 18:29:35 +1000

James Michael DuPont wrote:

> Yes that is when you are creating a node for the first time. not based
> on another node? That is the meaning of _create right?
> But for the cases where you *DO* clone, does it not make sense to
> create an extra set of functions for the job?

Perhaps.  Treecc could easily be modified to output two or three
sets of "create" functions, instead of just the plain one.  e.g.

    ILNode *ILNode_Add_create(ILNode *expr1, ILNode *expr2);
    ILNode *ILNode_Add_create_on_line(char *filename, long linenum,
                                      ILNode *expr1, ILNode *expr2);
    ILNode *ILNode_Add_create_clone_line(ILNode *cloneFrom,
                                         ILNode *expr1, ILNode *expr2);

If you want to look into adding a treecc option to support something
like that, across all of treecc's supported languages, then go ahead.

C++, C#, and Java may actually be easier than C, because you could
use overloading on the constructor.  C will require multiple functions.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]