summaryrefslogtreecommitdiff
path: root/giscanner/scannerparser.y
diff options
context:
space:
mode:
authorJohan Dahlin <jdahlin@async.com.br>2008-05-31 23:20:56 +0000
committerJohan Dahlin <johan@src.gnome.org>2008-05-31 23:20:56 +0000
commit04e4dcd86e2318f637c0e9c01cea1da4476c9a58 (patch)
tree7c0fa93890808bc33e67a0376268f56019b0e624 /giscanner/scannerparser.y
parent7a8c0642f5cc6e80e873f239984beeab7b9ba6ff (diff)
downloadgobject-introspection-04e4dcd86e2318f637c0e9c01cea1da4476c9a58.tar.gz
Add a new source type enum for member. Use __repr__ for improved debugging
2008-05-31 Johan Dahlin <jdahlin@async.com.br> * giscanner/scannerparser.y: * giscanner/sourcescanner.h: * giscanner/sourcescanner.py: Add a new source type enum for member. Use __repr__ for improved debugging * giscanner/girparser.py: Ignore some more * giscanner/transformer.py: Improve parsing of struct members. * tests/parser/foo-object.h: Add a new testcase svn path=/trunk/; revision=281
Diffstat (limited to 'giscanner/scannerparser.y')
-rw-r--r--giscanner/scannerparser.y24
1 files changed, 13 insertions, 11 deletions
diff --git a/giscanner/scannerparser.y b/giscanner/scannerparser.y
index 45d67891..f21950db 100644
--- a/giscanner/scannerparser.y
+++ b/giscanner/scannerparser.y
@@ -728,17 +728,19 @@ struct_declaration_list
struct_declaration
: specifier_qualifier_list struct_declarator_list ';'
{
- GList *l;
- $$ = NULL;
- for (l = $2; l != NULL; l = l->next) {
- GISourceSymbol *sym = l->data;
- if ($1->storage_class_specifier & STORAGE_CLASS_TYPEDEF) {
- sym->type = CSYMBOL_TYPE_TYPEDEF;
- }
- gi_source_symbol_merge_type (sym, gi_source_type_copy ($1));
- $$ = g_list_append ($$, sym);
- }
- ctype_free ($1);
+ GList *l;
+ $$ = NULL;
+ for (l = $2; l != NULL; l = l->next)
+ {
+ GISourceSymbol *sym = l->data;
+ if ($1->storage_class_specifier & STORAGE_CLASS_TYPEDEF)
+ sym->type = CSYMBOL_TYPE_TYPEDEF;
+ else
+ sym->type = CSYMBOL_TYPE_MEMBER;
+ gi_source_symbol_merge_type (sym, gi_source_type_copy ($1));
+ $$ = g_list_append ($$, sym);
+ }
+ ctype_free ($1);
}
;