Changeset 14 for branches/DelphiToC/UPascalSource.pas
- Timestamp:
- Apr 9, 2009, 11:04:41 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DelphiToC/UPascalSource.pas
r13 r14 24 24 TVariableList = class; 25 25 TFunctionList = class; 26 TExpressionList = class; 26 27 TExpression = class; 27 28 TOperationList = class; … … 56 57 Parent: TCommonBlock; 57 58 function Search(Name: string): TType; 59 destructor Destroy; override; 58 60 end; 59 61 … … 67 69 Parent: TCommonBlock; 68 70 function Search(Name: string): TConstant; 71 destructor Destroy; override; 69 72 end; 70 73 … … 78 81 Parent: TCommonBlock; 79 82 function Search(Name: string): TVariable; 83 destructor Destroy; override; 80 84 end; 81 85 … … 86 90 Value: TValue; 87 91 OperatorName: string; 88 SubItems: T List; // TList<TExpression>92 SubItems: TExpressionList; 89 93 Associated: Boolean; 90 94 constructor Create; 91 95 destructor Destroy; override; 92 96 end; 97 98 TExpressionList = class(TList) 99 destructor Destroy; override; 100 end; 101 93 102 94 103 TOperation = class … … 177 186 for I := 0 to Modules.Count - 1 do 178 187 TModule(Modules[I]).Free; 188 Modules.Free; 179 189 Device.Free; 180 190 end; … … 184 194 185 195 { TConstantList } 196 197 destructor TConstantList.Destroy; 198 var 199 I: Integer; 200 begin 201 for I := 0 to Count - 1 do 202 TConstant(Items[I]).Free; 203 inherited; 204 end; 186 205 187 206 function TConstantList.Search(Name: string): TConstant; … … 257 276 { TTypeList } 258 277 278 destructor TTypeList.Destroy; 279 var 280 I: Integer; 281 begin 282 for I := 0 to Count - 1 do 283 TType(Items[I]).Free; 284 inherited; 285 end; 286 259 287 function TTypeList.Search(Name: string): TType; 260 288 var … … 273 301 { TVariableList } 274 302 303 destructor TVariableList.Destroy; 304 var 305 I: Integer; 306 begin 307 for I := 0 to Count - 1 do 308 TVariable(Items[I]).Free; 309 inherited; 310 end; 311 275 312 function TVariableList.Search(Name: string): TVariable; 276 313 var … … 312 349 constructor TExpression.Create; 313 350 begin 314 SubItems := T List.Create;351 SubItems := TExpressionList.Create; 315 352 SubItems.Count := 2; 316 353 end; … … 318 355 destructor TExpression.Destroy; 319 356 begin 320 SubItems. Destroy;357 SubItems.Free; 321 358 inherited; 322 359 end; … … 341 378 end; 342 379 380 { TExpressionList } 381 382 destructor TExpressionList.Destroy; 383 var 384 I: Integer; 385 begin 386 for I := 0 to Count - 1 do 387 TExpression(Items[I]).Free; 388 inherited; 389 end; 390 343 391 end. 344 392
Note:
See TracChangeset
for help on using the changeset viewer.