View Issue Details

IDProjectCategoryView StatusLast Update
0017612LazarusOtherpublic2011-12-01 11:25
ReporterMartin FriebeAssigned ToMartin Friebe 
PrioritynormalSeverityminorReproducibilityN/A
Status closedResolutionfixed 
Product Version0.9.29 (SVN)Product Build 
Target Version0.9.30Fixed in Version0.9.29 (SVN) 
Summary0017612: change highlight for exit, break, string, ...
Descriptionsee patch

need config
TagsNo tags attached.
Fixed in Revision27963
LazTarget1.0
Widgetset
Attached Files
  • highlighter-modification.diff (3,282 bytes)
    Index: components/synedit/synhighlighterpas.pp
    ===================================================================
    --- components/synedit/synhighlighterpas.pp	(Revision 27606)
    +++ components/synedit/synhighlighterpas.pp	(Arbeitskopie)
    @@ -316,6 +316,7 @@
         function Func55: TtkTokenKind;
         function Func56: TtkTokenKind;
         function Func57: TtkTokenKind;
    +    function Func58: TtkTokenKind;
         function Func59: TtkTokenKind;
         function Func60: TtkTokenKind;
         function Func61: TtkTokenKind;
    @@ -657,6 +658,7 @@
       fIdentFuncTable[55] := @Func55;
       fIdentFuncTable[56] := @Func56;
       fIdentFuncTable[57] := @Func57;
    +  fIdentFuncTable[58] := @Func58;
       fIdentFuncTable[59] := @Func59;
       fIdentFuncTable[60] := @Func60;
       fIdentFuncTable[61] := @Func61;
    @@ -1048,7 +1050,10 @@
         else StartPascalCodeFoldBlock(cfbtBeginEnd);
         //debugln('TSynPasSyn.Func37 BEGIN ',dbgs(ord(TopPascalCodeFoldBlockType)),' LineNumber=',dbgs(fLineNumber),' ',dbgs(MinimumCodeFoldBlockLevel),' ',dbgs(CurrentCodeFoldBlockLevel));
       end else
    -    Result := tkIdentifier;
    +    if KeyComp('Break') then
    +      Result := tkKey
    +    else
    +      Result := tkIdentifier;
     end;
     
     function TSynPasSyn.Func38: TtkTokenKind;
    @@ -1184,6 +1189,11 @@
           if KeyComp('Xor') then Result := tkKey else Result := tkIdentifier;
     end;
     
    +function TSynPasSyn.Func58: TtkTokenKind;
    +begin
    +  if KeyComp('Exit') then Result := tkKey else Result := tkIdentifier;
    +end;
    +
     function TSynPasSyn.Func59: TtkTokenKind;
     begin
       if KeyComp('Safecall') and (TopPascalCodeFoldBlockType in ProcModifierAllowed) then
    @@ -1283,9 +1293,11 @@
         else
           Result := tkIdentifier;
       end else
    - if KeyComp('Dynamic') then Result := tkKey
    - else
    - if KeyComp('Message') then Result := tkKey else Result := tkIdentifier;
    +  if KeyComp('Dynamic') then Result := tkKey
    +  else
    +    if KeyComp('Message') and (TopPascalCodeFoldBlockType in ProcModifierAllowed) then
    +      Result := tkKey
    +        else Result := tkIdentifier;
     end;
     
     function TSynPasSyn.Func71: TtkTokenKind;
    @@ -1428,7 +1440,7 @@
     
     function TSynPasSyn.Func87: TtkTokenKind;
     begin
    -  if KeyComp('String') then Result := tkKey else Result := tkIdentifier;
    +  {if KeyComp('String') then Result := tkKey else }Result := tkIdentifier;
     end;
     
     function TSynPasSyn.Func88: TtkTokenKind;
    @@ -1629,7 +1641,10 @@
         if KeyComp('Platform') then
           Result := tkKey
         else
    -      Result := tkIdentifier;
    +      if KeyComp('Continue') then
    +        Result := tkKey
    +      else
    +        Result := tkIdentifier;
     end;
     
     function TSynPasSyn.Func102: TtkTokenKind;
    @@ -1739,7 +1754,7 @@
     
     function TSynPasSyn.Func128: TtkTokenKind;
     begin
    -  if KeyComp('Widestring') then Result := tkKey else Result := tkIdentifier;
    +  {if KeyComp('Widestring') then Result := tkKey else} Result := tkIdentifier;
     end;
     
     function TSynPasSyn.Func129: TtkTokenKind;
    @@ -1759,9 +1774,9 @@
     
     function TSynPasSyn.Func130: TtkTokenKind;
     begin
    -  if KeyComp('Ansistring') then
    +  {if KeyComp('Ansistring') then
         Result := tkKey
    -  else
    +  else}
       if KeyComp('Enumerator') and (TopPascalCodeFoldBlockType in [cfbtClassSection]) then
         Result := tkKey
       else
    

Relationships

related to 0017732 closedMartin Friebe Add "constref" to the list of reserved words 

Activities

2010-10-12 12:15

 

