Changeset 51 for trunk/Compiler
- Timestamp:
- Apr 6, 2012, 9:43:56 AM (13 years ago)
- Location:
- trunk/Compiler
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Compiler/Analyze/UAnalyzerPascal.pas
r26 r51 424 424 ParseCommonBlock(Body, '.'); 425 425 SourceCode.ParentProgram.Modules.Add(SourceCode); 426 ProgramCode.MainModule := SourceCode; 426 427 Result := True; 427 428 end; -
trunk/Compiler/Target/Interpretter/UTargetInterpretter.pas
r50 r51 127 127 procedure TExecutorInterpretter.Run; 128 128 begin 129 ShowMessage(TModuleProgram(TCompiler(TTarget(Target).Compiler).Analyzer.ProgramCode.M odules[0]).Name);130 with TModuleProgram(TCompiler(TTarget(Target).Compiler).Analyzer.ProgramCode.M odules[0]) do begin129 ShowMessage(TModuleProgram(TCompiler(TTarget(Target).Compiler).Analyzer.ProgramCode.MainModule).Name); 130 with TModuleProgram(TCompiler(TTarget(Target).Compiler).Analyzer.ProgramCode.MainModule) do begin 131 131 RunBeginEnd(Body.Code); 132 132 end; -
trunk/Compiler/UCompiler.pas
r50 r51 37 37 TargetFolder: string; 38 38 Targets: TListTarget; 39 MainSource: string; 39 40 SourceFiles: TListString; 40 41 TargetFiles: TListString; … … 84 85 begin 85 86 ErrorMessages.Clear; 86 AbstractCode. Modules.Clear;87 AbstractCode.Clear; 87 88 end; 88 89 … … 169 170 procedure TCompiler.AnalyzeAll; 170 171 begin 171 if SourceFiles.Count > 0then begin172 Analyzer.FileName := SourceFiles[0];172 if (SourceFiles.Count > 0) then begin 173 Analyzer.FileName := MainSource; 173 174 Analyzer.OnGetSource(ExtractFileNameOnly(Analyzer.FileName), Analyzer.SourceCode); 174 175 Analyzer.Process; -
trunk/Compiler/USourceCode.pas
r30 r51 380 380 end; 381 381 382 { TProgram } 383 382 384 TProgram = class 383 385 Device: TDevice; 384 386 Modules: TModuleList; 387 MainModule: TModule; 388 procedure Clear; 385 389 constructor Create; 386 390 destructor Destroy; override; … … 421 425 422 426 { TProgram } 427 428 procedure TProgram.Clear; 429 begin 430 Modules.Clear; 431 MainModule := nil; 432 end; 423 433 424 434 constructor TProgram.Create;
Note:
See TracChangeset
for help on using the changeset viewer.