I am making good progress by also parsing the presented code types inside the code presented. What I need to do now for being acceptable for codetools is also parsing used units AND include files recursively. That is a bit much, although I have already code for that.
What I have in practise is attached, but that is no release, although it performs much better. What I am working on in parsing code like this:
for var i = 0..9 do
for var i := 'A' to 'Z' do
for var i in Objectlist do
Which is something that delphi seems
not to accept but I need to de-duplicate / change the names to make it compilable without human intervention.
It should be:
for var i = 0..9 do
for var i1 := 'A' to 'Z' do
for var i2 in Objectlist do
Because that would solve the duplicate naming it now does, which needs intervention:
var i:integer;
i:char;
i:Tobjectlist
Into:
var i:integer;
i1:char;
i2:Tobjectlist;
That involves parsing and renaming, because that is how it looks now.
The code is very close, but not ready for codetools yet.
See attachment, please review: