From: Baptiste L. <gai...@fr...> - 2003-04-05 10:17:38
|
----- Original Message ----- From: "Andre Baresel" <and...@gm...> To: "CppTool Mailing List" <Cpp...@li...> Sent: Saturday, April 05, 2003 10:52 AM Subject: [Cpptool-develop] Bug1 located -- it's not IdentifierResolver... > Hello, > > I was debugging the problem which has been reported by Baptiste, > luckily the problem is not located in the identifier resolver. > The Problem lies within the refactoring routines. > the code searches for the surrounding Compound Statement of the > currently selected temporary variable and parses only this source code area: > > int x; > { // parsing from here > y = x; // <-- select this "x" for refactoring > } // parsing ends here > > If you select the inner variable 'x' the refactoring will report > 'x' is not a local variable because it does not parse the declaration. Great finding! > I'll check how to get arround this. Currently I have in mind to > implement an iterative procedure which first parses the inner compound > and than takes more code if the declaration was not found. > However with this we can run into a problem if we get out side the > function which is analysed. Parsing will than fail. I don't see another way around for now. The failure to parse would translate into a error like "local variable not declared or parsing error..." Baptiste. > > until later, > andré |