Changeset 59
- Timestamp:
- Oct 14, 2010, 8:41:34 AM (14 years ago)
- Location:
- branches/Transpascal
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Transpascal/Analyze/UParser.pas
r58 r59 45 45 end; 46 46 47 TGetSourceEvent = function (Name: string; Source: TStringList): Boolean of object; 48 47 49 { TPascalParser } 48 50 49 51 TPascalParser = class(TBaseParser) 52 private 53 FOnGetSource: TGetSourceEvent; 54 public 55 function ParseFile(Name: string): Boolean; 50 56 procedure ParseWhileDo(SourceCode: TWhileDo); 51 57 procedure ParseExpression(SourceCode: TExpression); 52 procedure ParseUse dModuleList(SourceCode: TUsedModuleList);53 function ParseModule : TModule;58 procedure ParseUses(SourceCode: TUsedModuleList); 59 function ParseModule(ProgramCode: TProgram): TModule; 54 60 procedure ParseUnit(SourceCode: TModuleUnit); 55 61 procedure ParseUnitInterface(SourceCode: TUnitInterface); … … 68 74 procedure ParseTypeList(SourceCode: TTypeList); 69 75 function ParseType(TypeList: TTypeList; ExpectName: Boolean = True; AssignSymbol: string = '='): TType; 70 private 76 property OnGetSource: TGetSourceEvent read FOnGetSource 77 write FOnGetSource; 78 constructor Create; 79 destructor Destroy; override; 71 80 end; 72 81 … … 84 93 SUndefinedType = 'Undefined type "%s".'; 85 94 SUndefinedConstant = 'Undefined constant "%s".'; 95 SUnitNotFound = 'Unit "%s" not found.'; 86 96 87 97 { TBaseParser } … … 335 345 end; 336 346 337 { TParserWhileDo } 347 { TPascalParser } 348 349 function TPascalParser.ParseFile(Name: string): Boolean; 350 var 351 Parser: TPascalParser; 352 NewModule: TModule; 353 begin 354 try 355 Parser := TPascalParser.Create; 356 Parser.SourceCodeText := TStringList.Create; 357 Parser.ProgramCode := ProgramCode; 358 if Assigned(FOnGetSource) then begin 359 if FOnGetSource(Name, Parser.SourceCodeText) then begin 360 Parser.Init; 361 NewModule := Parser.ParseModule(ProgramCode); 362 ProgramCode.Modules.Add(NewModule); 363 Result := True; 364 end else Result := False; 365 end else Result := False; 366 finally 367 Parser.SourceCodeText.Free; 368 Parser.Free; 369 end; 370 end; 338 371 339 372 procedure TPascalParser.ParseWhileDo(SourceCode: TWhileDo); … … 631 664 { TParserModule } 632 665 633 function TPascalParser.ParseModule: TModule; 634 begin 666 function TPascalParser.ParseModule(ProgramCode: TProgram): TModule; 667 begin 668 Self.ProgramCode := ProgramCode; 635 669 if FNextToken = 'unit' then begin 636 670 Result := TModuleUnit.Create; 671 Result.ParentProgram := ProgramCode; 637 672 ParseUnit(TModuleUnit(Result)); 638 673 end else begin //if FNextToken = 'program' then begin 639 674 Result := TModuleProgram.Create; 675 Result.ParentProgram := ProgramCode; 640 676 ParseProgram(TModuleProgram(Result)); 641 677 end; … … 655 691 // Uses section 656 692 if FNextToken = 'uses' then 657 ParseUse dModuleList(UsedModules);693 ParseUses(UsedModules); 658 694 659 695 ParseCommonBlock(Body, '.'); … … 681 717 // Uses section 682 718 if FNextToken = 'uses' then 683 ParseUse dModuleList(SourceCode.UsedModules);719 ParseUses(SourceCode.UsedModules); 684 720 685 721 ParseCommonBlockInterface(SourceCode.Body); … … 692 728 // Uses section 693 729 if FNextToken = 'uses' then 694 ParseUse dModuleList(SourceCode.UsedModules);730 ParseUses(SourceCode.UsedModules); 695 731 696 732 ParseCommonBlock(SourceCode.Body, '.'); … … 1103 1139 end; 1104 1140 1141 constructor TPascalParser.Create; 1142 begin 1143 end; 1144 1145 destructor TPascalParser.Destroy; 1146 begin 1147 inherited Destroy; 1148 end; 1149 1105 1150 { TParserUsedModuleList } 1106 1151 1107 procedure TPascalParser.ParseUse dModuleList(SourceCode: TUsedModuleList);1152 procedure TPascalParser.ParseUses(SourceCode: TUsedModuleList); 1108 1153 var 1109 1154 NewUsedModule: TUsedModule; … … 1113 1158 begin 1114 1159 Name := ReadCode; 1115 end; 1116 while FNextToken = ',' do 1117 begin 1160 Module := SourceCode.ParentModule.ParentProgram.Modules.Search(Name); 1161 if not Assigned(Module) then begin 1162 if not ParseFile(Name) then ErrorMessage(SUnitNotFound, [Name]); 1163 end; 1164 end; 1165 while FNextToken = ',' do begin 1118 1166 Expect(','); 1119 1167 with TUsedModule(SourceCode.Items[SourceCode.Add(TUsedModule.Create)]) do 1120 1168 begin 1121 1169 Name := ReadCode; 1170 Module := SourceCode.ParentModule.ParentProgram.Modules.Search(Name); 1171 if not Assigned(Module) then begin 1172 if not ParseFile(Name) then ErrorMessage(SUnitNotFound, [Name]); 1173 end; 1122 1174 end; 1123 1175 end; -
branches/Transpascal/Forms/UMainForm.lfm
r55 r59 65 65 Priority = 0 66 66 end> 67 RightGutter.Width = 0 68 RightGutter.MouseActions = < 69 item 70 Shift = [] 71 ShiftMask = [] 72 Button = mbLeft 73 ClickCount = ccAny 74 ClickDir = cdDown 75 Command = 13 76 MoveCaret = False 77 Option = 0 78 Priority = 0 79 end 80 item 81 Shift = [] 82 ShiftMask = [] 83 Button = mbRight 84 ClickCount = ccSingle 85 ClickDir = cdUp 86 Command = 12 87 MoveCaret = False 88 Option = 0 89 Priority = 0 90 end> 67 91 Highlighter = SynPasSyn1 68 92 Keystrokes = < … … 616 640 inline SynGutterPartList1: TSynGutterPartList 617 641 object SynGutterMarks1: TSynGutterMarks 618 Width = 2 3642 Width = 24 619 643 end 620 644 object SynGutterLineNumber1: TSynGutterLineNumber … … 721 745 end 722 746 end 747 inline SynRightGutterPartList1: TSynRightGutterPartList 748 end 723 749 end 724 750 object ComboBox1: TComboBox … … 773 799 end 774 800 object SynPasSyn1: TSynPasSyn 801 Enabled = False 775 802 CompilerMode = pcmDelphi 776 803 NestedComments = False -
branches/Transpascal/Forms/UMainForm.pas
r55 r59 37 37 procedure UpdateProjectTree; 38 38 procedure UpdateProjectGroup(Node: TTreeNode; Group: TProjectGroup); 39 function GetSource(Name: string; Source: TStringList): Boolean; 39 40 public 40 41 Project: TProject; … … 80 81 // Compile all project files 81 82 Compiler.Init; 82 for I := 0 to Project.Items.Count - 1 do begin 83 if TProjectNode(Project.Items[I]) is TProjectFile then 84 with TProjectFile(Project.Items[I]) do begin 85 Compiler.Compile(Parent.GetDir + Name, Source, ProducedCode); 86 end; 83 Compiler.Parser.OnGetSource := GetSource; 84 with TProjectFile(Project.Items[0]) do begin 85 Compiler.Compile(Parent.GetDir + Name, Source, ProducedCode); 87 86 end; 88 87 … … 179 178 end; 180 179 180 function TMainForm.GetSource(Name: string; Source: TStringList): Boolean; 181 var 182 FileName: string; 183 begin 184 FileName := Project.GetDir(True) + Name + '.pas'; 185 if FileExists(FileName) then begin 186 Source.LoadFromFile(FileName); 187 Result := True; 188 end else Result := False; 189 end; 190 181 191 procedure TMainForm.FormClose(Sender: TObject; var Action: TCloseAction); 182 192 begin -
branches/Transpascal/Transpascal.lpi
r58 r59 2 2 <CONFIG> 3 3 <ProjectOptions> 4 <Version Value="9"/> 4 5 <PathDelim Value="\"/> 5 <Version Value="8"/>6 6 <General> 7 7 <MainUnit Value="0"/> 8 <TargetFileExt Value=".exe"/>9 8 <Title Value="Transpascal"/> 10 9 <ResourceType Value="res"/> … … 19 18 <Language Value=""/> 20 19 <CharSet Value=""/> 21 <StringTable Comments="" CompanyName="" FileDescription="" FileVersion="" InternalName="" LegalCopyright="" LegalTrademarks="" OriginalFilename="" ProductName=""ProductVersion=""/>20 <StringTable ProductVersion=""/> 22 21 </VersionInfo> 23 22 <PublishOptions> … … 49 48 <WindowIndex Value="0"/> 50 49 <TopLine Value="4"/> 51 <CursorPos X=" 1" Y="29"/>52 <UsageCount Value="15 2"/>50 <CursorPos X="20" Y="26"/> 51 <UsageCount Value="155"/> 53 52 <Loaded Value="True"/> 54 53 </Unit0> … … 60 59 <ResourceBaseClass Value="Form"/> 61 60 <UnitName Value="UMainForm"/> 61 <IsVisibleTab Value="True"/> 62 62 <EditorIndex Value="6"/> 63 63 <WindowIndex Value="0"/> 64 <TopLine Value=" 66"/>65 <CursorPos X="1" Y="8 5"/>66 <UsageCount Value="15 2"/>64 <TopLine Value="70"/> 65 <CursorPos X="1" Y="87"/> 66 <UsageCount Value="155"/> 67 67 <Loaded Value="True"/> 68 68 <LoadedDesigner Value="True"/> … … 75 75 <TopLine Value="1"/> 76 76 <CursorPos X="1" Y="1"/> 77 <UsageCount Value="15 2"/>77 <UsageCount Value="155"/> 78 78 </Unit2> 79 79 <Unit3> … … 83 83 <EditorIndex Value="5"/> 84 84 <WindowIndex Value="0"/> 85 <TopLine Value="7 61"/>86 <CursorPos X=" 13" Y="784"/>87 <UsageCount Value="15 2"/>85 <TopLine Value="732"/> 86 <CursorPos X="35" Y="736"/> 87 <UsageCount Value="155"/> 88 88 <Loaded Value="True"/> 89 89 </Unit3> … … 92 92 <IsPartOfProject Value="True"/> 93 93 <UnitName Value="UCompiler"/> 94 <IsVisibleTab Value="True"/>95 94 <EditorIndex Value="14"/> 96 95 <WindowIndex Value="0"/> 97 <TopLine Value="3 4"/>98 <CursorPos X=" 68" Y="51"/>99 <UsageCount Value="15 2"/>96 <TopLine Value="38"/> 97 <CursorPos X="1" Y="51"/> 98 <UsageCount Value="155"/> 100 99 <Loaded Value="True"/> 101 100 </Unit4> … … 108 107 <TopLine Value="179"/> 109 108 <CursorPos X="3" Y="196"/> 110 <UsageCount Value="15 2"/>109 <UsageCount Value="155"/> 111 110 <Loaded Value="True"/> 112 111 </Unit5> … … 119 118 <TopLine Value="1"/> 120 119 <CursorPos X="38" Y="12"/> 121 <UsageCount Value="15 2"/>120 <UsageCount Value="155"/> 122 121 <Loaded Value="True"/> 123 122 </Unit6> … … 128 127 <EditorIndex Value="13"/> 129 128 <WindowIndex Value="0"/> 130 <TopLine Value=" 104"/>131 <CursorPos X=" 52" Y="119"/>132 <UsageCount Value="15 2"/>129 <TopLine Value="294"/> 130 <CursorPos X="1" Y="307"/> 131 <UsageCount Value="155"/> 133 132 <Loaded Value="True"/> 134 133 </Unit7> … … 139 138 <EditorIndex Value="0"/> 140 139 <WindowIndex Value="0"/> 141 <TopLine Value=" 42"/>142 <CursorPos X=" 26" Y="55"/>143 <UsageCount Value="15 2"/>140 <TopLine Value="665"/> 141 <CursorPos X="1" Y="678"/> 142 <UsageCount Value="155"/> 144 143 <Loaded Value="True"/> 145 144 </Unit8> … … 159 158 <TopLine Value="936"/> 160 159 <CursorPos X="23" Y="949"/> 161 <UsageCount Value="1 2"/>160 <UsageCount Value="13"/> 162 161 <Loaded Value="True"/> 163 162 </Unit10> … … 168 167 <TopLine Value="61"/> 169 168 <CursorPos X="7" Y="68"/> 170 <UsageCount Value=" 59"/>169 <UsageCount Value="60"/> 171 170 <Loaded Value="True"/> 172 171 </Unit11> … … 177 176 <TopLine Value="139"/> 178 177 <CursorPos X="16" Y="146"/> 179 <UsageCount Value=" 59"/>178 <UsageCount Value="60"/> 180 179 <Loaded Value="True"/> 181 180 </Unit12> … … 207 206 <EditorIndex Value="2"/> 208 207 <WindowIndex Value="0"/> 209 <TopLine Value=" 277"/>210 <CursorPos X=" 26" Y="291"/>211 <UsageCount Value="11 4"/>208 <TopLine Value="4"/> 209 <CursorPos X="53" Y="33"/> 210 <UsageCount Value="117"/> 212 211 <Loaded Value="True"/> 213 212 </Unit16> … … 235 234 <TopLine Value="141"/> 236 235 <CursorPos X="1" Y="154"/> 237 <UsageCount Value=" 68"/>236 <UsageCount Value="71"/> 238 237 <Loaded Value="True"/> 239 238 </Unit19> … … 244 243 <EditorIndex Value="11"/> 245 244 <WindowIndex Value="0"/> 246 <TopLine Value="1 29"/>247 <CursorPos X=" 1" Y="151"/>248 <UsageCount Value="2 4"/>245 <TopLine Value="116"/> 246 <CursorPos X="41" Y="119"/> 247 <UsageCount Value="27"/> 249 248 <Loaded Value="True"/> 250 249 </Unit20> … … 255 254 <TopLine Value="17"/> 256 255 <CursorPos X="11" Y="30"/> 257 <UsageCount Value="1 2"/>256 <UsageCount Value="13"/> 258 257 <Loaded Value="True"/> 259 258 </Unit21> 260 259 </Units> 261 <JumpHistory Count="30" HistoryIndex="2 2">260 <JumpHistory Count="30" HistoryIndex="29"> 262 261 <Position1> 263 <Filename Value=" Forms\UMainForm.pas"/>264 <Caret Line="1 24" Column="1" TopLine="110"/>262 <Filename Value="Analyze\UParser.pas"/> 263 <Caret Line="1170" Column="1" TopLine="1152"/> 265 264 </Position1> 266 265 <Position2> 267 266 <Filename Value="Analyze\UParser.pas"/> 268 <Caret Line=" 61" Column="1" TopLine="48"/>267 <Caret Line="1171" Column="1" TopLine="1152"/> 269 268 </Position2> 270 269 <Position3> 271 270 <Filename Value="Analyze\UParser.pas"/> 272 <Caret Line=" 838" Column="25" TopLine="816"/>271 <Caret Line="1172" Column="1" TopLine="1152"/> 273 272 </Position3> 274 273 <Position4> 275 274 <Filename Value="Analyze\UParser.pas"/> 276 <Caret Line=" 59" Column="35" TopLine="45"/>275 <Caret Line="353" Column="1" TopLine="340"/> 277 276 </Position4> 278 277 <Position5> 279 278 <Filename Value="Analyze\UParser.pas"/> 280 <Caret Line=" 741" Column="38" TopLine="728"/>279 <Caret Line="354" Column="1" TopLine="340"/> 281 280 </Position5> 282 281 <Position6> 283 282 <Filename Value="Analyze\UParser.pas"/> 284 <Caret Line=" 732" Column="32" TopLine="719"/>283 <Caret Line="355" Column="1" TopLine="340"/> 285 284 </Position6> 286 285 <Position7> 287 286 <Filename Value="Analyze\UParser.pas"/> 288 <Caret Line=" 703" Column="1" TopLine="700"/>287 <Caret Line="356" Column="1" TopLine="340"/> 289 288 </Position7> 290 289 <Position8> 291 290 <Filename Value="Analyze\UParser.pas"/> 292 <Caret Line=" 742" Column="36" TopLine="724"/>291 <Caret Line="357" Column="1" TopLine="340"/> 293 292 </Position8> 294 293 <Position9> 295 <Filename Value=" Forms\UMainForm.pas"/>296 <Caret Line=" 147" Column="74" TopLine="141"/>294 <Filename Value="Analyze\UParser.pas"/> 295 <Caret Line="358" Column="1" TopLine="340"/> 297 296 </Position9> 298 297 <Position10> 299 <Filename Value=" Forms\UMainForm.pas"/>300 <Caret Line=" 58" Column="3" TopLine="66"/>298 <Filename Value="Analyze\UParser.pas"/> 299 <Caret Line="359" Column="1" TopLine="340"/> 301 300 </Position10> 302 301 <Position11> 303 <Filename Value=" Forms\UMainForm.pas"/>304 <Caret Line=" 81" Column="1" TopLine="66"/>302 <Filename Value="Analyze\UParser.pas"/> 303 <Caret Line="364" Column="1" TopLine="343"/> 305 304 </Position11> 306 305 <Position12> 307 <Filename Value=" Forms\UMainForm.pas"/>308 <Caret Line=" 82" Column="1" TopLine="66"/>306 <Filename Value="Analyze\UParser.pas"/> 307 <Caret Line="354" Column="1" TopLine="343"/> 309 308 </Position12> 310 309 <Position13> 311 <Filename Value=" Forms\UMainForm.pas"/>312 <Caret Line=" 83" Column="1" TopLine="66"/>310 <Filename Value="Analyze\UParser.pas"/> 311 <Caret Line="367" Column="1" TopLine="346"/> 313 312 </Position13> 314 313 <Position14> 315 <Filename Value=" Forms\UMainForm.pas"/>316 <Caret Line=" 84" Column="1" TopLine="66"/>314 <Filename Value="Analyze\UParser.pas"/> 315 <Caret Line="368" Column="1" TopLine="347"/> 317 316 </Position14> 318 317 <Position15> 319 <Filename Value=" Forms\UMainForm.pas"/>320 <Caret Line=" 85" Column="1" TopLine="66"/>318 <Filename Value="Analyze\UParser.pas"/> 319 <Caret Line="354" Column="1" TopLine="347"/> 321 320 </Position15> 322 321 <Position16> 323 <Filename Value=" UProject.pas"/>324 <Caret Line=" 150" Column="1" TopLine="129"/>322 <Filename Value="Analyze\UParser.pas"/> 323 <Caret Line="353" Column="1" TopLine="347"/> 325 324 </Position16> 326 325 <Position17> 327 <Filename Value=" UProject.pas"/>328 <Caret Line=" 151" Column="1" TopLine="129"/>326 <Filename Value="Analyze\UParser.pas"/> 327 <Caret Line="370" Column="1" TopLine="349"/> 329 328 </Position17> 330 329 <Position18> 331 <Filename Value=" UCompiler.pas"/>332 <Caret Line=" 47" Column="1" TopLine="34"/>330 <Filename Value="Analyze\UParser.pas"/> 331 <Caret Line="353" Column="1" TopLine="348"/> 333 332 </Position18> 334 333 <Position19> 335 <Filename Value=" UCompiler.pas"/>336 <Caret Line=" 48" Column="1" TopLine="34"/>334 <Filename Value="Analyze\UParser.pas"/> 335 <Caret Line="370" Column="1" TopLine="349"/> 337 336 </Position19> 338 337 <Position20> 339 <Filename Value=" UCompiler.pas"/>340 <Caret Line=" 49" Column="1" TopLine="34"/>338 <Filename Value="Analyze\UParser.pas"/> 339 <Caret Line="1165" Column="1" TopLine="1152"/> 341 340 </Position20> 342 341 <Position21> 343 <Filename Value=" UCompiler.pas"/>344 <Caret Line=" 50" Column="1" TopLine="34"/>342 <Filename Value="Analyze\UParser.pas"/> 343 <Caret Line="1176" Column="1" TopLine="1155"/> 345 344 </Position21> 346 345 <Position22> 347 <Filename Value=" UCompiler.pas"/>348 <Caret Line=" 51" Column="1" TopLine="34"/>346 <Filename Value="Analyze\UParser.pas"/> 347 <Caret Line="1155" Column="1" TopLine="1142"/> 349 348 </Position22> 350 349 <Position23> 351 <Filename Value=" UCompiler.pas"/>352 <Caret Line=" 52" Column="1" TopLine="34"/>350 <Filename Value="Analyze\UParser.pas"/> 351 <Caret Line="1177" Column="1" TopLine="1155"/> 353 352 </Position23> 354 353 <Position24> 355 <Filename Value=" Produce\UProducerPascal.pas"/>356 <Caret Line="1 54" Column="1" TopLine="141"/>354 <Filename Value="Analyze\UParser.pas"/> 355 <Caret Line="1155" Column="1" TopLine="1142"/> 357 356 </Position24> 358 357 <Position25> 359 <Filename Value=" Produce\UProducerPascal.pas"/>360 <Caret Line="1 55" Column="1" TopLine="141"/>358 <Filename Value="Analyze\UParser.pas"/> 359 <Caret Line="1177" Column="1" TopLine="1155"/> 361 360 </Position25> 362 361 <Position26> 363 <Filename Value=" Produce\UProducerPascal.pas"/>364 <Caret Line=" 156" Column="1" TopLine="141"/>362 <Filename Value="Analyze\UParser.pas"/> 363 <Caret Line="695" Column="1" TopLine="682"/> 365 364 </Position26> 366 365 <Position27> 367 <Filename Value=" Produce\UProducerPascal.pas"/>368 <Caret Line=" 85" Column="1" TopLine="72"/>366 <Filename Value="Analyze\UParser.pas"/> 367 <Caret Line="684" Column="1" TopLine="679"/> 369 368 </Position27> 370 369 <Position28> 371 <Filename Value=" Produce\UProducerPascal.pas"/>372 <Caret Line=" 86" Column="1" TopLine="72"/>370 <Filename Value="Analyze\UParser.pas"/> 371 <Caret Line="697" Column="1" TopLine="679"/> 373 372 </Position28> 374 373 <Position29> 375 <Filename Value=" Produce\UProducerPascal.pas"/>376 <Caret Line=" 95" Column="1" TopLine="74"/>374 <Filename Value="Analyze\UParser.pas"/> 375 <Caret Line="684" Column="1" TopLine="679"/> 377 376 </Position29> 378 377 <Position30> 379 <Filename Value=" Produce\UProducerPascal.pas"/>380 <Caret Line=" 86" Column="7" TopLine="75"/>378 <Filename Value="Analyze\UParser.pas"/> 379 <Caret Line="697" Column="1" TopLine="679"/> 381 380 </Position30> 382 381 </JumpHistory> … … 386 385 <PathDelim Value="\"/> 387 386 <SearchPaths> 388 <IncludeFiles Value="Analyze \;Produce\"/>389 <OtherUnitFiles Value="Analyze \;Produce\;Visual\;Forms\"/>387 <IncludeFiles Value="Analyze;Produce"/> 388 <OtherUnitFiles Value="Analyze;Produce;Visual;Forms"/> 390 389 <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> 391 390 </SearchPaths> … … 419 418 </CompilerOptions> 420 419 <Debugging> 421 <BreakPoints Count="1">422 <Item1>423 <Source Value="Forms\UMainForm.pas"/>424 <Line Value="81"/>425 </Item1>426 </BreakPoints>427 420 <Exceptions Count="3"> 428 421 <Item1> -
branches/Transpascal/UCompiler.pas
r58 r59 49 49 Parser.SourceCodeText := Source; 50 50 Parser.Init; 51 NewModule := Parser.ParseModule ;51 NewModule := Parser.ParseModule(ProgramCode); 52 52 ProgramCode.Modules.Add(NewModule); 53 53 Producer.Produce(NewModule, ProducedCode); -
branches/Transpascal/USourceCode.pas
r55 r59 33 33 TConstant = class; 34 34 TModule = class; 35 TProgram = class; 35 36 36 37 TDevice = class … … 268 269 269 270 TUsedModuleList = class(TObjectList) 271 ParentModule: TModule; 270 272 end; 271 273 272 274 TModule = class 273 275 public 276 ParentProgram: TProgram; 274 277 Name: string; 275 278 constructor Create; … … 731 734 inherited; 732 735 UsedModules := TUsedModuleList.Create; 736 UsedModules.ParentModule := Self; 733 737 Body := TCommonBlock.Create; 734 738 end; … … 746 750 begin 747 751 ImplementationSection := TUnitImplementation.Create; 752 ImplementationSection.UsedModules.ParentModule := Self; 748 753 InterfaceSection := TUnitInterface.Create; 754 InterfaceSection.UsedModules.ParentModule := Self; 749 755 end; 750 756
Note:
See TracChangeset
for help on using the changeset viewer.