summaryrefslogtreecommitdiff
path: root/giscanner/transformer.py
diff options
context:
space:
mode:
authorJohan Dahlin <johan@gnome.org>2011-09-13 11:57:28 -0300
committerJohan Dahlin <jdahlin@litl.com>2011-09-14 08:04:09 -0300
commitde5401b5c5760c5384f24161373e80bc50fdd442 (patch)
treeb71dde9bb3e9839a7b66df8170b22eefb5967107 /giscanner/transformer.py
parent128431773deae4545f9f3a6f0085efc082f49c92 (diff)
downloadgobject-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/transformer.py')
-rw-r--r--giscanner/transformer.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/giscanner/transformer.py b/giscanner/transformer.py
index d3a056b3..cb785e73 100644
--- a/giscanner/transformer.py
+++ b/giscanner/transformer.py
@@ -672,7 +672,8 @@ raise ValueError."""
else:
raise AssertionError()
- const = ast.Constant(name, typeval, value)
+ const = ast.Constant(name, typeval, value,
+ symbol.ident)
const.add_symbol_reference(symbol)
return const