[gobject-introspection] Use tag position if available
- From: Johan Dahlin <johan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] Use tag position if available
- Date: Fri, 24 Sep 2010 21:26:44 +0000 (UTC)
commit 096a5c5f9c0936c3b03a79c35497fb24c57da149
Author: Johan Dahlin <johan gnome org>
Date: Fri Sep 24 18:22:35 2010 -0300
Use tag position if available
giscanner/introspectablepass.py | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/giscanner/introspectablepass.py b/giscanner/introspectablepass.py
index 7de9b92..ef2ddf7 100644
--- a/giscanner/introspectablepass.py
+++ b/giscanner/introspectablepass.py
@@ -19,6 +19,7 @@
from . import ast
from . import message
+from .annotationparser import TAG_RETURNS
class IntrospectablePass(object):
@@ -50,6 +51,7 @@ class IntrospectablePass(object):
if isinstance(parent, (ast.VFunction, ast.Callback)):
return
+ block = None
if hasattr(parent, 'symbol'):
prefix = '%s: ' % (parent.symbol, )
block = self._blocks.get(parent.symbol)
@@ -61,6 +63,10 @@ class IntrospectablePass(object):
context = "argument %s: " % (param.argname, )
else:
context = "return value: "
+ if block:
+ return_tag = block.get(TAG_RETURNS)
+ if return_tag:
+ position = return_tag.position
message.warn_node(parent, prefix + context + text,
positions=position)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]