Changeset 19 for branches/DelphiToC/UPascalSource.pas
- Timestamp:
- Apr 9, 2009, 2:08:56 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DelphiToC/UPascalSource.pas
r14 r19 17 17 TNodeType = (ntNone, ntVariable, ntFunction, ntConstant, ntOperator); 18 18 19 TValue = array of Byte;19 TValue = Variant; //array of Byte; 20 20 21 21 TCommonBlock = class; … … 28 28 TOperationList = class; 29 29 TFunction = class; 30 TVariable = class; 31 TConstant = class; 30 32 31 33 TDevice = class 32 34 Family: string; 33 35 Memory: array[TMemoryType] of Integer; 36 end; 37 38 TContext = class 39 40 end; 41 42 TCommandList = class; 43 44 TCommand = class 45 46 end; 47 48 TBeginEnd = class(TCommand) 49 Commands: TCommandList; 50 end; 51 52 TWhileDo = class(TCommand) 53 Condition: TExpression; 54 Command: TCommand; 55 end; 56 57 WithDo = class(TCommand) 58 Context: TContext; 59 Command: TCommand; 60 end; 61 62 RepeatUntil = class(TCommand) 63 Block: TCommandList; 64 Condition: TExpression; 65 end; 66 67 ForToDo = class(TCommand) 68 ControlVariable: TVariable; 69 Start: TExpression; 70 Stop: TExpression; 71 Command: TCommand; 72 end; 73 74 IfThenElse = class(TCommand) 75 Condition: TExpression; 76 Command: TCommand; 77 ElseCommand: TCommand; 78 end; 79 80 TCaseOfEndBranche = class 81 Constant: TConstant; 82 Command: TCommand; 83 end; 84 85 CaseOfEnd = class(TCommand) 86 Expression: TExpression; 87 Branches: TList; // TList<TCaseOfEndBranche> 88 ElseCommand: TCommand; 89 end; 90 91 TryFinally = class(TCommand) 92 Block: TCommandList; 93 FinallyBlock: TCommandList; 94 end; 95 96 TryExcept = class(TCommand) 97 Block: TCommandList; 98 ExceptBlock: TCommandList; 99 end; 100 101 102 103 TCommandList = class(TList) 104 34 105 end; 35 106 … … 54 125 end; 55 126 127 TTypeRecordItem = class 128 Name: string; 129 DataType: TType; 130 end; 131 132 TTypeRecord = class 133 Items: TList; // TList<TTypeRecordItem> 134 end; 135 136 TTypeArray = class 137 //Range: TTypeRange; 138 ItemType: TType; 139 end; 140 56 141 TTypeList = class(TList) 57 142 Parent: TCommonBlock; … … 100 185 end; 101 186 102 103 187 TOperation = class 104 188 Instruction: TInstruction; … … 125 209 Parent: TCommonBlock; 126 210 function Search(Name: string): TFunction; 211 destructor Destroy; override; 127 212 end; 128 213 … … 331 416 { TFunctionList } 332 417 418 destructor TFunctionList.Destroy; 419 var 420 I: Integer; 421 begin 422 for I := 0 to Count - 1 do 423 TFunction(Items[I]).Free; 424 inherited; 425 end; 426 333 427 function TFunctionList.Search(Name: string): TFunction; 334 428 var
Note:
See TracChangeset
for help on using the changeset viewer.