mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-24 11:19:59 +02:00
codetools: implemnted parsing variables pointer struct
git-svn-id: trunk@14320 -
This commit is contained in:
parent
2f6693b16f
commit
ab2ebe4ec9
@ -321,15 +321,9 @@ begin
|
|||||||
end else begin
|
end else begin
|
||||||
UndoReadNextAtom;
|
UndoReadNextAtom;
|
||||||
end;
|
end;
|
||||||
end else begin
|
end else
|
||||||
// this is a struct variable
|
RaiseExpectedButAtomFound('{');
|
||||||
while AtomIsChar('*') do begin
|
|
||||||
ReadNextAtom;
|
|
||||||
end;
|
|
||||||
if not AtomIsIdentifier then
|
|
||||||
RaiseExpectedButAtomFound('identifier');
|
|
||||||
end;
|
|
||||||
|
|
||||||
// close node
|
// close node
|
||||||
EndChildNode;
|
EndChildNode;
|
||||||
end;
|
end;
|
||||||
@ -470,14 +464,19 @@ var
|
|||||||
begin
|
begin
|
||||||
DebugLn(['TCCodeParserTool.ReadVariable ']);
|
DebugLn(['TCCodeParserTool.ReadVariable ']);
|
||||||
CreateChildNode(ccnVariable);
|
CreateChildNode(ccnVariable);
|
||||||
// read function modifiers
|
|
||||||
IsFunction:=false;
|
IsFunction:=false;
|
||||||
while IsCCodeFunctionModifier.DoItCaseSensitive(Src,AtomStart,SrcPos-AtomStart)
|
if AtomIs('struct') then begin
|
||||||
do begin
|
|
||||||
IsFunction:=true;
|
|
||||||
ReadNextAtom;
|
ReadNextAtom;
|
||||||
if not AtomIsIdentifier then
|
end else if IsCCodeFunctionModifier.DoItCaseSensitive(Src,AtomStart,SrcPos-AtomStart)
|
||||||
RaiseExpectedButAtomFound('identifier');
|
then begin
|
||||||
|
// read function modifiers
|
||||||
|
while IsCCodeFunctionModifier.DoItCaseSensitive(Src,AtomStart,SrcPos-AtomStart)
|
||||||
|
do begin
|
||||||
|
IsFunction:=true;
|
||||||
|
ReadNextAtom;
|
||||||
|
if not AtomIsIdentifier then
|
||||||
|
RaiseExpectedButAtomFound('identifier');
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
// read name
|
// read name
|
||||||
ReadNextAtom;
|
ReadNextAtom;
|
||||||
|
Loading…
Reference in New Issue
Block a user