|
|
Commit Details |
|
Features in Development Tools |
|
Hamish Rodda committed changes in
/trunk/KDE/kdevelop/plugins/languages/cpp/parser:
|
Start implementing the reverse of parsing - converting an AST back to c++ code. The whole AST is covered already, but it's hardly tested yet - for unit tests I need to write code that will check (ast -> code -> ast2) ast == ast2 ... ie tree comparison logic |
|
|
|
|
|
Discussion |
| From: Hamish Rodda |
Date: 6th December 2008 @ 23:49:13 |
On Sunday 07 December 2008 00:24:43 David Nolden wrote: > Am Samstag, 6. Dezember 2008 13:03:45 schrieb Hamish Rodda: > > SVN commit 893267 by rodda: > > > > Start implementing the reverse of parsing - converting an AST back to c++ > > code. The whole AST is covered already, but it's hardly tested yet - for > > unit tests I need to write code that will check (ast -> code -> ast2) ast > > == ast2 ... ie tree comparison logic > > Why not normalized(code) -> ast -> normalized(code), you could use astyle > for normalizing the code, you wouldn't need to write a tree comparsion, and > differences would be easier to understand.
I'll investigate :)
Cheers,Hamish. |
|
|
|
| From: David Nolden |
Date: 6th December 2008 @ 13:25:13 |
Am Samstag, 6. Dezember 2008 13:03:45 schrieb Hamish Rodda: > SVN commit 893267 by rodda: > > Start implementing the reverse of parsing - converting an AST back to c++ > code. The whole AST is covered already, but it's hardly tested yet - for > unit tests I need to write code that will check (ast -> code -> ast2) ast > == ast2 ... ie tree comparison logic Why not normalized(code) -> ast -> normalized(code), you could use astyle for normalizing the code, you wouldn't need to write a tree comparsion, and differences would be easier to understand. Greetings, David |
|
|
|
|