Jedi Code Format: Allow only one space after certain keywords. Issue #40075, patch by Domingo Galmés.

This commit is contained in:
Juha 2023-01-02 19:27:56 +02:00
parent cf58d5fcb9
commit 5b27a87e76

View File

@ -61,7 +61,11 @@ const
SingleSpaceAfterWords: TTokenTypeSet = [
ttProcedure, ttFunction,
ttConstructor, ttDestructor, ttProperty,
ttOf, ttDo, ttWhile, ttUntil, ttCase, ttIf, ttTo, ttDownTo, ttGeneric];
ttOf, ttDo, ttWhile, ttUntil, ttCase, ttIf, ttTo, ttDownTo, ttGeneric,
ttWith, ttSpecialize];
SingleSpaceAfterClass: TTokenTypeSet = [ttConstructor, ttDestructor,
ttFunction, ttProcedure, ttOperator, ttVar, ttThreadvar];
PossiblyUnaryOperators: TTokenTypeSet = [ttPlus, ttMinus];
@ -74,6 +78,9 @@ begin
Result := False;
if (pt.TokenType=ttClass) and (pt.NextSolidTokenType in SingleSpaceAfterClass) then
Exit(True);
if pt.HasParentNode(nLiteralString) then
exit;