highlighter-modification.diff (3,282 bytes)
Index: components/synedit/synhighlighterpas.pp
===================================================================
--- components/synedit/synhighlighterpas.pp	(Revision 27606)
+++ components/synedit/synhighlighterpas.pp	(Arbeitskopie)
@@ -316,6 +316,7 @@
     function Func55: TtkTokenKind;
     function Func56: TtkTokenKind;
     function Func57: TtkTokenKind;
+    function Func58: TtkTokenKind;
     function Func59: TtkTokenKind;
     function Func60: TtkTokenKind;
     function Func61: TtkTokenKind;
@@ -657,6 +658,7 @@
   fIdentFuncTable[55] := @Func55;
   fIdentFuncTable[56] := @Func56;
   fIdentFuncTable[57] := @Func57;
+  fIdentFuncTable[58] := @Func58;
   fIdentFuncTable[59] := @Func59;
   fIdentFuncTable[60] := @Func60;
   fIdentFuncTable[61] := @Func61;
@@ -1048,7 +1050,10 @@
     else StartPascalCodeFoldBlock(cfbtBeginEnd);
     //debugln('TSynPasSyn.Func37 BEGIN ',dbgs(ord(TopPascalCodeFoldBlockType)),' LineNumber=',dbgs(fLineNumber),' ',dbgs(MinimumCodeFoldBlockLevel),' ',dbgs(CurrentCodeFoldBlockLevel));
   end else
-    Result := tkIdentifier;
+    if KeyComp('Break') then
+      Result := tkKey
+    else
+      Result := tkIdentifier;
 end;
 
 function TSynPasSyn.Func38: TtkTokenKind;
@@ -1184,6 +1189,11 @@
       if KeyComp('Xor') then Result := tkKey else Result := tkIdentifier;
 end;
 
+function TSynPasSyn.Func58: TtkTokenKind;
+begin
+  if KeyComp('Exit') then Result := tkKey else Result := tkIdentifier;
+end;
+
 function TSynPasSyn.Func59: TtkTokenKind;
 begin
   if KeyComp('Safecall') and (TopPascalCodeFoldBlockType in ProcModifierAllowed) then
@@ -1283,9 +1293,11 @@
     else
       Result := tkIdentifier;
   end else
- if KeyComp('Dynamic') then Result := tkKey
- else
- if KeyComp('Message') then Result := tkKey else Result := tkIdentifier;
+  if KeyComp('Dynamic') then Result := tkKey
+  else
+    if KeyComp('Message') and (TopPascalCodeFoldBlockType in ProcModifierAllowed) then
+      Result := tkKey
+        else Result := tkIdentifier;
 end;
 
 function TSynPasSyn.Func71: TtkTokenKind;
@@ -1428,7 +1440,7 @@
 
 function TSynPasSyn.Func87: TtkTokenKind;
 begin
-  if KeyComp('String') then Result := tkKey else Result := tkIdentifier;
+  {if KeyComp('String') then Result := tkKey else }Result := tkIdentifier;
 end;
 
 function TSynPasSyn.Func88: TtkTokenKind;
@@ -1629,7 +1641,10 @@
     if KeyComp('Platform') then
       Result := tkKey
     else
-      Result := tkIdentifier;
+      if KeyComp('Continue') then
+        Result := tkKey
+      else
+        Result := tkIdentifier;
 end;
 
 function TSynPasSyn.Func102: TtkTokenKind;
@@ -1739,7 +1754,7 @@
 
 function TSynPasSyn.Func128: TtkTokenKind;
 begin
-  if KeyComp('Widestring') then Result := tkKey else Result := tkIdentifier;
+  {if KeyComp('Widestring') then Result := tkKey else} Result := tkIdentifier;
 end;
 
 function TSynPasSyn.Func129: TtkTokenKind;
@@ -1759,9 +1774,9 @@
 
 function TSynPasSyn.Func130: TtkTokenKind;
 begin
-  if KeyComp('Ansistring') then
+  {if KeyComp('Ansistring') then
     Result := tkKey
-  else
+  else}
   if KeyComp('Enumerator') and (TopPascalCodeFoldBlockType in [cfbtClassSection]) then
     Result := tkKey
   else

Martin Friebe

2010-10-30 02:57

manager   ~0042389

Please test and close if ok.

Settings are under Editor / Display / Markup and Matches

If switched on "break" and company are highlighted always, even where not a pascal command.

Issue History

Date Modified Username Field Change
2010-10-12 12:15 Martin Friebe New Issue
2010-10-12 12:15 Martin Friebe Status new => assigned
2010-10-12 12:15 Martin Friebe Assigned To => Martin Friebe
2010-10-12 12:15 Martin Friebe File Added: highlighter-modification.diff
2010-10-12 12:15 Martin Friebe LazTarget => -
2010-10-27 18:32 Martin Friebe Relationship added related to 0017732
2010-10-30 02:57 Martin Friebe Fixed in Revision => 27963
2010-10-30 02:57 Martin Friebe LazTarget - => 1.0
2010-10-30 02:57 Martin Friebe Status assigned => resolved
2010-10-30 02:57 Martin Friebe Fixed in Version => 0.9.29 (SVN)
2010-10-30 02:57 Martin Friebe Resolution open => fixed
2010-10-30 02:57 Martin Friebe Note Added: 0042389
2010-10-30 02:57 Martin Friebe Target Version => 0.9.30
2011-12-01 11:25 Marc Weustink Status resolved => closed