mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-08 22:31:27 +02:00
* Fixed parsing of constref and one more case of deprecated hint
git-svn-id: trunk@21850 -
This commit is contained in:
parent
c04bfe02e3
commit
f8e6cfc6b8
@ -496,7 +496,7 @@ type
|
||||
|
||||
|
||||
|
||||
TArgumentAccess = (argDefault, argConst, argVar, argOut);
|
||||
TArgumentAccess = (argDefault, argConst, argVar, argOut, argConstRef);
|
||||
|
||||
{ TPasArgument }
|
||||
|
||||
@ -1032,7 +1032,7 @@ type
|
||||
end;
|
||||
|
||||
const
|
||||
AccessNames: array[TArgumentAccess] of string[6] = ('', 'const ', 'var ', 'out ');
|
||||
AccessNames: array[TArgumentAccess] of string[9] = ('', 'const ', 'var ', 'out ','constref ');
|
||||
AllVisibilities: TPasMemberVisibilities =
|
||||
[visDefault, visPrivate, visProtected, visPublic,
|
||||
visPublished, visAutomated];
|
||||
|
@ -2357,6 +2357,10 @@ begin
|
||||
begin
|
||||
Access := argConst;
|
||||
Name := ExpectIdentifier;
|
||||
end else if CurToken = tkConstRef then
|
||||
begin
|
||||
Access := argConstref;
|
||||
Name := ExpectIdentifier;
|
||||
end else if CurToken = tkVar then
|
||||
begin
|
||||
Access := ArgVar;
|
||||
@ -2597,6 +2601,14 @@ begin
|
||||
if IsCurTokenHint(ahint) then // deprecated,platform,experimental,library, unimplemented etc
|
||||
begin
|
||||
element.hints:=element.hints+[ahint];
|
||||
if aHint=hDeprecated then
|
||||
begin
|
||||
nextToken;
|
||||
if (CurToken<>tkString) then
|
||||
UnGetToken
|
||||
else
|
||||
element.HintMessage:=curtokenstring;
|
||||
end;
|
||||
consumesemi;
|
||||
end
|
||||
else if (tok = 'PUBLIC') then
|
||||
|
@ -87,6 +87,7 @@ type
|
||||
tkcase,
|
||||
tkclass,
|
||||
tkconst,
|
||||
tkconstref,
|
||||
tkconstructor,
|
||||
tkdestructor,
|
||||
tkdiv,
|
||||
@ -412,6 +413,7 @@ const
|
||||
'case',
|
||||
'class',
|
||||
'const',
|
||||
'constref',
|
||||
'constructor',
|
||||
'destructor',
|
||||
'div',
|
||||
|
Loading…
Reference in New Issue
Block a user