This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: C++: Implement code transformation in parser or tree
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Sohail Somani <sohail at taggedtype dot net>
- Cc: gcc <gcc at gcc dot gnu dot org>
- Date: Fri, 10 Nov 2006 14:47:04 -0800
- Subject: Re: C++: Implement code transformation in parser or tree
- References: <1162961827.7257.9.camel@localhost.localdomain>
Sohail Somani wrote:
> struct __some_random_name
> {
> void operator()(int & t){t++;}
> };
>
> for_each(b,e,__some_random_name());
>
> Would this require a new tree node like LAMBDA_FUNCTION or should the
> parser do the translation? In the latter case, no new nodes should be
> necessary (I think).
Do you need new class types, or just an anonymous FUNCTION_DECL?
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713