mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 16:19:36 +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
|
||||
UndoReadNextAtom;
|
||||
end;
|
||||
end else begin
|
||||
// this is a struct variable
|
||||
while AtomIsChar('*') do begin
|
||||
ReadNextAtom;
|
||||
end;
|
||||
if not AtomIsIdentifier then
|
||||
RaiseExpectedButAtomFound('identifier');
|
||||
end;
|
||||
|
||||
end else
|
||||
RaiseExpectedButAtomFound('{');
|
||||
|
||||
// close node
|
||||
EndChildNode;
|
||||
end;
|
||||
@ -470,14 +464,19 @@ var
|
||||
begin
|
||||
DebugLn(['TCCodeParserTool.ReadVariable ']);
|
||||
CreateChildNode(ccnVariable);
|
||||
// read function modifiers
|
||||
IsFunction:=false;
|
||||
while IsCCodeFunctionModifier.DoItCaseSensitive(Src,AtomStart,SrcPos-AtomStart)
|
||||
do begin
|
||||
IsFunction:=true;
|
||||
if AtomIs('struct') then begin
|
||||
ReadNextAtom;
|
||||
if not AtomIsIdentifier then
|
||||
RaiseExpectedButAtomFound('identifier');
|
||||
end else if IsCCodeFunctionModifier.DoItCaseSensitive(Src,AtomStart,SrcPos-AtomStart)
|
||||
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;
|
||||
// read name
|
||||
ReadNextAtom;
|
||||
|
Loading…
Reference in New Issue
Block a user