Changeset 63 for trunk/Compiler/Analyze/UAnalyzerPascal.pas
- Timestamp:
- Jul 17, 2012, 10:54:18 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Compiler/Analyze/UAnalyzerPascal.pas
r62 r63 76 76 SUnitNotFound = 'Unit "%s" not found.'; 77 77 SFunctionNotDeclared = 'Function "%s" not declared.'; 78 SFunctionRedefinition = 'Function "%s" redefined.'; 78 79 SUnknownProcName = 'Unknown proc name "%s".'; 79 80 SUnknownModuleType = 'Unknown module name "%s".'; … … 703 704 end; 704 705 end else begin 705 // Create new function 706 UseFunction := TFunction.Create; 707 UseFunction.Parent := SourceCode.Parent; 708 UseFunction.Name := UseName; 709 UseFunction.FunctionType := FunctionType; 710 UseFunction.Exported := Exported; 711 Add(UseFunction); 712 UseFunction.Parent.Order.Add(UseFunction); 713 ValidParams := False; 706 UseFunction := SourceCode.Search(UseName, True); 707 if not Assigned(UseFunction) then begin 708 // Create new function 709 UseFunction := TFunction.Create; 710 UseFunction.Parent := SourceCode.Parent; 711 UseFunction.Name := UseName; 712 UseFunction.FunctionType := FunctionType; 713 UseFunction.Exported := Exported; 714 Add(UseFunction); 715 UseFunction.Parent.Order.Add(UseFunction); 716 ValidParams := False; 717 end else begin 718 if not UseFunction.BodyLoaded then UseFunction.BodyLoaded := True 719 else begin 720 ErrorMessage(SFunctionRedefinition, [UseName]); 721 Exit; 722 end; 723 end; 714 724 end; 715 725 with UseFunction do begin
Note:
See TracChangeset
for help on using the changeset viewer.