📄 synhighlighterst.pas
字号:
if KeyComp('BY') then Result := tkKey else Result := tkIdentifier;
end;
function TSynSTSyn.Func28: TtkTokenKind;
begin
if KeyComp('CASE') then Result := tkKey else Result := tkIdentifier;
end;
function TSynSTSyn.Func29: TtkTokenKind;
begin
if KeyComp('ON') then Result := tkKey else Result := tkIdentifier;
end;
function TSynSTSyn.Func32: TtkTokenKind;
begin
if KeyComp('LABEL') then Result := tkKey else
Result := tkIdentifier;
end;
function TSynSTSyn.Func33: TtkTokenKind;
begin
if KeyComp('OR') then Result := tkKey else
Result := tkIdentifier;
end;
function TSynSTSyn.Func35: TtkTokenKind;
begin
if KeyComp('TO') then Result := tkKey else
Result := tkIdentifier;
end;
function TSynSTSyn.Func36: TtkTokenKind;
begin
if KeyComp('REAL') then Result := tkKey else Result := tkIdentifier;
end;
function TSynSTSyn.Func39: TtkTokenKind;
begin
if KeyComp('FOR') then Result := tkKey else
Result := tkIdentifier;
end;
function TSynSTSyn.Func40: TtkTokenKind;
begin
if KeyComp('ANY') then Result := tkKey else Result := tkIdentifier;
end;
function TSynSTSyn.Func41: TtkTokenKind;
begin
if KeyComp('ELSE') then Result := tkKey else
if KeyComp('VAR') then Result := tkKey else Result := tkIdentifier;
end;
function TSynSTSyn.Func43: TtkTokenKind;
begin
if KeyComp('INT') then Result := tkKey else
Result := tkIdentifier;
end;
function TSynSTSyn.Func44: TtkTokenKind;
begin
if KeyComp('BOOL') then Result := tkKey else Result := tkIdentifier;
end;
function TSynSTSyn.Func47: TtkTokenKind;
begin
if KeyComp('THEN') then Result := tkKey else
if KeyComp('DINT') then Result := tkKey else
if KeyComp('TIME') then Result := tkKey else
Result := tkIdentifier;
end;
function TSynSTSyn.Func49: TtkTokenKind;
begin
if KeyComp('NOT') then Result := tkKey else Result := tkIdentifier;
end;
function TSynSTSyn.Func51: TtkTokenKind;
begin
if KeyComp('ELSIF') then Result := tkKey else Result := tkIdentifier;
end;
function TSynSTSyn.Func52: TtkTokenKind;
begin
if KeyComp('BYTE') then Result := tkKey else
if KeyComp('FROM') then Result := tkKey else Result := tkIdentifier;
end;
function TSynSTSyn.Func56: TtkTokenKind;
begin
if KeyComp('INDEX') then
begin
if fRange = rsProperty then Result := tkKey else Result := tkIdentifier;
end
else
Result := tkIdentifier;
end;
function TSynSTSyn.Func57: TtkTokenKind;
begin
if KeyComp('GOTO') then Result := tkKey else
if KeyComp('WHILE') then Result := tkKey else
if KeyComp('XOR') then Result := tkKey else Result := tkIdentifier;
end;
function TSynSTSyn.Func58: TtkTokenKind;
begin
if KeyComp('EXIT') then Result := tkKey else
Result := tkIdentifier;
end;
function TSynSTSyn.Func60: TtkTokenKind;
begin
if KeyComp('STEP') then Result := tkKey else
if KeyComp('WORD') then Result := tkKey else Result := tkIdentifier;
end;
function TSynSTSyn.Func62: TtkTokenKind;
begin
if KeyComp('ACTION') then Result := tkKey else
if KeyComp('SINT') then Result := tkKey else
Result := tkIdentifier;
end;
function TSynSTSyn.Func63: TtkTokenKind;
begin
if KeyComp('ARRAY') then Result := tkKey else
Result := tkIdentifier;
end;
function TSynSTSyn.Func64: TtkTokenKind;
begin
if KeyComp('DWORD') then Result := tkKey else
if KeyComp('UINT') then Result := tkKey else Result := tkIdentifier;
end;
function TSynSTSyn.Func65: TtkTokenKind;
begin
if KeyComp('REPEAT') then Result := tkKey else Result := tkIdentifier;
end;
function TSynSTSyn.Func66: TtkTokenKind;
begin
if KeyComp('TYPE') then Result := tkKey else Result := tkIdentifier;
end;
function TSynSTSyn.Func67: TtkTokenKind;
begin
if KeyComp('RETAIN') then Result := tkKey else Result := tkIdentifier;
end;
function TSynSTSyn.Func68: TtkTokenKind;
begin
if KeyComp('UDINT') then Result := tkKey else Result := tkIdentifier;
end;
function TSynSTSyn.Func69: TtkTokenKind;
begin
if KeyComp('END_IF') then Result := tkKey else
Result := tkIdentifier;
end;
function TSynSTSyn.Func76: TtkTokenKind;
begin
if KeyComp('UNTIL') then Result := tkKey else Result := tkIdentifier;
end;
function TSynSTSyn.Func79: TtkTokenKind;
begin
if KeyComp('FINALLY') then Result := tkKey else Result := tkIdentifier;
end;
function TSynSTSyn.Func82: TtkTokenKind;
begin
if KeyComp('END_CASE') then Result := tkKey else Result := tkIdentifier;
end;
function TSynSTSyn.Func83: TtkTokenKind;
begin
if KeyComp('USINT') then Result := tkKey else Result := tkIdentifier;
end;
function TSynSTSyn.Func87: TtkTokenKind;
begin
if KeyComp('STRING') then Result := tkKey else
Result := tkIdentifier;
end;
function TSynSTSyn.Func88: TtkTokenKind;
begin
if KeyComp('PROGRAM') then Result := tkKey else Result := tkIdentifier;
end;
function TSynSTSyn.Func93: TtkTokenKind;
begin
if KeyComp('END_FOR') then Result := tkKey else Result := tkIdentifier;
end;
function TSynSTSyn.Func95: TtkTokenKind;
begin
if KeyComp('END_VAR') then Result := tkKey else Result := tkIdentifier;
end;
function TSynSTSyn.Func96: TtkTokenKind;
begin
if KeyComp('RETURN') then Result := tkKey else
Result := tkIdentifier;
end;
function TSynSTSyn.Func99: TtkTokenKind;
begin
if KeyComp('EXTERNAL') then Result := tkKey else Result := tkIdentifier;
end;
function TSynSTSyn.Func101: TtkTokenKind;
begin
if KeyComp('STRUCT') then Result := tkKey else Result := tkIdentifier;
end;
function TSynSTSyn.Func102: TtkTokenKind;
begin
if KeyComp('FUNCTION') then Result := tkKey else Result := tkIdentifier;
end;
function TSynSTSyn.Func104: TtkTokenKind;
begin
if KeyComp('RESOURCE') then Result := tkKey else Result := tkIdentifier;
end;
function TSynSTSyn.Func106: TtkTokenKind;
begin
if KeyComp('VAR_EXTERNAL') then Result := tkKey else
if KeyComp('CONSTANT') then Result := tkKey else
Result := tkIdentifier;
end;
function TSynSTSyn.Func111: TtkTokenKind;
begin
if KeyComp('END_WHILE') then Result := tkKey else Result := tkIdentifier;
end;
function TSynSTSyn.Func114: TtkTokenKind;
begin
if KeyComp('END_STEP') then Result := tkKey else Result := tkIdentifier;
end;
function TSynSTSyn.Func116: TtkTokenKind;
begin
if KeyComp('END_ACTION') then Result := tkKey else Result := tkIdentifier;
end;
function TSynSTSyn.Func119: TtkTokenKind;
begin
if KeyComp('ANY_NUM') then Result := tkKey else
if KeyComp('END_REPEAT') then Result := tkKey else Result := tkIdentifier;
end;
function TSynSTSyn.Func120: TtkTokenKind;
begin
if KeyComp('END_TYPE') then Result := tkKey else Result := tkIdentifier;
end;
function TSynSTSyn.Func121: TtkTokenKind;
begin
if KeyComp('VAR_GLOBAL') then Result := tkKey else Result := tkIdentifier;
end;
function TSynSTSyn.Func139: TtkTokenKind;
begin
if KeyComp('TRANSITION') then Result := tkKey else Result := tkIdentifier;
end;
function TSynSTSyn.Func152: TtkTokenKind;
begin
if KeyComp('CONFIGURATION') then Result := tkKey else
if KeyComp('VAR_INPUT') then Result := tkKey else Result := tkIdentifier;
end;
function TSynSTSyn.Func155: TtkTokenKind;
begin
if KeyComp('END_STRUCT') then Result := tkKey else Result := tkIdentifier;
end;
function TSynSTSyn.Func158: TtkTokenKind;
begin
if KeyComp('END_RESOURCE') then Result := tkKey else Result := tkIdentifier;
end;
function TSynSTSyn.Func165: TtkTokenKind;
begin
if KeyComp('INITIAL_STEP') then Result := tkKey else
Result := tkIdentifier;
end;
function TSynSTSyn.Func168: TtkTokenKind;
begin
if KeyComp('INITIALIZATION') then Result := tkKey else Result := tkIdentifier;
end;
function TSynSTSyn.Func171: TtkTokenKind;
begin
if KeyComp('VAR_EXTERNAL') then Result := tkKey else
Result := tkIdentifier;
end;
function TSynSTSyn.Func182: TtkTokenKind;
begin
if KeyComp('VAR_IN_OUT') then Result := tkKey else Result := tkIdentifier;
end;
function TSynSTSyn.Func185: TtkTokenKind;
begin
if KeyComp('VAR_OUTPUT') then Result := tkKey else Result := tkIdentifier;
end;
function TSynSTSyn.Func193: TtkTokenKind;
begin
if KeyComp('END_TRANSITION') then Result := tkKey else Result := tkIdentifier;
end;
function TSynSTSyn.Func206: TtkTokenKind;
begin
if KeyComp('END_CONFIGURATION') then Result := tkKey else Result := tkIdentifier;
end;
function TSynSTSyn.AltFunc: TtkTokenKind;
begin
Result := tkIdentifier
end;
function TSynSTSyn.IdentKind(MayBe: PChar): TtkTokenKind;
var
HashKey: Integer;
begin
fToIdent := MayBe;
HashKey := KeyHash(MayBe);
if HashKey < 207 then Result := fIdentFuncTable[HashKey] else
Result := tkIdentifier;
end;
procedure TSynSTSyn.MakeMethodTables;
var
I: Char;
begin
for I := #0 to #255 do
case I of
#0: fProcTable[I] := NullProc;
#10: fProcTable[I] := LFProc;
#13: fProcTable[I] := CRProc;
#1..#9, #11, #12, #14..#32:
fProcTable[I] := SpaceProc;
'#': fProcTable[I] := AsciiCharProc;
'$': fProcTable[I] := IntegerProc;
#39: fProcTable[I] := StringProc;
'0'..'9': fProcTable[I] := NumberProc;
'A'..'Z', 'a'..'z', '_':
fProcTable[I] := IdentProc;
'{': fProcTable[I] := BraceOpenProc;
'}', '!', '"', '%', '&', '('..'/', ':'..'@', '['..'^', '`', '~':
begin
case I of
'(': fProcTable[I] := RoundOpenProc;
'.': fProcTable[I] := PointProc;
';': fProcTable[I] := SemicolonProc; //mh 2000-10-08
'/': fProcTable[I] := SlashProc;
':', '>': fProcTable[I] := ColonOrGreaterProc;
'<': fProcTable[I] := LowerProc;
'@': fProcTable[I] := AddressOpProc;
else
fProcTable[I] := SymbolProc;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -