[gobject-introspection] giscanner: rename AnnotationParser() to GtkDocCommentBlockParser()
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] giscanner: rename AnnotationParser() to GtkDocCommentBlockParser()
- Date: Wed, 9 Oct 2013 16:56:18 +0000 (UTC)
commit 30b17d39adc7a7284b926cac6ada566eb1b62292
Author: Dieter Verfaillie <dieterv optionexplicit be>
Date: Tue May 14 17:06:24 2013 +0200
giscanner: rename AnnotationParser() to GtkDocCommentBlockParser()
Clarify the purpose of what up until now was know as the
AnnotationParser() class, as it does more than just extracting
annotations, it parses the complete GTK-Doc comment block.
giscanner/annotationmain.py | 6 +++---
giscanner/annotationparser.py | 4 ++--
giscanner/scannermain.py | 6 +++---
tests/scanner/annotationparser/test_parser.py | 4 ++--
tests/warn/warningtester.py | 6 +++---
5 files changed, 13 insertions(+), 13 deletions(-)
---
diff --git a/giscanner/annotationmain.py b/giscanner/annotationmain.py
index 304f5a3..ea19cce 100644
--- a/giscanner/annotationmain.py
+++ b/giscanner/annotationmain.py
@@ -21,7 +21,7 @@
import optparse
from giscanner import message
-from giscanner.annotationparser import AnnotationParser
+from giscanner.annotationparser import GtkDocCommentBlockParser
from giscanner.scannermain import (get_preprocessor_option_group,
create_source_scanner,
process_packages)
@@ -58,8 +58,8 @@ def annotation_main(args):
ss = create_source_scanner(options, args)
if options.extract:
- ap = AnnotationParser()
- blocks = ap.parse(ss.get_comments())
+ parser = GtkDocCommentBlockParser()
+ blocks = parser.parse(ss.get_comments())
print '/' + ('*' * 60) + '/'
print '/* THIS FILE IS GENERATED DO NOT EDIT */'
print '/' + ('*' * 60) + '/'
diff --git a/giscanner/annotationparser.py b/giscanner/annotationparser.py
index f6f7400..66fa03b 100644
--- a/giscanner/annotationparser.py
+++ b/giscanner/annotationparser.py
@@ -762,7 +762,7 @@ class DocOption(object):
return self._dict
-class AnnotationParser(object):
+class GtkDocCommentBlockParser(object):
"""
GTK-Doc comment block parser.
@@ -820,7 +820,7 @@ class AnnotationParser(object):
- `tag descriptions` and `comment block description` fields can
span multiple paragraphs.
- .. NOTE:: :class:`AnnotationParser` functionality is heavily based on gtkdoc-mkdb's
+ .. NOTE:: :class:`GtkDocCommentBlockParser` functionality is heavily based on gtkdoc-mkdb's
`ScanSourceFile()`_ function and is currently in sync with GTK-Doc
commit `47abcd5`_.
diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py
index 00dc30d..40a941b 100755
--- a/giscanner/scannermain.py
+++ b/giscanner/scannermain.py
@@ -29,7 +29,7 @@ import sys
import tempfile
from giscanner import message
-from giscanner.annotationparser import AnnotationParser
+from giscanner.annotationparser import GtkDocCommentBlockParser
from giscanner.ast import Include, Namespace
from giscanner.dumper import compile_introspection_binary
from giscanner.gdumpparser import GDumpParser, IntrospectionBinary
@@ -464,8 +464,8 @@ def scanner_main(args):
ss = create_source_scanner(options, args)
- ap = AnnotationParser()
- blocks = ap.parse(ss.get_comments())
+ cbp = GtkDocCommentBlockParser()
+ blocks = cbp.parse(ss.get_comments())
# Transform the C symbols into AST nodes
transformer.parse(ss.get_symbols())
diff --git a/tests/scanner/annotationparser/test_parser.py b/tests/scanner/annotationparser/test_parser.py
index 82ca43b..2c8cd6e 100644
--- a/tests/scanner/annotationparser/test_parser.py
+++ b/tests/scanner/annotationparser/test_parser.py
@@ -33,7 +33,7 @@ import subprocess
import unittest
import xml.etree.ElementTree as etree
-from giscanner.annotationparser import AnnotationParser
+from giscanner.annotationparser import GtkDocCommentBlockParser
from giscanner.ast import Namespace
from giscanner.message import MessageLogger
@@ -83,7 +83,7 @@ class TestCommentBlock(unittest.TestCase):
# Parse GTK-Doc comment block
commentblock = testcase.find(ns('{}input')).text
- parsed_docblock = AnnotationParser().parse_comment_block((commentblock, 'test.c', 1))
+ parsed_docblock = GtkDocCommentBlockParser().parse_comment_block((commentblock, 'test.c', 1))
parsed_tree = self.parsed2tree(parsed_docblock).split('\n')
emitted_messages = [w[w.find(':') + 1:].strip() for w in output.getvalue()]
diff --git a/tests/warn/warningtester.py b/tests/warn/warningtester.py
index 2192a95..15822cf 100644
--- a/tests/warn/warningtester.py
+++ b/tests/warn/warningtester.py
@@ -10,7 +10,7 @@ sys.path.insert(0, path)
# Not correct, but enough to get the tests going uninstalled
__builtin__.__dict__['DATADIR'] = path
-from giscanner.annotationparser import AnnotationParser
+from giscanner.annotationparser import GtkDocCommentBlockParser
from giscanner.ast import Include, Namespace
from giscanner.introspectablepass import IntrospectablePass
from giscanner.maintransformer import MainTransformer
@@ -114,8 +114,8 @@ def check(args):
ss.parse_macros([filename])
transformer.parse(ss.get_symbols())
- ap = AnnotationParser()
- blocks = ap.parse(ss.get_comments())
+ cbp = GtkDocCommentBlockParser()
+ blocks = cbp.parse(ss.get_comments())
main = MainTransformer(transformer, blocks)
main.transform()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]