mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-29 22:18:30 +02:00
codetools: implemented parsing struct name
git-svn-id: trunk@14387 -
This commit is contained in:
parent
735da60bb7
commit
4e6ffac026
@ -375,7 +375,7 @@ begin
|
|||||||
CreateChildNode(ccnStruct);
|
CreateChildNode(ccnStruct);
|
||||||
|
|
||||||
ReadNextAtom;
|
ReadNextAtom;
|
||||||
if CurNode.Parent.Desc=ccnVariable then begin
|
if CurNode.Parent.Desc<>ccnTypedef then begin
|
||||||
// read variable name
|
// read variable name
|
||||||
if not AtomIsIdentifier then
|
if not AtomIsIdentifier then
|
||||||
RaiseExpectedButAtomFound('identifier');
|
RaiseExpectedButAtomFound('identifier');
|
||||||
@ -431,11 +431,17 @@ begin
|
|||||||
ReadNextAtom;
|
ReadNextAtom;
|
||||||
if AtomIs('typedef') then
|
if AtomIs('typedef') then
|
||||||
RaiseExpectedButAtomFound('declaration')
|
RaiseExpectedButAtomFound('declaration')
|
||||||
else if AtomIs('struct') then
|
else if AtomIs('struct') then begin
|
||||||
ReadStruct
|
ReadStruct;
|
||||||
else if AtomIs('enum') then
|
ReadNextAtom;
|
||||||
ReadEnum
|
if not AtomIsIdentifier then
|
||||||
else if SrcPos>SrcLen then
|
RaiseExpectedButAtomFound('identifier');
|
||||||
|
end else if AtomIs('enum') then begin
|
||||||
|
ReadEnum;
|
||||||
|
ReadNextAtom;
|
||||||
|
if not AtomIsIdentifier then
|
||||||
|
RaiseExpectedButAtomFound('identifier');
|
||||||
|
end else if SrcPos>SrcLen then
|
||||||
RaiseException('missing declaration')
|
RaiseException('missing declaration')
|
||||||
else
|
else
|
||||||
ReadVariable;
|
ReadVariable;
|
||||||
|
Loading…
Reference in New Issue
Block a user