From: Baptiste L. <gai...@fr...> - 2002-12-09 09:06:56
|
Hi, I'm in the process of adding variable declaration to if/while statements: if ( int c = nextChar() ) ... This is actually done. When updating the test for the ScopeGenerator, I actually found a bug: the condition scope is not parent of the then and else statement scopes. I'm in the process of changing this. It will likely involve a partial rewrite of the ScopeGenerator class, so avoid change to this class. The current solution I've found is to drive more of the visitation from the 'scope generation description'. Basically, the description should indicate that for a while statement node, - the condition scope should be created - condition expression should generate scopes (variable declarations) and make the condition scope the parent - scopes should be generated for the then and else statements and the scope generated by the condition expression should be their parent. - then and else statement node should be visited for further scope generation. Not yet well defined, but that's the general idea. Baptiste. |