mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 13:59:31 +02:00
codetools: implemented parsing union
git-svn-id: trunk@14322 -
This commit is contained in:
parent
3339383d3f
commit
e6f1b79af9
@ -280,6 +280,8 @@ procedure TCCodeParserTool.ReadStruct(NeedIdentifier: boolean);
|
||||
int ctrl_sock;
|
||||
}
|
||||
struct hidp_conninfo *ci;
|
||||
|
||||
typedef struct _sdp_list sdp_list_t;
|
||||
*)
|
||||
begin
|
||||
CreateChildNode(ccnStruct);
|
||||
@ -321,6 +323,8 @@ begin
|
||||
end else begin
|
||||
UndoReadNextAtom;
|
||||
end;
|
||||
end else if AtomIsIdentifier then begin
|
||||
// using another struct
|
||||
end else
|
||||
RaiseExpectedButAtomFound('{');
|
||||
|
||||
@ -467,6 +471,11 @@ begin
|
||||
IsFunction:=false;
|
||||
if AtomIs('struct') then begin
|
||||
ReadNextAtom;
|
||||
end else if AtomIs('union') then begin
|
||||
ReadNextAtom;
|
||||
if not AtomIsChar('{') then
|
||||
RaiseExpectedButAtomFound('{');
|
||||
ReadTilBracketClose(true);
|
||||
end else if IsCCodeFunctionModifier.DoItCaseSensitive(Src,AtomStart,SrcPos-AtomStart)
|
||||
then begin
|
||||
// read function modifiers
|
||||
|
Loading…
Reference in New Issue
Block a user