mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-19 09:09:32 +02:00
Debugger: changed default intrinsic prefic to ":" / require bracket if no prefix
This commit is contained in:
parent
8b861738e0
commit
659d6aec30
@ -49,7 +49,7 @@ type
|
||||
|
||||
TSeparatorType = (ppstComma);
|
||||
|
||||
TFpIntrinsicPrefix = (ipExclamation, ipColon, ipNoPrefix);
|
||||
TFpIntrinsicPrefix = (ipColon, ipExclamation, ipNoPrefix);
|
||||
TFpIntrinsicFunc = (ifErrorNotFound, ifLength, ifChildClass);
|
||||
|
||||
TFpPascalParserCallFunctionProc = function (AnExpressionPart: TFpPascalExpressionPart;
|
||||
@ -1754,8 +1754,10 @@ var
|
||||
i: Integer;
|
||||
begin
|
||||
Result := AParams.Count - 1 = ARequiredCount;
|
||||
if not Result then
|
||||
if not Result then begin
|
||||
SetError('wrong argument count');
|
||||
exit;
|
||||
end;
|
||||
|
||||
for i := 1 to ARequiredCount do
|
||||
if (AParams.Items[i] = nil) then begin
|
||||
@ -1997,6 +1999,16 @@ var
|
||||
AddIntrinsic(intr);
|
||||
end;
|
||||
|
||||
function CheckOpenBracket: Boolean;
|
||||
var
|
||||
p: PChar;
|
||||
begin
|
||||
p := TokenEndPtr;
|
||||
while p^ in [' ', #9, #10, #13] do
|
||||
inc(p);
|
||||
Result := p^ = '(';
|
||||
end;
|
||||
|
||||
procedure AddIdentifier;
|
||||
var
|
||||
intr: TFpIntrinsicFunc;
|
||||
@ -2033,7 +2045,7 @@ var
|
||||
|
||||
if (FIntrinsicPrefix = ipNoPrefix) then begin
|
||||
intr := LookupIntrinsic(CurPtr, TokenEndPtr - CurPtr);
|
||||
if intr <> ifErrorNotFound then begin
|
||||
if (intr <> ifErrorNotFound) and CheckOpenBracket then begin
|
||||
AddIntrinsic(intr);
|
||||
exit;
|
||||
end;
|
||||
|
@ -129,7 +129,7 @@ type
|
||||
|
||||
property MemLimits: TFpDebugDebuggerPropertiesMemLimits read FMemLimits write SetMemLimits;
|
||||
property HandleDebugBreakInstruction: TFpInt3DebugBreakOptions read FHandleDebugBreakInstruction write FHandleDebugBreakInstruction default [dboIgnoreAll];
|
||||
property IntrinsicPrefix: TFpIntrinsicPrefix read FIntrinsicPrefix write FIntrinsicPrefix default ipExclamation;
|
||||
property IntrinsicPrefix: TFpIntrinsicPrefix read FIntrinsicPrefix write FIntrinsicPrefix default ipColon;
|
||||
end;
|
||||
|
||||
|
||||
@ -370,7 +370,7 @@ begin
|
||||
{$endif windows}
|
||||
FMemLimits := TFpDebugDebuggerPropertiesMemLimits.Create;
|
||||
FHandleDebugBreakInstruction := [dboIgnoreAll];
|
||||
FIntrinsicPrefix := ipExclamation;
|
||||
FIntrinsicPrefix := ipColon;
|
||||
end;
|
||||
|
||||
destructor TFpDebugDebuggerProperties.Destroy;
|
||||
|
@ -1472,7 +1472,7 @@ end;
|
||||
|
||||
procedure TTestWatches.TestWatchesIntrinsic;
|
||||
|
||||
const PREFIX = '!';
|
||||
const PREFIX = ':';
|
||||
|
||||
type
|
||||
TTestLoc = (tlAny, tlConst, tlParam, tlArrayWrap, tlPointer, tlPointerAny, tlClassConst, tlClassVar);
|
||||
|
Loading…
Reference in New Issue
Block a user