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