📄 synhighlighterfoxpro.pas
字号:
if KeyComp('between') then Result := tkKey else
if KeyComp('point') then Result := tkKey else Result := tkIdentifier;
end;
function TSynFoxproSyn.Func75: TtkTokenKind;
begin
if KeyComp('endproc') then Result := tkKey else Result := tkIdentifier;
end;
function TSynFoxproSyn.Func76: TtkTokenKind;
begin
if KeyComp('safety') then Result := tkKey else
if KeyComp('xcmdfile') then Result := tkKey else Result := tkIdentifier;
end;
function TSynFoxproSyn.Func77: TtkTokenKind;
begin
if KeyComp('classlib') then Result := tkKey else
if KeyComp('store') then Result := tkKey else
if KeyComp('delimite') then Result := tkKey else Result := tkIdentifier;
end;
function TSynFoxproSyn.Func78: TtkTokenKind;
begin
if KeyComp('confirm') then Result := tkKey else
if KeyComp('caption') then Result := tkKey else Result := tkIdentifier;
end;
function TSynFoxproSyn.Func79: TtkTokenKind;
begin
if KeyComp('empty') then Result := tkKey else
if KeyComp('refresh') then Result := tkKey else
if KeyComp('fcount') then Result := tkKey else
if KeyComp('palette') then Result := tkKey else Result := tkIdentifier;
end;
function TSynFoxproSyn.Func80: TtkTokenKind;
begin
if KeyComp('capslock') then Result := tkKey else
if KeyComp('backcolor') then Result := tkKey else Result := tkIdentifier;
end;
function TSynFoxproSyn.Func81: TtkTokenKind;
begin
if KeyComp('hours') then Result := tkKey else
if KeyComp('fwrite') then Result := tkKey else
if KeyComp('activate') then Result := tkKey else
if KeyComp('regional') then Result := tkKey else Result := tkIdentifier;
end;
function TSynFoxproSyn.Func82: TtkTokenKind;
begin
if KeyComp('commands') then Result := tkKey else
if KeyComp('fputs') then Result := tkKey else
if KeyComp('nowait') then Result := tkKey else
if KeyComp('browse') then Result := tkKey else Result := tkIdentifier;
end;
function TSynFoxproSyn.Func83: TtkTokenKind;
begin
if KeyComp('console') then Result := tkKey else Result := tkIdentifier;
end;
function TSynFoxproSyn.Func85: TtkTokenKind;
begin
if KeyComp('library') then Result := tkKey else
if KeyComp('bottom') then Result := tkKey else
if KeyComp('events') then Result := tkKey else
if KeyComp('typeahead') then Result := tkKey else
if KeyComp('insert') then Result := tkKey else
if KeyComp('alltrim') then Result := tkKey else Result := tkIdentifier;
end;
function TSynFoxproSyn.Func86: TtkTokenKind;
begin
if KeyComp('display') then Result := tkKey else
if KeyComp('scatter') then Result := tkKey else Result := tkIdentifier;
end;
function TSynFoxproSyn.Func87: TtkTokenKind;
begin
if KeyComp('unique') then Result := tkKey else
if KeyComp('sticky') then Result := tkKey else Result := tkIdentifier;
end;
function TSynFoxproSyn.Func88: TtkTokenKind;
begin
if KeyComp('aplabout') then Result := tkKey else
if KeyComp('keycomp') then Result := tkKey else
if KeyComp('volume') then Result := tkKey else
if KeyComp('window') then Result := tkKey else Result := tkIdentifier;
end;
function TSynFoxproSyn.Func89: TtkTokenKind;
begin
if KeyComp('notify') then Result := tkKey else
if KeyComp('shadows') then Result := tkKey else Result := tkIdentifier;
end;
function TSynFoxproSyn.Func90: TtkTokenKind;
begin
if KeyComp('readborder') then Result := tkKey else Result := tkIdentifier;
end;
function TSynFoxproSyn.Func91: TtkTokenKind;
begin
if KeyComp('private') then Result := tkKey else Result := tkIdentifier;
end;
function TSynFoxproSyn.Func94: TtkTokenKind;
begin
if KeyComp('barcount') then Result := tkKey else
if KeyComp('cursor') then Result := tkKey else
if KeyComp('relation') then Result := tkKey else Result := tkIdentifier;
end;
function TSynFoxproSyn.Func95: TtkTokenKind;
begin
if KeyComp('odometer') then Result := tkKey else
if KeyComp('_screen') then Result := tkKey else Result := tkIdentifier;
end;
function TSynFoxproSyn.Func96: TtkTokenKind;
begin
if KeyComp('compatible') then Result := tkKey else
if KeyComp('alternate') then Result := tkKey else
if KeyComp('fullpath') then Result := tkKey else
if KeyComp('return') then Result := tkKey else Result := tkIdentifier;
end;
function TSynFoxproSyn.Func97: TtkTokenKind;
begin
if KeyComp('parameter') then Result := tkKey else Result := tkIdentifier;
end;
function TSynFoxproSyn.Func98: TtkTokenKind;
begin
if KeyComp('udfparms') then Result := tkKey else
if KeyComp('prompt') then Result := tkKey else Result := tkIdentifier;
end;
function TSynFoxproSyn.Func100: TtkTokenKind;
begin
if KeyComp('scoreboard') then Result := tkKey else
if KeyComp('status') then Result := tkKey else
if KeyComp('printer') then Result := tkKey else Result := tkIdentifier;
end;
function TSynFoxproSyn.Func101: TtkTokenKind;
begin
if KeyComp('pdsetup') then Result := tkKey else Result := tkIdentifier;
end;
function TSynFoxproSyn.Func102: TtkTokenKind;
begin
if KeyComp('dimension') then Result := tkKey else
if KeyComp('function') then Result := tkKey else
if KeyComp('blocksize') then Result := tkKey else Result := tkIdentifier;
end;
function TSynFoxproSyn.Func104: TtkTokenKind;
begin
if KeyComp('autosave') then Result := tkKey else
if KeyComp('resource') then Result := tkKey else Result := tkIdentifier;
end;
function TSynFoxproSyn.Func105: TtkTokenKind;
begin
if KeyComp('procedure') then Result := tkKey else Result := tkIdentifier;
end;
function TSynFoxproSyn.Func106: TtkTokenKind;
begin
if KeyComp('century') then Result := tkKey else Result := tkIdentifier;
end;
function TSynFoxproSyn.Func107: TtkTokenKind;
begin
if KeyComp('macdesktop') then Result := tkKey else
if KeyComp('currency') then Result := tkKey else Result := tkIdentifier;
end;
function TSynFoxproSyn.Func108: TtkTokenKind;
begin
if KeyComp('thisform') then Result := tkKey else Result := tkIdentifier;
end;
function TSynFoxproSyn.Func110: TtkTokenKind;
begin
if KeyComp('memowidth') then Result := tkKey else Result := tkIdentifier;
end;
function TSynFoxproSyn.Func111: TtkTokenKind;
begin
if KeyComp('helpfilter') then Result := tkKey else
if KeyComp('ansitooem') then Result := tkKey else Result := tkIdentifier;
end;
function TSynFoxproSyn.Func112: TtkTokenKind;
begin
if KeyComp('trbetween') then Result := tkKey else Result := tkIdentifier;
end;
function TSynFoxproSyn.Func113: TtkTokenKind;
begin
if KeyComp('separator') then Result := tkKey else
if KeyComp('optimize') then Result := tkKey else Result := tkIdentifier;
end;
function TSynFoxproSyn.Func114: TtkTokenKind;
begin
if KeyComp('delimiters') then Result := tkKey else Result := tkIdentifier;
end;
function TSynFoxproSyn.Func116: TtkTokenKind;
begin
if KeyComp('sysmenu') then Result := tkKey else
if KeyComp('parameters') then Result := tkKey else Result := tkIdentifier;
end;
function TSynFoxproSyn.Func117: TtkTokenKind;
begin
if KeyComp('textmerge') then Result := tkKey else Result := tkIdentifier;
end;
function TSynFoxproSyn.Func118: TtkTokenKind;
begin
if KeyComp('reprocess') then Result := tkKey else Result := tkIdentifier;
end;
function TSynFoxproSyn.Func119: TtkTokenKind;
begin
if KeyComp('barprompt') then Result := tkKey else Result := tkIdentifier;
end;
function TSynFoxproSyn.Func120: TtkTokenKind;
begin
if KeyComp('brstatus') then Result := tkKey else
if KeyComp('nocptrans') then Result := tkKey else
if KeyComp('exclusive') then Result := tkKey else Result := tkIdentifier;
end;
function TSynFoxproSyn.Func122: TtkTokenKind;
begin
if KeyComp('otherwise') then Result := tkKey else Result := tkIdentifier;
end;
function TSynFoxproSyn.Func127: TtkTokenKind;
begin
if KeyComp('logerrors') then Result := tkKey else Result := tkIdentifier;
end;
function TSynFoxproSyn.Func131: TtkTokenKind;
begin
if KeyComp('development') then Result := tkKey else Result := tkIdentifier;
end;
function TSynFoxproSyn.Func133: TtkTokenKind;
begin
if KeyComp('dohistory') then Result := tkKey else Result := tkIdentifier;
end;
function TSynFoxproSyn.Func135: TtkTokenKind;
begin
if KeyComp('intensity') then Result := tkKey else
if KeyComp('multilocks') then Result := tkKey else Result := tkIdentifier;
end;
function TSynFoxproSyn.Func160: TtkTokenKind;
begin
if KeyComp('_msysmenu') then Result := tkKey else Result := tkIdentifier;
end;
function TSynFoxproSyn.AltFunc: TtkTokenKind;
begin
Result := tkIdentifier;
end;
function TSynFoxproSyn.IdentKind(MayBe: PChar): TtkTokenKind;
var
HashKey: Integer;
begin
fToIdent := MayBe;
HashKey := KeyHash(MayBe);
if HashKey < 161 then Result := fIdentFuncTable[HashKey] else Result := tkIdentifier;
end;
procedure TSynFoxproSyn.MakeMethodTables;
var
I: Char;
begin
for I := #0 to #255 do
case I of
'&': fProcTable[I] := AndSymbolProc;
#39: fProcTable[I] := AsciiCharProc;
'@': fProcTable[I] := AtSymbolProc;
'{': fProcTable[I] := BraceOpenProc;
#13: fProcTable[I] := CRProc;
':': fProcTable[I] := ColonProc;
',': fProcTable[I] := CommaProc;
'=': fProcTable[I] := EqualProc;
'>': fProcTable[I] := GreaterProc;
'A'..'Z', 'a'..'z', '_': fProcTable[I] := IdentProc;
#10: fProcTable[I] := LFProc;
'<': fProcTable[I] := LowerProc;
'-': fProcTable[I] := MinusProc;
'%': fProcTable[I] := ModSymbolProc;
'!': fProcTable[I] := NotSymbolProc;
#0: fProcTable[I] := NullProc;
'0'..'9': fProcTable[I] := NumberProc;
'|': fProcTable[I] := OrSymbolProc;
'+': fProcTable[I] := PlusProc;
'.': fProcTable[I] := PointProc;
'?': fProcTable[I] := QuestionProc;
')': fProcTable[I] := RoundCloseProc;
'(': fProcTable[I] := RoundOpenProc;
';': fProcTable[I] := SemiColonProc;
'/': fProcTable[I] := SlashProc;
#1..#9, #11, #12, #14..#32: fProcTable[I] := SpaceProc;
']': fProcTable[I] := SquareCloseProc;
'[': fProcTable[I] := SquareOpenProc;
'*': fProcTable[I] := StarProc;
#34: fProcTable[I] := StringProc;
'~': fProcTable[I] := TildeProc;
'^': fProcTable[I] := XOrSymbolProc;
else
fProcTable[I] := UnknownProc;
end;
end;
constructor TSynFoxproSyn.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
fCommentAttri := TSynHighlighterAttributes.Create(SYNS_AttrComment);
AddAttribute(fCommentAttri);
fIdentifierAttri := TSynHighlighterAttributes.Create(SYNS_AttrIdentifier);
AddAttribute(fIdentifierAttri);
fKeyAttri := TSynHighlighterAttributes.Create(SYNS_AttrReservedWord);
AddAttribute(fKeyAttri);
fNumberAttri := TSynHighlighterAttributes.Create(SYNS_AttrNumber);
AddAttribute(fNumberAttri);
fSpaceAttri := TSynHighlighterAttributes.Create(SYNS_AttrSpace);
AddAttribute(fSpaceAttri);
fStringAttri := TSynHighlighterAttributes.Create(SYNS_AttrString);
AddAttribute(fStringAttri);
fSymbolAttri := TSynHighlighterAttributes.Create(SYNS_AttrSymbol);
AddAttribute(fSymbolAttri);
SetAttributesOnChange(DefHighlightChange);
InitIdent;
MakeMethodTables;
fDefaultFilter := SYNS_FilterFoxpro;
end;
procedure TSynFoxproSyn.SetLine(NewValue: String; LineNumber: Integer);
begin
fLine := PChar(NewValue);
Run := 0;
fLineNumber := LineNumber;
Next;
end;
procedure TSynFoxproSyn.AndSymbolProc;
begin
case FLine[Run + 1] of
'&': {Comments}
begin
inc(Run, 2);
fTokenID := tkComment;
while FLine[Run] <> #0 do
begin
case FLine[Run] of
#10, #13: break;
end; //case
inc(Run);
end;
end;
else {and}
begin
inc(Run);
fTokenID := tkSymbol;
end;
end;
end;
procedure TSynFoxproSyn.AsciiCharProc;
begin
fTokenID := tkString;
repeat
case FLine[Run] of
#0, #10, #13: break;
end;
inc(Run);
until FLine[Run] = #39;
if FLine[Run] <> #0 then inc(Run);
end;
procedure TSynFoxproSyn.AtSymbolProc;
begin
fTokenID := tkKey;
inc(Run);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -