Changeset 48 for branches/DelphiToC/UPascalSource.pas
- Timestamp:
- Aug 9, 2010, 1:53:33 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DelphiToC/UPascalSource.pas
r47 r48 57 57 end; 58 58 59 { TFunctionCall } 60 59 61 TFunctionCall = class(TCommand) 60 62 FunctionRef: TFunction; 63 ParameterExpression: TObjectList; // TObjectList<TExpression> 64 constructor Create; 65 destructor Destroy; override; 61 66 end; 62 67 … … 136 141 Types: TTypeList; 137 142 Variables: TVariableList; 138 Methods: TFunctionList;143 Functions: TFunctionList; 139 144 Code: TBeginEnd; 140 145 constructor Create; virtual; … … 349 354 Variables.Clear; 350 355 Constants.Clear; 351 Methods.Clear;356 Functions.Clear; 352 357 Code.Clear; 353 358 end; … … 386 391 Variables := TVariableList.Create; 387 392 Variables.Parent := Self; 388 Methods := TFunctionList.Create;389 Methods.Parent := Self;393 Functions := TFunctionList.Create; 394 Functions.Parent := Self; 390 395 Code := TBeginEnd.Create; 391 396 Code.Parent := Self; … … 398 403 Types.Destroy; 399 404 Variables.Destroy; 400 Methods.Destroy;405 Functions.Destroy; 401 406 Code.Destroy; 402 407 inherited; … … 416 421 I := 0; 417 422 while (I < Count) and (LowerCase(TType(Items[I]).Name) <> LowerCase(Name)) do Inc(I); 418 if I < Count then Result := TType(Items[I]) else begin 419 if Assigned(Parent.Parent) then Result := Parent.Parent.Types.Search(Name) 420 else begin 421 Result := nil; 422 end; 423 end; 423 if I < Count then Result := TType(Items[I]) else Result := nil; 424 425 if not Assigned(Result) and Assigned(Parent.Parent) then 426 Result := Parent.Parent.Types.Search(Name); 424 427 end; 425 428 … … 477 480 while (I < Count) and (LowerCase(TFunction(Items[I]).Name) <> LowerCase(Name)) do Inc(I); 478 481 if I < Count then Result := TFunction(Items[I]) else begin 479 if Assigned(Parent.Parent) then Result := Parent.Parent. Methods.Search(Name)482 if Assigned(Parent.Parent) then Result := Parent.Parent.Functions.Search(Name) 480 483 else begin 481 484 Result := nil; … … 624 627 end; 625 628 629 { TFunctionCall } 630 631 constructor TFunctionCall.Create; 632 begin 633 inherited; 634 ParameterExpression := TObjectList.Create; 635 end; 636 637 destructor TFunctionCall.Destroy; 638 begin 639 ParameterExpression.Free; 640 inherited Destroy; 641 end; 642 626 643 end. 627 644
Note:
See TracChangeset
for help on using the changeset viewer.