mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-28 11:49:30 +02:00
Codetools: Fix hint directives after vars and consts in PascalReader. Issue #19614, patch from Anton
git-svn-id: trunk@31952 -
This commit is contained in:
parent
59c2d2e1b6
commit
1cb3753a6f
@ -3531,6 +3531,8 @@ begin
|
||||
ParseType(CurPos.StartPos,CurPos.EndPos-CurPos.StartPos);
|
||||
end;
|
||||
ReadConstExpr;
|
||||
// optional: hint modifier
|
||||
ReadHintModifier;
|
||||
end;
|
||||
|
||||
procedure TPascalParserTool.ReadTypeNameAndDefinition;
|
||||
@ -4483,6 +4485,9 @@ begin
|
||||
and (not IsKeyWordInConstAllowed.DoIdentifier(@Src[CurPos.StartPos]))
|
||||
and AtomIsKeyWord then
|
||||
RaiseStringExpectedButAtomFound('constant');
|
||||
if (CurPos.Flag = cafWord) and
|
||||
(UpAtomIs('DEPRECATED') or UpAtomIs('PLATFORM')
|
||||
or UpAtomIs('UNIMPLEMENTED') or UpAtomIs('EXPERIMENTAL')) then Break;
|
||||
if (CurPos.Flag = cafSemicolon) then break;
|
||||
CurNode.EndPos := CurPos.EndPos;
|
||||
ReadNextAtom;
|
||||
|
@ -1487,7 +1487,8 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
ctnVarDefinition,ctnConstant,ctnTypeDefinition,ctnGenericType:
|
||||
ctnVarDefinition,ctnConstant,ctnConstDefinition,
|
||||
ctnTypeDefinition,ctnGenericType:
|
||||
begin
|
||||
Node:=FindTypeNodeOfDefinition(Node);
|
||||
if Node=nil then exit;
|
||||
|
Loading…
Reference in New Issue
Block a user