Changeset 18 for trunk/Compiler/Produce/UProducerPascal.pas
- Timestamp:
- Nov 9, 2010, 8:10:12 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Compiler/Produce/UProducerPascal.pas
r17 r18 123 123 begin 124 124 if AType is TTypeRecord then begin 125 EmitLn( AType.Name + ' ' + AssignSymbol + 'record');125 EmitLn('record'); 126 126 Inc(Indetation); 127 for I := 0 to TTypeRecord(AType).CommonBlock.Types.Count - 1 do begin 128 GenerateType(TType(TTypeRecord(AType).CommonBlock.Types[I])); 127 with TTypeRecord(AType).CommonBlock do 128 for I := 0 to Variables.Count - 1 do begin 129 Emit(Variables[I].Name + ': '); 130 GenerateType(Variables[I].ValueType); 129 131 EmitLn(';'); 130 132 end; … … 132 134 Emit('end'); 133 135 end else 136 if AType is TTypeSubRange then begin 137 Emit(TTypeSubRange(AType).Bottom + '..' + TTypeSubRange(AType).Top); 138 end else 134 139 if AType is TTypeArray then begin 135 Emit( AType.Name + ' ' + AssignSymbol + 'array ');140 Emit('array '); 136 141 if Assigned(TTypeArray(AType).IndexType) then begin 137 142 Emit('['); … … 142 147 if Assigned(TTypeArray(AType).ItemType) then 143 148 GenerateType(TTypeArray(AType).ItemType); 149 end else 150 if AType is TTypePointer then begin 151 Emit('^' + TTypePointer(AType).UsedType.Name); 144 152 end else begin 145 153 Emit(AType.Name); 146 if Assigned(AType.UsedType) then begin 147 Emit(' ' + AssignSymbol + ' '); 154 if AType.Name = '' then begin 148 155 GenerateType(AType.UsedType); 149 156 end; … … 161 168 with TType(Types[I]) do 162 169 if (not Internal) then begin 163 GenerateType(TType(Types[I]), '='); 170 Emit(TType(Types[I]).Name + ' = '); 171 GenerateType(TType(Types[I])); 164 172 EmitLn(';'); 165 173 end;
Note:
See TracChangeset
for help on using the changeset viewer.