Ignore:
Timestamp:
Aug 5, 2010, 4:17:18 PM (14 years ago)
Author:
george
Message:

End parsing process on reaching data end.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DelphiToC/Produce/UCSource.pas

    r42 r43  
    1818    function TranslateOperator(Name: string): string;
    1919    procedure Emit(Text: string);
     20    procedure GenerateUses(UsedModules: TUsedModuleList);
     21    procedure GenerateModule(Module: TModule);
    2022    procedure GenerateCommonBlock(CommonBlock: TCommonBlock;
    2123      LabelPrefix: string);
     
    8082end;
    8183
     84procedure TCProducer.GenerateUses(UsedModules: TUsedModuleList);
     85var
     86  I: Integer;
     87begin
     88  for I := 0 to UsedModules.Count - 1 do
     89    Emit('#include "' + TUsedModule(UsedModules[I]).Name + '.h"');
     90  Emit('');
     91end;
     92
     93procedure TCProducer.GenerateModule(Module: TModule);
     94begin
     95  GenerateUses(Module.UsedModules);
     96  GenerateCommonBlock(Module, '');
     97end;
     98
    8299procedure TCProducer.Produce;
    83100begin
     
    94111  with ProgramBlock do
    95112  for I := 0 to Modules.Count - 1 do
    96     GenerateCommonBlock(TModule(Modules[I]), '');
     113    GenerateModule(TModule(Modules[I]));
    97114end;
    98115
Note: See TracChangeset for help on using the changeset viewer.