* Fixed parsing of constref and one more case of deprecated hint

git-svn-id: trunk@21850 -
This commit is contained in:
michael 2012-07-10 15:14:14 +00:00
parent c04bfe02e3
commit f8e6cfc6b8
3 changed files with 16 additions and 2 deletions

View File

@ -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];

View File

@ -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

View File

@ -87,6 +87,7 @@ type
tkcase,
tkclass,
tkconst,
tkconstref,
tkconstructor,
tkdestructor,
tkdiv,
@ -412,6 +413,7 @@ const
'case',
'class',
'const',
'constref',
'constructor',
'destructor',
'div',