synedit: added proc modifier vectorcall, patch #33134

git-svn-id: trunk@57288 -
This commit is contained in:
mattias 2018-02-12 14:55:20 +00:00
parent 1f153b731b
commit 43543a0cbb
2 changed files with 25 additions and 6 deletions

View File

@ -175,6 +175,7 @@ type
function Func110: TtkTokenKind;
function Func115: TtkTokenKind;
function Func116: TtkTokenKind;
function Func121: TtkTokenKind;
function Func123: TtkTokenKind;
function Func125: TtkTokenKind;
function Func141: TtkTokenKind;
@ -284,11 +285,11 @@ begin
'_', '0'..'9', 'a'..'z', 'A'..'Z': Identifiers[I] := True;
else Identifiers[I] := False;
end;
Case I in['_', 'a'..'z', 'A'..'Z'] of
Case I in['a'..'z', 'A'..'Z'] of { Bug fix: mHashTable['_'] was uninitialised. [Kit] }
True:
begin
if (I > #64) and (I < #91) then mHashTable[I] := Ord(I) - 64 else
if (I > #96) then mHashTable[I] := Ord(I) - 95;
mHashTable[I] := Ord(I) - 95;
end;
else mHashTable[I] := 0;
end;
@ -355,6 +356,7 @@ begin
fIdentFuncTable[110] := @Func110;
fIdentFuncTable[115] := @Func115;
fIdentFuncTable[116] := @Func116;
fIdentFuncTable[121] := @Func121;
fIdentFuncTable[123] := @Func123;
fIdentFuncTable[125] := @Func125;
fIdentFuncTable[141] := @Func141;
@ -686,6 +688,13 @@ begin
if KeyComp('operator') then Result := tkKey else Result := tkIdentifier;
end;
function TSynCppSyn.Func121: TtkTokenKind;
begin
if KeyComp('_vectorcall') then Result := tkKey else
if KeyComp('__vectorcall') then Result := tkKey else
Result := tkIdentifier;
end;
function TSynCppSyn.Func123: TtkTokenKind;
begin
if KeyComp('dynamic_cast') then Result := tkKey else

View File

@ -425,8 +425,9 @@ type
function Func103: TtkTokenKind;
function Func105: TtkTokenKind;
function Func106: TtkTokenKind;
function Func108: TtkTokenKind; // "operator"
function Func112: TtkTokenKind; // "requires"
function Func108: TtkTokenKind; // "operator"
function Func111: TtkTokenKind; // "vectorcall"
function Func112: TtkTokenKind; // "requires"
function Func117: TtkTokenKind;
function Func122: TtkTokenKind; // "otherwise"
function Func124: TtkTokenKind;
@ -787,6 +788,7 @@ begin
fIdentFuncTable[105] := @Func105;
fIdentFuncTable[106] := @Func106;
fIdentFuncTable[108] := @Func108; // "operator"
fIdentFuncTable[111] := @Func111; // "vectorcall"
fIdentFuncTable[112] := @Func112; // "requires"
fIdentFuncTable[117] := @Func117;
fIdentFuncTable[122] := @Func122;
@ -2325,9 +2327,17 @@ begin
Result := tkKey else Result := tkIdentifier;
end;
function TSynPasSyn.Func111: TtkTokenKind;
begin
if KeyComp('vectorcall') and (TopPascalCodeFoldBlockType in ProcModifierAllowed) then
Result := tkKey
else
Result := tkIdentifier;
end;
function TSynPasSyn.AltFunc: TtkTokenKind;
begin
Result := tkIdentifier
Result := tkIdentifier;
end;
function TSynPasSyn.IdentKind(p: integer): TtkTokenKind;
@ -2336,7 +2346,7 @@ var
begin
fToIdent := p;
HashKey := KeyHash;
if HashKey < 192 then
if HashKey <= High(fIdentFuncTable) then
Result := fIdentFuncTable[HashKey]()
else
Result := tkIdentifier;