mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-10 01:36:16 +02:00
IDE: Handle Caret (^) separately from symbols (CodeBeautifier): Issue #22514, patch from Anton.
git-svn-id: trunk@47037 -
This commit is contained in:
parent
52e639a849
commit
3dd8de39eb
@ -78,7 +78,7 @@ type
|
||||
TAtomType = (atNone, atKeyword, atIdentifier, atColon, atSemicolon, atComma,
|
||||
atPoint, atAt, atNumber, atStringConstant, atNewLine,
|
||||
atSpace, atCommentStart, atDirectiveStart, atCommentEnd,
|
||||
atSymbol, atBracket);
|
||||
atSymbol, atBracket, atCaret);
|
||||
TAtomTypes = set of TAtomType;
|
||||
|
||||
TBeautifyCodeFlag = (
|
||||
@ -312,7 +312,8 @@ const
|
||||
'DirectiveStart',
|
||||
'CommentEnd',
|
||||
'Symbol',
|
||||
'Bracket'
|
||||
'Bracket',
|
||||
'Caret'
|
||||
);
|
||||
|
||||
WordPolicyNames: array[TWordPolicy] of shortstring = (
|
||||
@ -1594,6 +1595,7 @@ begin
|
||||
':': CurAtomType:=atColon;
|
||||
';': CurAtomType:=atSemicolon;
|
||||
'@': CurAtomType:=atAt;
|
||||
'^': CurAtomType:=atCaret;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
@ -272,6 +272,7 @@ begin
|
||||
atSpace: Result:=lisCodeToolsOptsSpace;
|
||||
atSymbol: Result:=lisCodeToolsOptsSymbol;
|
||||
atBracket: Result:=lisCodeToolsOptsBracket;
|
||||
atCaret: Result:=lisCodeToolsOptsCaret;
|
||||
else
|
||||
Result:='???';
|
||||
end;
|
||||
|
@ -79,6 +79,7 @@ const
|
||||
'const i=1+2+3;'#13 +
|
||||
'begin'#13 +
|
||||
' A:=@B.C;D:=3;E:=X[5];'#13 +
|
||||
' PRec^.F:=PArr^[5];'#13 +
|
||||
' {$I unit1.lrs}'#13 +
|
||||
' {$R-}{$R+}'#13 +
|
||||
' // ąčęęėįšųūž'#13+
|
||||
@ -147,7 +148,7 @@ procedure TCodetoolsSpaceOptionsFrame.Setup(
|
||||
const
|
||||
DoInsertSpaceAtoms = [
|
||||
atKeyword, atIdentifier, atColon, atSemicolon, atComma,
|
||||
atPoint, atAt, atNumber, atStringConstant, atSymbol, atBracket];
|
||||
atPoint, atAt, atNumber, atStringConstant, atSymbol, atBracket, atCaret];
|
||||
begin
|
||||
with DoInsertSpaceInFrontGroupBox do begin
|
||||
Caption:=dlgInsSpaceFront;
|
||||
|
@ -3298,6 +3298,7 @@ resourcestring
|
||||
lisCodeToolsOptsSpace = 'Space';
|
||||
lisCodeToolsOptsSymbol = 'Symbol';
|
||||
lisCodeToolsOptsBracket = 'Bracket';
|
||||
lisCodeToolsOptsCaret = 'Caret (^)';
|
||||
|
||||
// codetools defines
|
||||
lisCodeToolsDefsWriteError = 'Write error';
|
||||
|
Loading…
Reference in New Issue
Block a user