summaryrefslogtreecommitdiff
path: root/giscanner/sourcescanner.py
diff options
context:
space:
mode:
authorJohan Dahlin <johan@gnome.org>2010-09-20 17:17:20 -0300
committerJohan Dahlin <johan@gnome.org>2010-09-20 17:19:21 -0300
commit635b6ec35fbb1c2355e9b8b336f1a9164cc44034 (patch)
tree3b2b1ddfdc620082e5b3125fde1101e243dd4b08 /giscanner/sourcescanner.py
parent84aa7defdb1a3082021bd28a61803a1e140cf8ca (diff)
downloadgobject-introspection-635b6ec35fbb1c2355e9b8b336f1a9164cc44034.tar.gz
[scanner] Add a Position class
Add a position class which will make it easier to send filename/line/column information to the message class.
Diffstat (limited to 'giscanner/sourcescanner.py')
-rw-r--r--giscanner/sourcescanner.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/giscanner/sourcescanner.py b/giscanner/sourcescanner.py
index a2db2e74..e4c670b0 100644
--- a/giscanner/sourcescanner.py
+++ b/giscanner/sourcescanner.py
@@ -24,7 +24,7 @@ import subprocess
import tempfile
from .libtoolimporter import LibtoolImporter
-
+from .message import Position
(CSYMBOL_TYPE_INVALID,
CSYMBOL_TYPE_ELLIPSIS,
@@ -198,6 +198,11 @@ class SourceSymbol(object):
def line(self):
return self._symbol.line
+ @property
+ def position(self):
+ return Position(self._symbol.source_filename,
+ self._symbol.line)
+
class SourceScanner(object):