Changeset 42 for branches/DelphiToC/UPascalSource.pas
- Timestamp:
- Aug 5, 2010, 3:13:03 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DelphiToC/UPascalSource.pas
r41 r42 45 45 46 46 TCommand = class 47 Parent: TObject; 47 48 CommonBlock: TCommonBlock; 48 49 end; … … 56 57 57 58 TMethodCall = class(TCommand) 58 Method: T Method;59 Method: TFunction; 59 60 end; 60 61 … … 91 92 end; 92 93 94 { TIfThenElse } 95 93 96 TIfThenElse = class(TCommand) 94 97 Condition: TExpression; 95 98 Command: TCommand; 96 99 ElseCommand: TCommand; 100 constructor Create; 101 destructor Destroy; override; 97 102 end; 98 103 … … 322 327 begin 323 328 I := 0; 324 while (I < Count) and ( TConstant(Items[I]).Name<> Name) do Inc(I);329 while (I < Count) and (LowerCase(TConstant(Items[I]).Name) <> Name) do Inc(I); 325 330 if I < Count then Result := TConstant(Items[I]) else begin 326 331 if Assigned(Parent.Parent) then Result := Parent.Parent.Constants.Search(Name) … … 377 382 Methods.Parent := Self; 378 383 Code := TBeginEnd.Create; 384 Code.Parent := Self; 379 385 Code.CommonBlock := Self; 380 386 end; … … 402 408 begin 403 409 I := 0; 404 while (I < Count) and ( TType(Items[I]).Name<> Name) do Inc(I);410 while (I < Count) and (LowerCase(TType(Items[I]).Name) <> Name) do Inc(I); 405 411 if I < Count then Result := TType(Items[I]) else begin 406 412 if Assigned(Parent.Parent) then Result := Parent.Parent.Types.Search(Name) … … 423 429 begin 424 430 I := 0; 425 while (I < Count) and ( TVariable(Items[I]).Name<> Name) do Inc(I);431 while (I < Count) and (LowerCase(TVariable(Items[I]).Name) <> Name) do Inc(I); 426 432 if I < Count then Result := TVariable(Items[I]) else begin 427 433 if Assigned(Parent.Parent) then … … 448 454 begin 449 455 I := 0; 450 while (I < Count) and ( TFunction(Items[I]).Name<> Name) do Inc(I);456 while (I < Count) and (LowerCase(TFunction(Items[I]).Name) <> Name) do Inc(I); 451 457 if I < Count then Result := TFunction(Items[I]) else begin 452 458 if Assigned(Parent.Parent) then Result := Parent.Parent.Methods.Search(Name) … … 487 493 488 494 destructor TOperationList.Destroy; 489 var 490 I: Integer; 491 begin 492 for I := 0 to Count - 1 do 493 TOperation(Items[I]).Free; 495 begin 494 496 inherited; 495 497 end; … … 536 538 constructor TBeginEnd.Create; 537 539 begin 540 inherited; 538 541 Commands := TCommandList.Create; 539 542 end; … … 587 590 end; 588 591 592 { TIfThenElse } 593 594 constructor TIfThenElse.Create; 595 begin 596 Condition := TExpression.Create; 597 end; 598 599 destructor TIfThenElse.Destroy; 600 begin 601 Condition.Destroy; 602 inherited Destroy; 603 end; 604 589 605 end. 590 606
Note:
See TracChangeset
for help on using the changeset viewer.