mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-14 10:20:21 +02:00
* support for enum enumtype enumvar; fixed
same for unions done
This commit is contained in:
parent
521c608ece
commit
f86c568373
@ -1015,6 +1015,7 @@ program h2pas;
|
||||
end;
|
||||
t_uniondef :
|
||||
begin
|
||||
inc(typedef_level);
|
||||
if (typedef_level>1) and (p^.p1=nil) and
|
||||
(p^.p2^.typ=t_id) then
|
||||
begin
|
||||
@ -1056,6 +1057,7 @@ program h2pas;
|
||||
flush(outfile);
|
||||
dec(typedef_level);
|
||||
end;
|
||||
dec(typedef_level);
|
||||
end;
|
||||
else
|
||||
internalerror(3);
|
||||
@ -1789,12 +1791,12 @@ begin
|
||||
end;
|
||||
41 : begin
|
||||
|
||||
yyval:=new(presobject,init_two(t_uniondef,nil,yyv[yysp-0]));
|
||||
yyval:=yyv[yysp-0];
|
||||
|
||||
end;
|
||||
42 : begin
|
||||
|
||||
yyval:=new(presobject,init_two(t_structdef,nil,yyv[yysp-0]));
|
||||
yyval:=yyv[yysp-0];
|
||||
|
||||
end;
|
||||
43 : begin
|
||||
@ -1804,7 +1806,7 @@ begin
|
||||
end;
|
||||
44 : begin
|
||||
|
||||
yyval:=new(presobject,init_two(t_enumdef,nil,yyv[yysp-0]));
|
||||
yyval:=yyv[yysp-0];
|
||||
|
||||
end;
|
||||
45 : begin
|
||||
@ -7857,9 +7859,9 @@ end.
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.4 2001-08-17 22:47:30 florian
|
||||
* C contant size specifiers can be lower cased as well:
|
||||
0x12341234u is allowed
|
||||
Revision 1.5 2001-12-17 23:34:58 florian
|
||||
* support for enum enumtype enumvar; fixed
|
||||
same for unions done
|
||||
|
||||
Revision 1.3 2001/04/10 21:22:38 peter
|
||||
* more fixes that were still laying around
|
||||
@ -7870,5 +7872,5 @@ end.
|
||||
(you need to run h2paspp manual)
|
||||
|
||||
Revision 1.1 2000/07/13 10:16:23 michael
|
||||
+ Initial import
|
||||
+ Initial import
|
||||
}
|
@ -1011,6 +1011,7 @@ program h2pas;
|
||||
end;
|
||||
t_uniondef :
|
||||
begin
|
||||
inc(typedef_level);
|
||||
if (typedef_level>1) and (p^.p1=nil) and
|
||||
(p^.p2^.typ=t_id) then
|
||||
begin
|
||||
@ -1052,6 +1053,7 @@ program h2pas;
|
||||
flush(outfile);
|
||||
dec(typedef_level);
|
||||
end;
|
||||
dec(typedef_level);
|
||||
end;
|
||||
else
|
||||
internalerror(3);
|
||||
@ -1710,11 +1712,11 @@ special_type_specifier :
|
||||
} |
|
||||
UNION dname
|
||||
{
|
||||
$$:=new(presobject,init_two(t_uniondef,nil,$2));
|
||||
$$:=$2;
|
||||
} |
|
||||
STRUCT dname
|
||||
{
|
||||
$$:=new(presobject,init_two(t_structdef,nil,$2));
|
||||
$$:=$2;
|
||||
} |
|
||||
ENUM dname closed_enum_list
|
||||
{
|
||||
@ -1722,7 +1724,7 @@ special_type_specifier :
|
||||
} |
|
||||
ENUM dname
|
||||
{
|
||||
$$:=new(presobject,init_two(t_enumdef,nil,$2));
|
||||
$$:=$2;
|
||||
};
|
||||
|
||||
type_specifier :
|
||||
@ -2441,7 +2443,11 @@ end.
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.3 2001-04-10 21:22:38 peter
|
||||
Revision 1.4 2001-12-17 23:34:59 florian
|
||||
* support for enum enumtype enumvar; fixed
|
||||
same for unions done
|
||||
|
||||
Revision 1.3 2001/04/10 21:22:38 peter
|
||||
* more fixes that were still laying around
|
||||
|
||||
Revision 1.2 2000/12/27 21:59:59 peter
|
||||
@ -2450,5 +2456,5 @@ end.
|
||||
(you need to run h2paspp manual)
|
||||
|
||||
Revision 1.1 2000/07/13 10:16:23 michael
|
||||
+ Initial import
|
||||
+ Initial import
|
||||
}
|
||||
|
@ -21,6 +21,22 @@ struct _test
|
||||
int y;
|
||||
};
|
||||
|
||||
struct XML_cp {
|
||||
enum XML_Content_Type type;
|
||||
enum XML_Content_Quant quant;
|
||||
struct _test test;
|
||||
union _test2 test2;
|
||||
XML_Char * name;
|
||||
unsigned int numchildren;
|
||||
XML_Content * children;
|
||||
};
|
||||
|
||||
typedef void (*XML_AttlistDeclHandler) (void *userData,
|
||||
const XML_Char *elname,
|
||||
const XML_Char *attname,
|
||||
const XML_Char *att_type,
|
||||
const XML_Char *dflt,
|
||||
int isrequired);
|
||||
void proc(int *,int);
|
||||
void proc(int *p,int i);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user