diff options
author | Dieter Verfaillie <dieterv@optionexplicit.be> | 2013-05-15 22:48:42 +0200 |
---|---|---|
committer | Dieter Verfaillie <dieterv@optionexplicit.be> | 2013-10-08 20:54:43 +0200 |
commit | 8d9396f9b3253bff876456ec695bcea7cbbf7a69 (patch) | |
tree | 7256bd0097818045e2fba5228dffebc5e6058ca8 /giscanner/annotationparser.py | |
parent | e88a99496cf4091ec16670a2fe656878fc055692 (diff) | |
download | gobject-introspection-8d9396f9b3253bff876456ec695bcea7cbbf7a69.tar.gz |
giscanner: expand parse_comment_block() parameters
Makes it consistent with the parse_comment_blocks() and
_parse_comment_block() methods.
Diffstat (limited to 'giscanner/annotationparser.py')
-rw-r--r-- | giscanner/annotationparser.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/giscanner/annotationparser.py b/giscanner/annotationparser.py index 3b9b90a9..40a01401 100644 --- a/giscanner/annotationparser.py +++ b/giscanner/annotationparser.py @@ -841,13 +841,13 @@ class GtkDocCommentBlockParser(object): comment_blocks = {} - for comment in comments: + for (comment, filename, lineno) in comments: try: - comment_block = self.parse_comment_block(comment) + comment_block = self.parse_comment_block(comment, filename, lineno) except Exception: message.warn('unrecoverable parse error, please file a GObject-Introspection ' 'bug report including the complete comment block at the ' - 'indicated location.', message.Position(comment[1], comment[2])) + 'indicated location.', message.Position(filename, lineno)) continue if comment_block is not None: @@ -866,17 +866,17 @@ class GtkDocCommentBlockParser(object): return comment_blocks - def parse_comment_block(self, comment): + def parse_comment_block(self, comment, filename, lineno): ''' Parse a single GTK-Doc comment block. :param comment: string representing the GTK-Doc comment block including it's start ("``/**``") and end ("``*/``") tokens. - :returns: a :class:`DocBlock` object or ``None`` + :param filename: source file name where the comment block originated from + :param lineno: line number in the source file where the comment block starts + :returns: a :class:`GtkDocCommentBlock` object or ``None`` ''' - comment, filename, lineno = comment - # Assign line numbers to each line of the comment block, # which will later be used as the offset to calculate the # real line number in the source file |