Changeset 43 for branches/DelphiToC/Produce/UCSource.pas
- Timestamp:
- Aug 5, 2010, 4:17:18 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DelphiToC/Produce/UCSource.pas
r42 r43 18 18 function TranslateOperator(Name: string): string; 19 19 procedure Emit(Text: string); 20 procedure GenerateUses(UsedModules: TUsedModuleList); 21 procedure GenerateModule(Module: TModule); 20 22 procedure GenerateCommonBlock(CommonBlock: TCommonBlock; 21 23 LabelPrefix: string); … … 80 82 end; 81 83 84 procedure TCProducer.GenerateUses(UsedModules: TUsedModuleList); 85 var 86 I: Integer; 87 begin 88 for I := 0 to UsedModules.Count - 1 do 89 Emit('#include "' + TUsedModule(UsedModules[I]).Name + '.h"'); 90 Emit(''); 91 end; 92 93 procedure TCProducer.GenerateModule(Module: TModule); 94 begin 95 GenerateUses(Module.UsedModules); 96 GenerateCommonBlock(Module, ''); 97 end; 98 82 99 procedure TCProducer.Produce; 83 100 begin … … 94 111 with ProgramBlock do 95 112 for I := 0 to Modules.Count - 1 do 96 Generate CommonBlock(TModule(Modules[I]), '');113 GenerateModule(TModule(Modules[I])); 97 114 end; 98 115
Note:
See TracChangeset
for help on using the changeset viewer.