Ignore:
Timestamp:
Apr 6, 2012, 9:43:56 AM (13 years ago)
Author:
chronos
Message:
  • Added: Project determines which source file is main program source.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Compiler/UCompiler.pas

    r50 r51  
    3737    TargetFolder: string;
    3838    Targets: TListTarget;
     39    MainSource: string;
    3940    SourceFiles: TListString;
    4041    TargetFiles: TListString;
     
    8485begin
    8586  ErrorMessages.Clear;
    86   AbstractCode.Modules.Clear;
     87  AbstractCode.Clear;
    8788end;
    8889
     
    169170procedure TCompiler.AnalyzeAll;
    170171begin
    171   if SourceFiles.Count > 0 then begin
    172     Analyzer.FileName := SourceFiles[0];
     172  if (SourceFiles.Count > 0) then begin
     173    Analyzer.FileName := MainSource;
    173174    Analyzer.OnGetSource(ExtractFileNameOnly(Analyzer.FileName), Analyzer.SourceCode);
    174175    Analyzer.Process;
Note: See TracChangeset for help on using the changeset viewer.