mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-27 10:52:50 +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;
|
end;
|
||||||
t_uniondef :
|
t_uniondef :
|
||||||
begin
|
begin
|
||||||
|
inc(typedef_level);
|
||||||
if (typedef_level>1) and (p^.p1=nil) and
|
if (typedef_level>1) and (p^.p1=nil) and
|
||||||
(p^.p2^.typ=t_id) then
|
(p^.p2^.typ=t_id) then
|
||||||
begin
|
begin
|
||||||
@ -1056,6 +1057,7 @@ program h2pas;
|
|||||||
flush(outfile);
|
flush(outfile);
|
||||||
dec(typedef_level);
|
dec(typedef_level);
|
||||||
end;
|
end;
|
||||||
|
dec(typedef_level);
|
||||||
end;
|
end;
|
||||||
else
|
else
|
||||||
internalerror(3);
|
internalerror(3);
|
||||||
@ -1789,12 +1791,12 @@ begin
|
|||||||
end;
|
end;
|
||||||
41 : begin
|
41 : begin
|
||||||
|
|
||||||
yyval:=new(presobject,init_two(t_uniondef,nil,yyv[yysp-0]));
|
yyval:=yyv[yysp-0];
|
||||||
|
|
||||||
end;
|
end;
|
||||||
42 : begin
|
42 : begin
|
||||||
|
|
||||||
yyval:=new(presobject,init_two(t_structdef,nil,yyv[yysp-0]));
|
yyval:=yyv[yysp-0];
|
||||||
|
|
||||||
end;
|
end;
|
||||||
43 : begin
|
43 : begin
|
||||||
@ -1804,7 +1806,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
44 : begin
|
44 : begin
|
||||||
|
|
||||||
yyval:=new(presobject,init_two(t_enumdef,nil,yyv[yysp-0]));
|
yyval:=yyv[yysp-0];
|
||||||
|
|
||||||
end;
|
end;
|
||||||
45 : begin
|
45 : begin
|
||||||
@ -7857,9 +7859,9 @@ end.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.4 2001-08-17 22:47:30 florian
|
Revision 1.5 2001-12-17 23:34:58 florian
|
||||||
* C contant size specifiers can be lower cased as well:
|
* support for enum enumtype enumvar; fixed
|
||||||
0x12341234u is allowed
|
same for unions done
|
||||||
|
|
||||||
Revision 1.3 2001/04/10 21:22:38 peter
|
Revision 1.3 2001/04/10 21:22:38 peter
|
||||||
* more fixes that were still laying around
|
* more fixes that were still laying around
|
||||||
|
@ -1011,6 +1011,7 @@ program h2pas;
|
|||||||
end;
|
end;
|
||||||
t_uniondef :
|
t_uniondef :
|
||||||
begin
|
begin
|
||||||
|
inc(typedef_level);
|
||||||
if (typedef_level>1) and (p^.p1=nil) and
|
if (typedef_level>1) and (p^.p1=nil) and
|
||||||
(p^.p2^.typ=t_id) then
|
(p^.p2^.typ=t_id) then
|
||||||
begin
|
begin
|
||||||
@ -1052,6 +1053,7 @@ program h2pas;
|
|||||||
flush(outfile);
|
flush(outfile);
|
||||||
dec(typedef_level);
|
dec(typedef_level);
|
||||||
end;
|
end;
|
||||||
|
dec(typedef_level);
|
||||||
end;
|
end;
|
||||||
else
|
else
|
||||||
internalerror(3);
|
internalerror(3);
|
||||||
@ -1710,11 +1712,11 @@ special_type_specifier :
|
|||||||
} |
|
} |
|
||||||
UNION dname
|
UNION dname
|
||||||
{
|
{
|
||||||
$$:=new(presobject,init_two(t_uniondef,nil,$2));
|
$$:=$2;
|
||||||
} |
|
} |
|
||||||
STRUCT dname
|
STRUCT dname
|
||||||
{
|
{
|
||||||
$$:=new(presobject,init_two(t_structdef,nil,$2));
|
$$:=$2;
|
||||||
} |
|
} |
|
||||||
ENUM dname closed_enum_list
|
ENUM dname closed_enum_list
|
||||||
{
|
{
|
||||||
@ -1722,7 +1724,7 @@ special_type_specifier :
|
|||||||
} |
|
} |
|
||||||
ENUM dname
|
ENUM dname
|
||||||
{
|
{
|
||||||
$$:=new(presobject,init_two(t_enumdef,nil,$2));
|
$$:=$2;
|
||||||
};
|
};
|
||||||
|
|
||||||
type_specifier :
|
type_specifier :
|
||||||
@ -2441,7 +2443,11 @@ end.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$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
|
* more fixes that were still laying around
|
||||||
|
|
||||||
Revision 1.2 2000/12/27 21:59:59 peter
|
Revision 1.2 2000/12/27 21:59:59 peter
|
||||||
|
@ -21,6 +21,22 @@ struct _test
|
|||||||
int y;
|
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 *,int);
|
||||||
void proc(int *p,int i);
|
void proc(int *p,int i);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user