[gobject-introspection] Print out line numbers
- From: Johan Dahlin <johan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] Print out line numbers
- Date: Fri, 24 Sep 2010 21:26:49 +0000 (UTC)
commit 30b06e8bb2c8f8d0d2422e9bad3b94c4aea89f08
Author: Johan Dahlin <johan gnome org>
Date: Fri Sep 24 18:23:03 2010 -0300
Print out line numbers
But disable the printing by default since it messes up
the generated file. And fix a couple of typos
giscanner/annotationparser.py | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/giscanner/annotationparser.py b/giscanner/annotationparser.py
index 673d0a0..5237a98 100644
--- a/giscanner/annotationparser.py
+++ b/giscanner/annotationparser.py
@@ -136,7 +136,11 @@ class DocBlock(object):
for tag in tags:
lines.append(tag.to_gtk_doc_tag())
- comment = '/**\n'
+ comment = ''
+ #comment += '# %d \"%s\"\n' % (
+ # self.position.line,
+ # self.position.filename)
+ comment += '/**\n'
for line in lines:
line = line.rstrip()
if line:
@@ -323,7 +327,7 @@ class DocTag(object):
n_params=1)
else:
message.warn('invalid annotation option: %s' % (option, ),
- positions=self.position)
+ self.position)
class DocOptions(object):
@@ -540,7 +544,7 @@ class AnnotationParser(object):
tag_name = tag_name.lower()
tag = DocTag(block, tag_name)
tag.value = line[first_colonspace_index+2:]
- tag.filename = block.position.offset(lineno)
+ tag.position = block.position.offset(lineno)
block.tags[tag_name] = tag
else:
comment_lines.append(line)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]