mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 11:39:28 +02:00
codetools: parsing on E:Exception do: using ctnVarDefinition, bug #19601
git-svn-id: trunk@31317 -
This commit is contained in:
parent
8c5c123c5d
commit
cf32ea0df9
@ -142,8 +142,8 @@ const
|
||||
|
||||
ctnWithVariable =110;
|
||||
ctnWithStatement =111;
|
||||
ctnOnBlock =112;
|
||||
ctnOnIdentifier =113;// e.g. on E: Exception
|
||||
ctnOnBlock =112;// childs: ctnOnIdentifier+ctnOnStatement, or ctnVarDefinition(with child ctnIdentifier)+ctnOnStatement
|
||||
ctnOnIdentifier =113;// e.g. 'on Exception', Note: on E:Exception creates a ctnVarDefinition
|
||||
ctnOnStatement =114;
|
||||
|
||||
// combined values
|
||||
|
@ -2963,21 +2963,21 @@ begin
|
||||
ReadNextAtom;
|
||||
if CurPos.Flag=cafColon then begin
|
||||
// this is for example: on E: Exception do ;
|
||||
if CreateNodes then begin
|
||||
// close the variable
|
||||
EndChildNode;
|
||||
end;
|
||||
if CreateNodes then
|
||||
CurNode.Desc:=ctnVarDefinition;
|
||||
ReadNextAtom;
|
||||
AtomIsIdentifier(true);
|
||||
if CreateNodes then begin
|
||||
// ctnOnIdentifier for the type
|
||||
// ctnIdentifier for the type
|
||||
CreateChildNode;
|
||||
CurNode.Desc:=ctnOnIdentifier;
|
||||
CurNode.Desc:=ctnIdentifier;
|
||||
CurNode.EndPos:=CurPos.EndPos;
|
||||
end;
|
||||
ReadNextAtom;
|
||||
end;
|
||||
if CurPos.Flag=cafPoint then begin
|
||||
// this is for example: on Unit.Exception do ;
|
||||
// for example: on Unit.Exception do ;
|
||||
// or: on E:Unit.Exception do ;
|
||||
ReadNextAtom;
|
||||
AtomIsIdentifier(true);
|
||||
if CreateNodes then begin
|
||||
@ -2986,7 +2986,12 @@ begin
|
||||
ReadNextAtom;
|
||||
end;
|
||||
if CreateNodes then begin
|
||||
// close the type
|
||||
if CurNode.Desc=ctnIdentifier then begin
|
||||
// close the type
|
||||
CurNode.Parent.EndPos:=CurNode.EndPos;
|
||||
EndChildNode;
|
||||
end;
|
||||
// close ctnVarDefinition or ctnOnIdentifier
|
||||
EndChildNode;
|
||||
end;
|
||||
// read 'do'
|
||||
|
Loading…
Reference in New Issue
Block a user