Changeset 71 for branches/Transpascal/Compiler/Analyze/UPascalParser.pas
- Timestamp:
- Oct 19, 2010, 1:11:59 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Transpascal/Compiler/Analyze/UPascalParser.pas
r70 r71 6 6 7 7 uses 8 Classes, SysUtils, UParser, USourceCode ;8 Classes, SysUtils, UParser, USourceCode, Dialogs; 9 9 10 10 type … … 61 61 Parser.ProgramCode := ProgramCode; 62 62 Parser.OnGetSource := OnGetSource; 63 if Assigned( FOnGetSource) then begin63 if Assigned(OnGetSource) then begin 64 64 if FOnGetSource(Name, Parser.SourceCodeText) then begin 65 65 Parser.Init; … … 948 948 Module := SourceCode.ParentModule.ParentProgram.Modules.Search(Name); 949 949 Exported := AExported; 950 end else ErrorMessage(SUnitNotFound, [Name]); 950 end else begin 951 ErrorMessage(SUnitNotFound, [Name]); 952 SourceCode.Delete(SourceCode.Count - 1); 953 end; 951 954 end; 952 955 end; … … 962 965 Module := SourceCode.ParentModule.ParentProgram.Modules.Search(Name); 963 966 if not Assigned(Module) then begin 964 if not ParseFile(Name) then ErrorMessage(SUnitNotFound, [Name]); 967 if not ParseFile(Name) then begin 968 ErrorMessage(SUnitNotFound, [Name]); 969 SourceCode.Delete(SourceCode.Count - 1); 970 end; 965 971 end; 966 972 end;
Note:
See TracChangeset
for help on using the changeset viewer.