mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 06:59:14 +02:00
codetools: param specifier out only if modeswitch out is on
git-svn-id: trunk@32062 -
This commit is contained in:
parent
1ce3fe06e4
commit
76ed2c599f
@ -314,7 +314,7 @@ var
|
|||||||
begin
|
begin
|
||||||
// read parameter prefix modifier
|
// read parameter prefix modifier
|
||||||
if UpAtomIs('VAR') or UpAtomIs('CONST') or UpAtomIs('CONSTREF')
|
if UpAtomIs('VAR') or UpAtomIs('CONST') or UpAtomIs('CONSTREF')
|
||||||
or (UpAtomIs('OUT') and (Scanner.CompilerMode in [cmOBJFPC,cmDELPHI,cmFPC]))
|
or (UpAtomIs('OUT') and (cmsOut in Scanner.CompilerModeSwitches))
|
||||||
then begin
|
then begin
|
||||||
CurParam.Modifier:=CurPos;
|
CurParam.Modifier:=CurPos;
|
||||||
ReadNextAtom;
|
ReadNextAtom;
|
||||||
|
@ -1630,7 +1630,7 @@ var
|
|||||||
ParameterType:=ptConst
|
ParameterType:=ptConst
|
||||||
else if UpAtomIs('VAR') then
|
else if UpAtomIs('VAR') then
|
||||||
ParameterType:=ptVar
|
ParameterType:=ptVar
|
||||||
else if UpAtomIs('OUT') then
|
else if UpAtomIs('OUT') and (cmsOut in Scanner.CompilerModeSwitches) then
|
||||||
ParameterType:=ptOut
|
ParameterType:=ptOut
|
||||||
else
|
else
|
||||||
ParameterType:=ptNoSpecifier;
|
ParameterType:=ptNoSpecifier;
|
||||||
|
@ -7939,7 +7939,8 @@ begin
|
|||||||
if (ParamCompatibility=tcIncompatible)
|
if (ParamCompatibility=tcIncompatible)
|
||||||
or ((ParamCompatibility=tcCompatible)
|
or ((ParamCompatibility=tcCompatible)
|
||||||
and MoveCursorToParameterSpecifier(ParamNode)
|
and MoveCursorToParameterSpecifier(ParamNode)
|
||||||
and (UpAtomIs('VAR') or UpAtomIs('OUT') or UpAtomIs('CONSTREF')))
|
and (UpAtomIs('VAR') or UpAtomIs('CONSTREF')
|
||||||
|
or (UpAtomIs('OUT') and (cmsOut in Scanner.CompilerModeSwitches))))
|
||||||
then begin
|
then begin
|
||||||
Result:=tcIncompatible;
|
Result:=tcIncompatible;
|
||||||
exit;
|
exit;
|
||||||
|
@ -998,7 +998,7 @@ begin
|
|||||||
KeyWordLists.Add(WordIsKeyWord);
|
KeyWordLists.Add(WordIsKeyWord);
|
||||||
with WordIsKeyWord do begin
|
with WordIsKeyWord do begin
|
||||||
//Add('ON',{$ifdef FPC}@{$endif}AllwaysTrue); // not for Delphi
|
//Add('ON',{$ifdef FPC}@{$endif}AllwaysTrue); // not for Delphi
|
||||||
Add('OUT',{$ifdef FPC}@{$endif}AllwaysTrue);
|
//Add('OUT',{$ifdef FPC}@{$endif}AllwaysTrue); only if modeswitch out+
|
||||||
Add('AND',{$ifdef FPC}@{$endif}AllwaysTrue);
|
Add('AND',{$ifdef FPC}@{$endif}AllwaysTrue);
|
||||||
Add('ARRAY',{$ifdef FPC}@{$endif}AllwaysTrue);
|
Add('ARRAY',{$ifdef FPC}@{$endif}AllwaysTrue);
|
||||||
Add('AS',{$ifdef FPC}@{$endif}AllwaysTrue);
|
Add('AS',{$ifdef FPC}@{$endif}AllwaysTrue);
|
||||||
|
@ -173,14 +173,14 @@ const
|
|||||||
[cmsResult,cmsProperty,cmsNested_comment,cmsCvar_support],
|
[cmsResult,cmsProperty,cmsNested_comment,cmsCvar_support],
|
||||||
// cmDELPHI
|
// cmDELPHI
|
||||||
[cmsDefault_ansistring,cmsResult,cmsAdvancedRecords,cmsProperty,
|
[cmsDefault_ansistring,cmsResult,cmsAdvancedRecords,cmsProperty,
|
||||||
cmsCvar_support],
|
cmsCvar_support,cmsOut],
|
||||||
// cmGPC
|
// cmGPC
|
||||||
[],
|
[],
|
||||||
// cmTP
|
// cmTP
|
||||||
[cmsResult,cmsTp_procvar],
|
[cmsResult,cmsTp_procvar],
|
||||||
// cmOBJFPC
|
// cmOBJFPC
|
||||||
[cmsDefault_ansistring,cmsResult,cmsProperty,cmsNested_comment,
|
[cmsDefault_ansistring,cmsResult,cmsProperty,cmsNested_comment,
|
||||||
cmsCvar_support],
|
cmsCvar_support,cmsOut],
|
||||||
// cmMacPas
|
// cmMacPas
|
||||||
[cmsMac_procvar,cmsProperty],
|
[cmsMac_procvar,cmsProperty],
|
||||||
// cmISO
|
// cmISO
|
||||||
|
@ -1172,7 +1172,7 @@ var CloseBracket: char;
|
|||||||
begin
|
begin
|
||||||
// read parameter prefix modifier
|
// read parameter prefix modifier
|
||||||
if UpAtomIs('VAR') or UpAtomIs('CONST') or UpAtomIs('CONSTREF')
|
if UpAtomIs('VAR') or UpAtomIs('CONST') or UpAtomIs('CONSTREF')
|
||||||
or (UpAtomIs('OUT') and (Scanner.CompilerMode in [cmOBJFPC,cmDELPHI,cmFPC]))
|
or (UpAtomIs('OUT') and (cmsOut in Scanner.CompilerModeSwitches))
|
||||||
then begin
|
then begin
|
||||||
if not Extract then
|
if not Extract then
|
||||||
ReadNextAtom
|
ReadNextAtom
|
||||||
|
Loading…
Reference in New Issue
Block a user