diff options
author | Johan Dahlin <johan@gnome.org> | 2011-09-13 11:57:28 -0300 |
---|---|---|
committer | Johan Dahlin <jdahlin@litl.com> | 2011-09-14 08:04:09 -0300 |
commit | de5401b5c5760c5384f24161373e80bc50fdd442 (patch) | |
tree | b71dde9bb3e9839a7b66df8170b22eefb5967107 /giscanner/girparser.py | |
parent | 128431773deae4545f9f3a6f0085efc082f49c92 (diff) | |
download | gobject-introspection-de5401b5c5760c5384f24161373e80bc50fdd442.tar.gz |
Add constant value annotation
Add an annotation tag "Value:" which can be used on
constants to override the value.
Diffstat (limited to 'giscanner/girparser.py')
-rw-r--r-- | giscanner/girparser.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/giscanner/girparser.py b/giscanner/girparser.py index 8568fea3..5faaf197 100644 --- a/giscanner/girparser.py +++ b/giscanner/girparser.py @@ -543,8 +543,9 @@ class GIRParser(object): def _parse_constant(self, node): type_node = self._parse_type(node) constant = ast.Constant(node.attrib['name'], - type_node, - node.attrib['value']) + type_node, + node.attrib['value'], + node.attrib.get(_cns('type'))) self._parse_generic_attribs(node, constant) self._namespace.append(constant) |