~ubuntu-branches/ubuntu/vivid/lazarus/vivid-proposed

« back to all changes in this revision

Viewing changes to components/synedit/synhighlighterpas.pp

  • Committer: Package Import Robot
  • Author(s): Paul Gevers, Abou Al Montacir, Paul Gevers
  • Date: 2013-06-22 13:31:45 UTC
  • mfrom: (1.1.10)
  • Revision ID: package-import@ubuntu.com-20130622133145-kf2awlf322usnrfv
Tags: 1.0.10+dfsg-1
[ Abou Al Montacir ]
* New upstream maintenance release offering many fixes improving the IDE and
  the LCL stability level.
  - The detailed list of changes can be found here:
    http://wiki.lazarus.freepascal.org/Lazarus_1.0_fixes_branch#Fixes_for_1.0.10
* Use compiler configuration file to pass debian custom compiler flags.
* Recover FTBFS on arm machines fix, dropped unintentionally when upgrading
  to 1.0.8. QT4 based LCL WS could not use QTOPIA. (Closes: Bug#712834)
* Update copyright notice to highlight that upstream source where repacked.

[ Paul Gevers ]
* Update Standard to 3.9.4 (no changes needed)
* Remove obsolete DM-Upload-Allowed
* Update lintian overrides
* Add myself to uploaders
* Update Vsc-Browser URL to the browse interface

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
If you do not delete the provisions above, a recipient may use your version
29
29
of this file under either the MPL or the GPL.
30
30
 
31
 
$Id: synhighlighterpas.pp 39521 2012-12-12 23:30:09Z maxim $
 
31
$Id: synhighlighterpas.pp 41162 2013-05-13 09:07:09Z martin $
32
32
 
33
33
You may retrieve the latest version of this file at the SynEdit home page,
34
34
located at http://SynEdit.SourceForge.net
1102
1102
 
1103
1103
function TSynPasSyn.Func32: TtkTokenKind;
1104
1104
begin
1105
 
  if KeyComp('Label') then Result := tkKey else
1106
 
    if KeyComp('Mod') then Result := tkKey else
1107
 
      if KeyComp('File') then Result := tkKey else Result := tkIdentifier;
 
1105
  if KeyComp('Label') then begin
 
1106
    if (TopPascalCodeFoldBlockType in  [cfbtVarType, cfbtLocalVarType, cfbtNone,
 
1107
        cfbtProcedure, cfbtProgram, cfbtUnit, cfbtUnitSection])
 
1108
    then begin
 
1109
      if TopPascalCodeFoldBlockType in [cfbtVarType, cfbtLocalVarType] then
 
1110
        EndPascalCodeFoldBlockLastLine;
 
1111
      if TopPascalCodeFoldBlockType in [cfbtProcedure]
 
1112
      then StartPascalCodeFoldBlock(cfbtLocalVarType)
 
1113
      else StartPascalCodeFoldBlock(cfbtVarType);
 
1114
    end;
 
1115
    Result := tkKey;
 
1116
  end
 
1117
  else
 
1118
  if KeyComp('Mod') then Result := tkKey
 
1119
  else
 
1120
  if KeyComp('File') then Result := tkKey
 
1121
  else
 
1122
    Result := tkIdentifier;
1108
1123
end;
1109
1124
 
1110
1125
function TSynPasSyn.Func33: TtkTokenKind;
1607
1622
    if TopPascalCodeFoldBlockType = cfbtProcedure then begin
1608
1623
      EndPascalCodeFoldBlock(True);
1609
1624
    end;
1610
 
  end else
1611
 
    if KeyComp('Library') then Result := tkKey else Result := tkIdentifier;
 
1625
  end
 
1626
  else
 
1627
  if KeyComp('Library') then begin
 
1628
    fRange := fRange - [rsInterface] + [rsImplementation];
 
1629
    if TopPascalCodeFoldBlockType=cfbtNone then
 
1630
      StartPascalCodeFoldBlock(cfbtProgram);
 
1631
    Result := tkKey
 
1632
  end
 
1633
  else
 
1634
    Result := tkIdentifier;
1612
1635
end;
1613
1636
 
1614
1637
function TSynPasSyn.Func86: TtkTokenKind;
1628
1651
begin
1629
1652
  if KeyComp('Program') then begin
1630
1653
    fRange := fRange - [rsInterface] + [rsImplementation];
1631
 
    if TopPascalCodeFoldBlockType=cfbtNone then StartPascalCodeFoldBlock(cfbtProgram);
 
1654
    if TopPascalCodeFoldBlockType=cfbtNone then
 
1655
      StartPascalCodeFoldBlock(cfbtProgram);
1632
1656
    Result := tkKey;
1633
1657
  end
1634
1658
  else if KeyComp('Mwpascal') and (TopPascalCodeFoldBlockType in ProcModifierAllowed) then
2610
2634
    inc(Run,2);
2611
2635
    fToIdent := Run;
2612
2636
    KeyHash;
2613
 
    if KeyComp('ifdef') or KeyComp('ifndef') or KeyComp('if') then
 
2637
    if (fLine[Run] in ['i', 'I']) and
 
2638
       ( KeyComp('if') or KeyComp('ifc') or KeyComp('ifdef') or KeyComp('ifndef') or
 
2639
         KeyComp('ifopt') )
 
2640
    then
2614
2641
      StartCustomCodeFoldBlock(cfbtIfDef)
2615
 
    else if KeyComp('endif') then
 
2642
    else
 
2643
    if ( (fLine[Run] in ['e', 'E']) and ( KeyComp('endif') or KeyComp('endc') ) ) or
 
2644
       KeyComp('ifend')
 
2645
    then
2616
2646
      EndCustomCodeFoldBlock(cfbtIfDef)
2617
 
    else if KeyComp('else') then begin
 
2647
    else
 
2648
    if (fLine[Run] in ['e', 'E']) and
 
2649
       ( KeyComp('else') or KeyComp('elsec') or KeyComp('elseif') or KeyComp('elifc') )
 
2650
    then begin
2618
2651
      EndCustomCodeFoldBlock(cfbtIfDef);
2619
2652
      StartCustomCodeFoldBlock(cfbtIfDef);
2620
2653
    end
2621
 
    else if KeyComp('region') then begin
 
2654
    else
 
2655
    if KeyComp('region') then begin
2622
2656
      StartCustomCodeFoldBlock(cfbtRegion);
2623
2657
      if FCatchNodeInfo then
2624
2658
        // Scan ahead