Changeset 63


Ignore:
Timestamp:
Oct 15, 2010, 10:04:55 AM (14 years ago)
Author:
george
Message:
  • Modified: Compiled code syntax highlighting.
Location:
branches/Transpascal
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • branches/Transpascal/Forms/UCompiledForm.lfm

    r62 r63  
    733733    top = 62
    734734  end
     735  object SynPasSyn1: TSynPasSyn
     736    CompilerMode = pcmDelphi
     737    NestedComments = False
     738    left = 174
     739    top = 38
     740  end
     741  object SynCppSyn1: TSynCppSyn
     742    DefaultFilter = 'Soubory C++ (*.c,*.cpp,*.h,*.hpp,*.hh)|*.c;*.cpp;*.h;*.hpp;*.hh'
     743    left = 176
     744    top = 85
     745  end
     746  object SynXMLSyn1: TSynXMLSyn
     747    DefaultFilter = 'XML Dokument (*.xml,*.xsd,*.xsl,*.xslt,*.dtd)|*.xml;*.xsd;*.xsl;*.xslt;*.dtd'
     748    WantBracesParsed = False
     749    left = 178
     750    top = 133
     751  end
    735752end
  • branches/Transpascal/Forms/UCompiledForm.pas

    r62 r63  
    77uses
    88  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, SynEdit,
    9   UCoolDocking;
     9  SynHighlighterMulti, SynHighlighterVB, SynHighlighterPas, SynHighlighterCpp,
     10  SynHighlighterXML, UCoolDocking;
    1011
    1112type
     
    1516  TCompiledForm = class(TForm)
    1617    CoolDockClient1: TCoolDockClient;
     18    SynCppSyn1: TSynCppSyn;
    1719    SynEdit1: TSynEdit;
     20    SynPasSyn1: TSynPasSyn;
     21    SynXMLSyn1: TSynXMLSyn;
    1822  private
    1923    { private declarations }
  • branches/Transpascal/Forms/UMainForm.lfm

    r62 r63  
    4141    Caption = 'ToolBar1'
    4242    TabOrder = 2
    43     object ComboBox1: TComboBox
     43    object ComboBoxTargetSelection: TComboBox
    4444      Left = 1
    4545      Height = 21
     
    5454        'XML'
    5555      )
     56      OnChange = ComboBoxTargetSelectionChange
    5657      Style = csDropDownList
    5758      TabOrder = 0
  • branches/Transpascal/Forms/UMainForm.pas

    r62 r63  
    2727    ActionList1: TActionList;
    2828    Button1: TButton;
    29     ComboBox1: TComboBox;
     29    ComboBoxTargetSelection: TComboBox;
    3030    CoolDockClient1: TCoolDockClient;
    3131    CoolDockMaster1: TCoolDockMaster;
     
    4343    ToolBar1: TToolBar;
    4444    procedure ComboBox1Change(Sender: TObject);
     45    procedure ComboBoxTargetSelectionChange(Sender: TObject);
    4546    procedure FormShow(Sender: TObject);
    4647    procedure FormClose(Sender: TObject; var Action: TCloseAction);
     
    7980  I: Integer;
    8081begin
    81   if ComboBox1.ItemIndex = 0 then begin
     82  if ComboBoxTargetSelection.ItemIndex = 0 then begin
    8283    Compiler.Producer.Free;
    8384    Compiler.Producer := TProducerPascal.Create;
    8485  end else
    85   if ComboBox1.ItemIndex = 1 then begin
     86  if ComboBoxTargetSelection.ItemIndex = 1 then begin
    8687    Compiler.Producer.Free;
    8788    Compiler.Producer := TProducerC.Create;
    8889  end else
    89   if ComboBox1.ItemIndex = 2 then begin
     90  if ComboBoxTargetSelection.ItemIndex = 2 then begin
    9091    Compiler.Producer.Free;
    9192    Compiler.Producer := TProducerAsm8051.Create;
    9293  end else
    93   if ComboBox1.ItemIndex = 3 then begin
     94  if ComboBoxTargetSelection.ItemIndex = 3 then begin
    9495    Compiler.Producer.Free;
    9596    Compiler.Producer := TProducerTreeView.Create;
     
    103104  end;
    104105
     106  ProjectManager.TreeViewProjectChange(Self, ProjectManager.TreeViewProject.Selected);
    105107  LoadErrorMessages;
    106108end;
     
    276278end;
    277279
     280procedure TMainForm.ComboBoxTargetSelectionChange(Sender: TObject);
     281begin
     282  ButtonCompileClick(Self);
     283end;
     284
    278285end.
  • branches/Transpascal/Forms/UProjectManager.pas

    r62 r63  
    4646        CompiledForm.SynEdit1.Lines.LoadFromFile(FileName) else
    4747          CompiledForm.SynEdit1.Lines.Clear;
     48        if ComboBoxTargetSelection.ItemIndex = 0 then
     49          CompiledForm.SynEdit1.Highlighter := CompiledForm.SynPasSyn1;
     50        if ComboBoxTargetSelection.ItemIndex = 1 then
     51          CompiledForm.SynEdit1.Highlighter := CompiledForm.SynCppSyn1;
     52        if ComboBoxTargetSelection.ItemIndex = 2 then
     53          CompiledForm.SynEdit1.Highlighter := nil;
     54        if ComboBoxTargetSelection.ItemIndex = 3 then
     55          CompiledForm.SynEdit1.Highlighter := CompiledForm.SynXMLSyn1;
    4856
    49       // Load code tree view
     57      (*// Load code tree view
    5058      Compiler.Producer.Free;
    5159      Compiler.Producer := TProducerTreeView.Create;
     
    5664      end;
    5765      //CodeTreeForm.TreeView1.Assign(TProducerTreeView(Compiler.Producer).TreeView);
     66      *)
    5867    end;
    5968  end;
  • branches/Transpascal/Project/System.pas

    r60 r63  
    33interface
    44
     5const
     6  MemoryManagerSizeType: TType = Integer;
     7 
    58type
     9  TType = internal;
    610  Void = internal;
    711  Byte = internal;
     
    1620  Char = internal;
    1721  String = array of Char;
     22  Pointer = ^Void;
     23  Ordinal = (Byte, ShortInt, Word, SmallInt, Cardinal, DWord, Integer, QWord, Int64, Char);
     24  Float = (Single, Double, Extended)
     25  TObject = class;
    1826
     27  PMemoryManager = ^TMemoryManager;
     28  TMemoryManager<TSizeType: Ordinal> = record
     29    GetMem: function(Size: TSizeType): Pointer;
     30    FreeMem: function(P: Pointer): TSizeType;
     31    ReallocMem: function(P: Pointer; Size: TSizeType): Pointer;
     32  end;
     33  TSystemMemoryManager = TMemoryManager<MemoryManagerSizeType>;
     34 
     35  TSystem = record
     36    MemoryManager: TMemoryManager;
     37  end;
    1938
    2039procedure Exit; internal;
     
    2342procedure WriteLn; internal;
    2443
     44 
    2545implementation
    2646
     47uses
     48  MemoryManager;
     49
     50initialization
     51
     52finalization
    2753
    2854end.
  • branches/Transpascal/Transpascal.lpi

    r62 r63  
    4646      </Item4>
    4747    </RequiredPackages>
    48     <Units Count="32">
     48    <Units Count="33">
    4949      <Unit0>
    5050        <Filename Value="Transpascal.lpr"/>
    5151        <IsPartOfProject Value="True"/>
    5252        <UnitName Value="Transpascal"/>
    53         <EditorIndex Value="10"/>
     53        <EditorIndex Value="11"/>
    5454        <WindowIndex Value="0"/>
    5555        <TopLine Value="2"/>
     
    6666        <ResourceBaseClass Value="Form"/>
    6767        <UnitName Value="UMainForm"/>
    68         <EditorIndex Value="7"/>
    69         <WindowIndex Value="0"/>
    70         <TopLine Value="82"/>
    71         <CursorPos X="14" Y="62"/>
     68        <IsVisibleTab Value="True"/>
     69        <EditorIndex Value="8"/>
     70        <WindowIndex Value="0"/>
     71        <TopLine Value="93"/>
     72        <CursorPos X="57" Y="106"/>
    7273        <UsageCount Value="166"/>
    7374        <Loaded Value="True"/>
     
    234235        <TopLine Value="1"/>
    235236        <CursorPos X="33" Y="1"/>
    236         <UsageCount Value="11"/>
     237        <UsageCount Value="12"/>
    237238        <Loaded Value="True"/>
    238239      </Unit21>
     
    279280        <ResourceBaseClass Value="Form"/>
    280281        <UnitName Value="UProjectManager"/>
    281         <IsVisibleTab Value="True"/>
    282282        <EditorIndex Value="2"/>
    283283        <WindowIndex Value="0"/>
    284         <TopLine Value="38"/>
    285         <CursorPos X="9" Y="57"/>
     284        <TopLine Value="31"/>
     285        <CursorPos X="15" Y="40"/>
    286286        <UsageCount Value="22"/>
    287287        <Loaded Value="True"/>
     
    310310        <ResourceBaseClass Value="Form"/>
    311311        <UnitName Value="UMessagesForm"/>
    312         <EditorIndex Value="8"/>
     312        <EditorIndex Value="9"/>
    313313        <WindowIndex Value="0"/>
    314314        <TopLine Value="1"/>
     
    327327        <EditorIndex Value="6"/>
    328328        <WindowIndex Value="0"/>
    329         <TopLine Value="1"/>
    330         <CursorPos X="1" Y="1"/>
     329        <TopLine Value="5"/>
     330        <CursorPos X="28" Y="21"/>
    331331        <UsageCount Value="21"/>
    332332        <Loaded Value="True"/>
     
    340340        <ResourceBaseClass Value="Form"/>
    341341        <UnitName Value="UCodeTreeForm"/>
    342         <EditorIndex Value="9"/>
     342        <EditorIndex Value="10"/>
    343343        <WindowIndex Value="0"/>
    344344        <TopLine Value="1"/>
    345345        <CursorPos X="1" Y="1"/>
    346         <UsageCount Value="20"/>
     346        <UsageCount Value="21"/>
    347347        <Loaded Value="True"/>
    348348        <LoadedDesigner Value="True"/>
     
    359359        <Loaded Value="True"/>
    360360      </Unit31>
     361      <Unit32>
     362        <Filename Value="E:\Programy\Lazarus\components\synedit\synhighlightermulti.pas"/>
     363        <UnitName Value="SynHighlighterMulti"/>
     364        <EditorIndex Value="7"/>
     365        <WindowIndex Value="0"/>
     366        <TopLine Value="316"/>
     367        <CursorPos X="14" Y="329"/>
     368        <UsageCount Value="10"/>
     369        <Loaded Value="True"/>
     370      </Unit32>
    361371    </Units>
    362     <JumpHistory Count="29" HistoryIndex="28">
     372    <JumpHistory Count="30" HistoryIndex="29">
    363373      <Position1>
    364         <Filename Value="Forms\UProjectManager.pas"/>
    365         <Caret Line="9" Column="11" TopLine="1"/>
     374        <Filename Value="Forms\UMainForm.pas"/>
     375        <Caret Line="95" Column="1" TopLine="81"/>
    366376      </Position1>
    367377      <Position2>
    368         <Filename Value="Forms\UProjectManager.pas"/>
    369         <Caret Line="32" Column="23" TopLine="21"/>
     378        <Filename Value="Forms\UMainForm.pas"/>
     379        <Caret Line="96" Column="1" TopLine="83"/>
    370380      </Position2>
    371381      <Position3>
    372         <Filename Value="Forms\UProjectManager.pas"/>
    373         <Caret Line="43" Column="16" TopLine="30"/>
     382        <Filename Value="Forms\UMainForm.pas"/>
     383        <Caret Line="106" Column="1" TopLine="103"/>
    374384      </Position3>
    375385      <Position4>
    376         <Filename Value="Forms\UProjectManager.pas"/>
    377         <Caret Line="41" Column="19" TopLine="21"/>
     386        <Filename Value="Forms\UCodeForm.pas"/>
     387        <Caret Line="16" Column="32" TopLine="7"/>
    378388      </Position4>
    379389      <Position5>
    380         <Filename Value="Forms\UProjectManager.pas"/>
    381         <Caret Line="35" Column="22" TopLine="22"/>
     390        <Filename Value="Forms\UMainForm.pas"/>
     391        <Caret Line="216" Column="70" TopLine="201"/>
    382392      </Position5>
    383393      <Position6>
    384         <Filename Value="Forms\UProjectManager.pas"/>
    385         <Caret Line="47" Column="22" TopLine="33"/>
     394        <Filename Value="Forms\UCodeTreeForm.pas"/>
     395        <Caret Line="1" Column="1" TopLine="1"/>
    386396      </Position6>
    387397      <Position7>
    388         <Filename Value="Forms\UCompiledForm.pas"/>
    389         <Caret Line="1" Column="1" TopLine="1"/>
     398        <Filename Value="Forms\UMainForm.pas"/>
     399        <Caret Line="196" Column="18" TopLine="185"/>
    390400      </Position7>
    391401      <Position8>
    392         <Filename Value="Forms\UProjectManager.pas"/>
    393         <Caret Line="47" Column="1" TopLine="32"/>
     402        <Filename Value="Forms\UMainForm.pas"/>
     403        <Caret Line="93" Column="50" TopLine="73"/>
    394404      </Position8>
    395405      <Position9>
    396406        <Filename Value="Forms\UProjectManager.pas"/>
    397         <Caret Line="48" Column="22" TopLine="32"/>
     407        <Caret Line="32" Column="72" TopLine="14"/>
    398408      </Position9>
    399409      <Position10>
    400410        <Filename Value="Forms\UProjectManager.pas"/>
    401         <Caret Line="32" Column="38" TopLine="19"/>
     411        <Caret Line="55" Column="43" TopLine="40"/>
    402412      </Position10>
    403413      <Position11>
    404         <Filename Value="Forms\UProjectManager.pas"/>
    405         <Caret Line="48" Column="37" TopLine="32"/>
     414        <Filename Value="Forms\UMainForm.pas"/>
     415        <Caret Line="100" Column="39" TopLine="79"/>
    406416      </Position11>
    407417      <Position12>
    408418        <Filename Value="Forms\UProjectManager.pas"/>
    409         <Caret Line="49" Column="1" TopLine="32"/>
     419        <Caret Line="3" Column="1" TopLine="1"/>
    410420      </Position12>
    411421      <Position13>
    412         <Filename Value="Forms\UMainForm.pas"/>
    413         <Caret Line="62" Column="1" TopLine="49"/>
     422        <Filename Value="Forms\UProjectManager.pas"/>
     423        <Caret Line="18" Column="43" TopLine="1"/>
    414424      </Position13>
    415425      <Position14>
    416         <Filename Value="Forms\UMainForm.pas"/>
    417         <Caret Line="95" Column="1" TopLine="81"/>
     426        <Filename Value="Forms\UProjectManager.pas"/>
     427        <Caret Line="54" Column="27" TopLine="38"/>
    418428      </Position14>
    419429      <Position15>
    420         <Filename Value="Forms\UMainForm.pas"/>
    421         <Caret Line="96" Column="1" TopLine="83"/>
     430        <Filename Value="Forms\UProjectManager.pas"/>
     431        <Caret Line="57" Column="80" TopLine="38"/>
    422432      </Position15>
    423433      <Position16>
    424         <Filename Value="Forms\UMainForm.pas"/>
    425         <Caret Line="106" Column="1" TopLine="103"/>
     434        <Filename Value="Forms\UProjectManager.pas"/>
     435        <Caret Line="55" Column="23" TopLine="38"/>
    426436      </Position16>
    427437      <Position17>
    428         <Filename Value="Forms\UCodeForm.pas"/>
    429         <Caret Line="16" Column="32" TopLine="7"/>
     438        <Filename Value="Forms\UProjectManager.pas"/>
     439        <Caret Line="57" Column="9" TopLine="38"/>
    430440      </Position17>
    431441      <Position18>
    432         <Filename Value="Forms\UMainForm.pas"/>
    433         <Caret Line="216" Column="70" TopLine="201"/>
     442        <Filename Value="Forms\UCompiledForm.pas"/>
     443        <Caret Line="1" Column="1" TopLine="1"/>
    434444      </Position18>
    435445      <Position19>
    436         <Filename Value="Forms\UCodeTreeForm.pas"/>
    437         <Caret Line="1" Column="1" TopLine="1"/>
     446        <Filename Value="Forms\UProjectManager.pas"/>
     447        <Caret Line="48" Column="29" TopLine="29"/>
    438448      </Position19>
    439449      <Position20>
    440         <Filename Value="Forms\UMainForm.pas"/>
    441         <Caret Line="196" Column="18" TopLine="185"/>
     450        <Filename Value="Forms\UCompiledForm.pas"/>
     451        <Caret Line="18" Column="25" TopLine="5"/>
    442452      </Position20>
    443453      <Position21>
    444         <Filename Value="Forms\UMainForm.pas"/>
    445         <Caret Line="93" Column="50" TopLine="73"/>
     454        <Filename Value="Forms\UProjectManager.pas"/>
     455        <Caret Line="48" Column="45" TopLine="29"/>
    446456      </Position21>
    447457      <Position22>
    448         <Filename Value="Forms\UProjectManager.pas"/>
    449         <Caret Line="32" Column="72" TopLine="14"/>
     458        <Filename Value="Forms\UCompiledForm.pas"/>
     459        <Caret Line="18" Column="25" TopLine="5"/>
    450460      </Position22>
    451461      <Position23>
    452         <Filename Value="Forms\UProjectManager.pas"/>
    453         <Caret Line="55" Column="43" TopLine="40"/>
     462        <Filename Value="Forms\UCompiledForm.pas"/>
     463        <Caret Line="17" Column="24" TopLine="5"/>
    454464      </Position23>
    455465      <Position24>
    456         <Filename Value="Forms\UMainForm.pas"/>
    457         <Caret Line="100" Column="39" TopLine="79"/>
     466        <Filename Value="Forms\UCompiledForm.pas"/>
     467        <Caret Line="18" Column="28" TopLine="5"/>
    458468      </Position24>
    459469      <Position25>
    460         <Filename Value="Forms\UProjectManager.pas"/>
    461         <Caret Line="3" Column="1" TopLine="1"/>
     470        <Filename Value="Forms\UCompiledForm.pas"/>
     471        <Caret Line="20" Column="28" TopLine="5"/>
    462472      </Position25>
    463473      <Position26>
    464474        <Filename Value="Forms\UProjectManager.pas"/>
    465         <Caret Line="18" Column="43" TopLine="1"/>
     475        <Caret Line="48" Column="19" TopLine="31"/>
    466476      </Position26>
    467477      <Position27>
    468         <Filename Value="Forms\UProjectManager.pas"/>
    469         <Caret Line="54" Column="27" TopLine="38"/>
     478        <Filename Value="Forms\UMainForm.pas"/>
     479        <Caret Line="60" Column="40" TopLine="60"/>
    470480      </Position27>
    471481      <Position28>
    472         <Filename Value="Forms\UProjectManager.pas"/>
    473         <Caret Line="57" Column="80" TopLine="38"/>
     482        <Filename Value="Forms\UMainForm.pas"/>
     483        <Caret Line="281" Column="17" TopLine="259"/>
    474484      </Position28>
    475485      <Position29>
    476         <Filename Value="Forms\UProjectManager.pas"/>
    477         <Caret Line="55" Column="23" TopLine="38"/>
     486        <Filename Value="Forms\UMainForm.pas"/>
     487        <Caret Line="106" Column="1" TopLine="93"/>
    478488      </Position29>
     489      <Position30>
     490        <Filename Value="Forms\UProjectManager.pas"/>
     491        <Caret Line="38" Column="1" TopLine="25"/>
     492      </Position30>
    479493    </JumpHistory>
    480494  </ProjectOptions>
     
    489503      <SyntaxOptions>
    490504        <SyntaxMode Value="Delphi"/>
     505        <CStyleOperator Value="False"/>
     506        <CPPInline Value="False"/>
    491507      </SyntaxOptions>
    492508    </Parsing>
     
    503519      <Debugging>
    504520        <GenerateDebugInfo Value="True"/>
    505         <GenerateDwarf Value="True"/>
    506521        <UseHeaptrc Value="True"/>
    507522      </Debugging>
     
    520535  </CompilerOptions>
    521536  <Debugging>
    522     <BreakPoints Count="2">
     537    <BreakPoints Count="1">
    523538      <Item1>
    524539        <Source Value="USourceCode.pas"/>
    525540        <Line Value="723"/>
    526541      </Item1>
    527       <Item2>
    528         <Source Value="Forms\UProjectManager.pas"/>
    529         <Line Value="57"/>
    530       </Item2>
    531542    </BreakPoints>
    532543    <Exceptions Count="3">
Note: See TracChangeset for help on using the changeset viewer.