On 4/3/2011 10:29 PM, Joel Falcou wrote:
> Hello,
> 
> we need a way to know if a given expression is the "top level" one.
> The use case is to detect the last = in expression like:
> 
> a = b = c = x * y;
> 
> A working but runtime version is given as : http://codepad.org/MO2NUgI2
> 
> Havign this feature at compiel time sounds a lot better. I think it
> requires to
> have a expression type carrying a bool_ in its type. Thus in the generator,
> we set this bool_ to false_ in incoming expression and put it back into the
> newly generated expression.
> 
> Is this a correct way of doing this or is there somethign already in
> proto we missed ?

There's nothing in Proto to make this easy. Fiddling with the generator
like you suggest is the first thing I'd try.

(Sorry for the delay. I've been offline for a bit.)

--
Eric Niebler
BoostPro Computing
http://www.boostpro.com
_______________________________________________
proto mailing list
proto@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/proto

Reply via email to