Added an optional format to a union type, just like for a structure type.

Right now we just ignore the extra stuff (parse it, but don't print it),
which should be fixed if I don't rewrite this entirely.
This commit is contained in:
Steve Nygard 2000-06-25 04:21:49 +00:00
parent 6ed1878499
commit 69b4c62707

9
gram.y
View File

@ -1,7 +1,7 @@
%{
//
// $Id: gram.y,v 1.2 1999/08/09 07:45:03 nygard Exp $
// $Id: gram.y,v 1.3 2000/06/25 04:21:49 nygard Exp $
//
//
@ -269,7 +269,7 @@ union_type:
{
$$ = create_union_type (reverse_types ($2), NULL);
}
| union_type_prefix identifier ')'
| union_type_prefix identifier optional_format ')'
{
$$ = create_union_type (NULL, $2);
}
@ -348,6 +348,9 @@ void format_type (const char *type, const char *name, int level)
int parse_flag;
extern int expand_structures_flag;
#warning NEW FILE
//fprintf(stderr, "type: %s\t%s\n", type, name);
rtype = NULL;
yy_scan_string (type);
parse_flag = parse_ivar_type();
@ -376,6 +379,8 @@ void format_method (char method_type, const char *name, const char *types)
{
int parse_flag;
//fprintf(stderr, "method: %s\t%s\n", name, types);
if (name == NULL)
{
printf ("%c (method name not found in OBJC segments), args: %s", method_type, types);