From 44421a008ae4f9f6a1610427ff65d43de072f7c2 Mon Sep 17 00:00:00 2001 From: mattias Date: Wed, 22 Mar 2006 00:31:19 +0000 Subject: [PATCH] added keywords to TSynPasSyn package, requires, contains git-svn-id: trunk@8976 - --- components/synedit/synhighlighterpas.pp | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/components/synedit/synhighlighterpas.pp b/components/synedit/synhighlighterpas.pp index 7c52c6f9c7..ffa08b6f0d 100644 --- a/components/synedit/synhighlighterpas.pp +++ b/components/synedit/synhighlighterpas.pp @@ -182,6 +182,7 @@ type function Func106: TtkTokenKind; {$ifdef SYN_LAZARUS} function Func108: TtkTokenKind; // "operator" + function Func112: TtkTokenKind; // "requires" {$endif} function Func117: TtkTokenKind; function Func126: TtkTokenKind; @@ -408,6 +409,7 @@ begin fIdentFuncTable[106] := @Func106; {$ifdef SYN_LAZARUS} fIdentFuncTable[108] := @Func108; // "operator" + fIdentFuncTable[112] := @Func112; // "requires" {$endif} fIdentFuncTable[117] := @Func117; fIdentFuncTable[126] := @Func126; @@ -520,7 +522,7 @@ begin end else begin fStringLen := 0; end; - //if CompareText(copy(fLine,fToIdent,fStringLen),'widestring')=0 then debugln('TSynPasSyn.KeyHash '+copy(fLine,fToIdent,fStringLen)+'='+dbgs(Result)); + //if CompareText(copy(fLine,fToIdent,fStringLen),'package')=0 then debugln('TSynPasSyn.KeyHash '+copy(fLine,fToIdent,fStringLen)+'='+dbgs(Result)); end; { KeyHash } {$ELSE} function TSynPasSyn.KeyHash(ToHash: PChar): Integer; @@ -690,7 +692,12 @@ end; function TSynPasSyn.Func44: TtkTokenKind; begin - if KeyComp('Set') then Result := tkKey else Result := tkIdentifier; + if KeyComp('Set') then + Result := tkKey + else if KeyComp('Package') then + Result := tkKey + else + Result := tkIdentifier; end; function TSynPasSyn.Func45: TtkTokenKind; @@ -878,7 +885,12 @@ end; function TSynPasSyn.Func95: TtkTokenKind; begin - if KeyComp('Absolute') then Result := tkKey else Result := tkIdentifier; + if KeyComp('Absolute') then + Result := tkKey + else if KeyComp('Contains') then + Result := tkKey + else + Result := tkIdentifier; end; function TSynPasSyn.Func96: TtkTokenKind; @@ -945,6 +957,11 @@ function TSynPasSyn.Func108: TtkTokenKind; begin if KeyComp('Operator') then Result := tkKey else Result := tkIdentifier; end; + +function TSynPasSyn.Func112: TtkTokenKind; +begin + if KeyComp('Requires') then Result := tkKey else Result := tkIdentifier; +end; {$endif} function TSynPasSyn.Func117: TtkTokenKind;