Changeset 75 for trunk/Compiler/Analyzer.pas
- Timestamp:
- Jun 4, 2024, 12:22:49 AM (5 months ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Compiler/Analyzer.pas
r74 r75 1 unit UAnalyzer; 2 3 {$MODE Delphi} 4 {$MACRO ON} 1 unit Analyzer; 5 2 6 3 interface 7 4 8 5 uses 9 SysUtils, Variants, Classes, Contnrs,10 Dialogs, USourceCodePascal, FileUtil, SpecializedList;6 SysUtils, Variants, Classes, Dialogs, SourceCodePascal, FileUtil, 7 Generics.Collections; 11 8 12 9 type … … 54 51 CodePosition: TPoint; 55 52 SourceCode2: string; 56 Tokens: TObjectList ; // TObjectList<TToken>53 Tokens: TObjectList<TToken>; 57 54 TokenIndex: Integer; 58 55 constructor Create; … … 83 80 end; 84 81 85 { T ListAnalyzer}86 87 T ListAnalyzer = class(TListObject)82 { TAnalyzers } 83 84 TAnalyzers = class(TObjectList<TAnalyzer>) 88 85 function SearchBySysName(Name: string): TAnalyzer; 89 86 procedure LoadToStrings(Strings: TStrings); … … 93 90 SExpectedButFound = 'Expected "%s" but "%s" found.'; 94 91 92 95 93 implementation 96 94 97 { T ListAnalyzer}98 99 function T ListAnalyzer.SearchBySysName(Name: string): TAnalyzer;95 { TAnalyzers } 96 97 function TAnalyzers.SearchBySysName(Name: string): TAnalyzer; 100 98 var 101 99 I: Integer; … … 107 105 end; 108 106 109 procedure T ListAnalyzer.LoadToStrings(Strings: TStrings);107 procedure TAnalyzers.LoadToStrings(Strings: TStrings); 110 108 var 111 109 I: Integer; … … 154 152 constructor TAnalyzer.Create; 155 153 begin 156 Tokens := TObjectList .Create;154 Tokens := TObjectList<TToken>.Create; 157 155 {$IFDEF windows} 158 156 LineEndingChar := LineEnding[1]; … … 164 162 destructor TAnalyzer.Destroy; 165 163 begin 166 Tokens.Free;167 inherited Destroy;164 FreeAndNil(Tokens); 165 inherited; 168 166 end; 169 167
Note:
See TracChangeset
for help on using the changeset viewer.