Ignore:
Timestamp:
Oct 22, 2010, 11:34:06 AM (14 years ago)
Author:
george
Message:
  • Modified: Parsing type restructured.
  • Added: Partial subrange typ parsing.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/Transpascal/Forms/UMainForm.pas

    r77 r78  
    2929    ActionList1: TActionList;
    3030    Button1: TButton;
     31    CheckBoxLogParsing: TCheckBox;
    3132    ComboBoxTargetSelection: TComboBox;
    3233    CoolDockClient1: TCoolDockClient;
     
    4748    Splitter3: TSplitter;
    4849    ToolBar1: TToolBar;
     50    procedure AProjectCloseExecute(Sender: TObject);
    4951    procedure AProjectOpenExecute(Sender: TObject);
    5052    procedure AProjectSaveAsExecute(Sender: TObject);
     
    5355    procedure FormShow(Sender: TObject);
    5456    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    55     procedure ButtonCompileClick(Sender: TObject);
     57    procedure ABuildExecute(Sender: TObject);
    5658    procedure FormCreate(Sender: TObject);
    5759    procedure FormDestroy(Sender: TObject);
     
    8385{ TMainForm }
    8486
    85 procedure TMainForm.ButtonCompileClick(Sender: TObject);
     87procedure TMainForm.ABuildExecute(Sender: TObject);
    8688begin
    8789  // Compile project file
     90  if CheckBoxLogParsing.Checked then
     91     Compiler.Parser.OnDebugLog := CompilerDebugLog
     92     else Compiler.Parser.OnDebugLog := nil;
    8893  Compiler.ProducerType := TProducerType(ComboBoxTargetSelection.ItemIndex);
    8994  Compiler.Init;
     
    157162      ComboBoxTargetSelection.ItemIndex :=
    158163        ReadIntegerWithDefault('ProducerType', 0);
     164      CheckBoxLogParsing.Checked := ReadBoolWithDefault('LogParsing', False);
    159165    finally
    160166      Free;
     
    171177      WriteBool('ReopenLastOpenedFile', ReopenLastOpenedFile);
    172178      WriteInteger('ProducerType', ComboBoxTargetSelection.ItemIndex);
     179      WriteBool('LogParsing', CheckBoxLogParsing.Checked);
    173180    finally
    174181      Free;
     
    200207  DeleteFile(DebugLog.FileName);
    201208  Compiler := TCompiler.Create;
    202   Compiler.Parser.OnDebugLog := CompilerDebugLog;
    203209  Project := TProject.Create;
    204210  LastOpenedFiles := TLastOpenedList.Create;
     
    245251procedure TMainForm.ComboBox1Change(Sender: TObject);
    246252begin
    247   ButtonCompileClick(Self);
     253  ABuildExecute(Self);
    248254end;
    249255
     
    255261end;
    256262
     263procedure TMainForm.AProjectCloseExecute(Sender: TObject);
     264begin
     265  Close;
     266end;
     267
    257268procedure TMainForm.AProjectSaveAsExecute(Sender: TObject);
    258269begin
     
    264275procedure TMainForm.ComboBoxTargetSelectionChange(Sender: TObject);
    265276begin
    266   ButtonCompileClick(Self);
     277  ABuildExecute(Self);
    267278end;
    268279
Note: See TracChangeset for help on using the changeset viewer.