Ignore:
Timestamp:
Aug 10, 2010, 1:48:38 PM (14 years ago)
Author:
george
Message:

Fix: View proper source file after click to error message.
Made partial changes to support unit interface and implementation sections.

File:
1 edited

Legend:

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

    r54 r55  
    8484procedure TProducerPascal.GenerateModule(Module: TModule);
    8585begin
    86   case Module.ModuleType of
    87     mdProgram: Emit('program', False);
    88     mdUnit: Emit('unit', False);
    89     mdLibrary: Emit('library', False);
    90     mdPackage: Emit('package', False);
    91   end;
    92   Emit(' ' + Module.Name + ';');
    93   Emit('');
    94   GenerateUses(Module.UsedModules);
    95   GenerateCommonBlock(Module, '');
    96   Emit('.', False);
     86  if Module is TModuleProgram then
     87  with TModuleProgram(Module) do begin
     88    Emit('program', False);
     89    Emit(' ' + Name + ';');
     90    Emit('');
     91    GenerateUses(UsedModules);
     92    GenerateCommonBlock(Body, '');
     93    Emit('.', False);
     94  end else
     95  if Module is TModuleUnit then Emit('unit', False)
     96  else if Module is TModuleLibrary then Emit('library', False)
     97  else if Module is TModulePackage then Emit('package', False);
    9798end;
    9899
Note: See TracChangeset for help on using the changeset viewer.