From: Baptiste L. <gai...@fr...> - 2002-12-16 22:36:01
|
----- Original Message ----- From: "Baptiste Lepilleur" <gai...@fr...> To: "CppTool Mailing List" <Cpp...@li...> Sent: Sunday, December 15, 2002 9:19 PM Subject: [Cpptool-develop] Added declaration parsing in condition of if, while, and switch statement. > Well, the subject said it all. Please, notes that I removed > ScopeGeneratorTest and ScopesHolderTest from the Makefile. > [...] > The ScopeGenerator and ScopesHolder test will be removed soon. I'm done > with testing the new IdentifierResolver. I'm tackling the unit tests for > IdentifierResolverContext (which manages local variables visibility). Well, I'm finally did it. All the Scope* classes were removed and the code now use the new IdentifierResolver and IdentifierResolverContext. Once again the classes are miss-named :-(. IdentifierResolverContext should be named IdentifierResolver. I would have go ahead and renamed them, but I can't find a name for the current IdentifierResolver class. Suggestion are welcome. IdentifierResolver and IdentifierResolverStrategy are probably a for of the Director/Builder pattern. IdentifierResolver does the analysis (entry/exit scope, local variable declaration...), while IdentifierResolverStrategy process those 'event'. IdentifierResolverContext is a specialization of IdentifierResolverStrategy. I expect a few change to come up when we add a specialization of IdentifierResolverStrategy to detect if it is valid to declare a new locale variable at a given location (e.g. the identifier is not used in the scope), and when ReduceTemporary scope is implemented. Also, it should be fairly easy to extend IdentifierResolverContext to handle class attributes and methods. For now, I'll go back to working on the VC6 add-ins (mainly need to add a generique fixture to test TextDocument interface). Baptiste. > Baptiste. |