codetools: implemnted parsing variables pointer struct

git-svn-id: trunk@14320 -
This commit is contained in:
mattias 2008-02-29 17:16:37 +00:00
parent 2f6693b16f
commit ab2ebe4ec9

View File

@ -321,14 +321,8 @@ 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;
@ -470,8 +464,12 @@ var
begin
DebugLn(['TCCodeParserTool.ReadVariable ']);
CreateChildNode(ccnVariable);
// read function modifiers
IsFunction:=false;
if AtomIs('struct') then begin
ReadNextAtom;
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;
@ -479,6 +477,7 @@ begin
if not AtomIsIdentifier then
RaiseExpectedButAtomFound('identifier');
end;
end;
// read name
ReadNextAtom;
while AtomIsChar('*') do begin