h2pas: finished tool to add named types for implicit types

git-svn-id: trunk@10379 -
This commit is contained in:
mattias 2007-01-05 14:36:42 +00:00
parent 4c41489aae
commit 5c09d7b773
3 changed files with 651 additions and 412 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,10 @@
unit h2pastest;
interface
const
MinValue = 0;
MaxValue = 5;
type type
TMyClass = class; TMyClass = class;
@ -17,9 +24,10 @@ type
false: (AsWord: word); false: (AsWord: word);
end; end;
// this procedure contains an explicit/anoymous type, which is not allowed // these procedures contain explicit/anoymous types, which are not allowed
// in FreePascal. The TReplaceImplicitTypes tool will replace it with a // in FreePascal. The TReplaceImplicitTypes tool will replace them with
// named type // named types
procedure DoSomething(var a: array[0..3] of TMyClass); procedure DoSomething1(var a: array[0..3] of TMyClass);
procedure DoSomething2(var a: array[MinValue..MaxValue] of char);

View File

@ -39,7 +39,7 @@
<PackageName Value="CodeTools"/> <PackageName Value="CodeTools"/>
</Item3> </Item3>
</RequiredPackages> </RequiredPackages>
<Units Count="17"> <Units Count="18">
<Unit0> <Unit0>
<Filename Value="testh2pastool.lpr"/> <Filename Value="testh2pastool.lpr"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
@ -47,7 +47,7 @@
<CursorPos X="23" Y="36"/> <CursorPos X="23" Y="36"/>
<TopLine Value="21"/> <TopLine Value="21"/>
<EditorIndex Value="0"/> <EditorIndex Value="0"/>
<UsageCount Value="27"/> <UsageCount Value="31"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit0> </Unit0>
<Unit1> <Unit1>
@ -100,11 +100,11 @@
</Unit7> </Unit7>
<Unit8> <Unit8>
<Filename Value="files/h2pastest.pas"/> <Filename Value="files/h2pastest.pas"/>
<UnitName Value="h2pasTest"/> <UnitName Value="h2pastest"/>
<CursorPos X="53" Y="23"/> <CursorPos X="10" Y="3"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<EditorIndex Value="4"/> <EditorIndex Value="2"/>
<UsageCount Value="24"/> <UsageCount Value="26"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit8> </Unit8>
<Unit9> <Unit9>
@ -117,10 +117,10 @@
<Unit10> <Unit10>
<Filename Value="../../h2pas/h2pasconvert.pas"/> <Filename Value="../../h2pas/h2pasconvert.pas"/>
<UnitName Value="H2PasConvert"/> <UnitName Value="H2PasConvert"/>
<CursorPos X="32" Y="2240"/> <CursorPos X="10" Y="2457"/>
<TopLine Value="2213"/> <TopLine Value="2433"/>
<EditorIndex Value="1"/> <EditorIndex Value="1"/>
<UsageCount Value="13"/> <UsageCount Value="15"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit10> </Unit10>
<Unit11> <Unit11>
@ -133,8 +133,8 @@
<Unit12> <Unit12>
<Filename Value="../../codetools/basiccodetools.pas"/> <Filename Value="../../codetools/basiccodetools.pas"/>
<UnitName Value="BasicCodeTools"/> <UnitName Value="BasicCodeTools"/>
<CursorPos X="1" Y="2050"/> <CursorPos X="10" Y="95"/>
<TopLine Value="2026"/> <TopLine Value="75"/>
<EditorIndex Value="3"/> <EditorIndex Value="3"/>
<UsageCount Value="13"/> <UsageCount Value="13"/>
<Loaded Value="True"/> <Loaded Value="True"/>
@ -162,13 +162,18 @@
</Unit15> </Unit15>
<Unit16> <Unit16>
<Filename Value="../../../packager/globallinks/simpleideintf-0.lpl"/> <Filename Value="../../../packager/globallinks/simpleideintf-0.lpl"/>
<CursorPos X="53" Y="1"/> <CursorPos X="12" Y="1"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<EditorIndex Value="2"/>
<UsageCount Value="10"/> <UsageCount Value="10"/>
<Loaded Value="True"/>
<SyntaxHighlighter Value="None"/> <SyntaxHighlighter Value="None"/>
</Unit16> </Unit16>
<Unit17>
<Filename Value="../../../lcl/avglvltree.pas"/>
<UnitName Value="AvgLvlTree"/>
<CursorPos X="23" Y="93"/>
<TopLine Value="65"/>
<UsageCount Value="10"/>
</Unit17>
</Units> </Units>
<JumpHistory Count="0" HistoryIndex="-1"/> <JumpHistory Count="0" HistoryIndex="-1"/>
</ProjectOptions> </ProjectOptions>