summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--giscanner/annotationparser.py38
-rw-r--r--giscanner/maintransformer.py6
-rw-r--r--tests/scanner/annotationparser/test_patterns.py208
3 files changed, 126 insertions, 126 deletions
diff --git a/giscanner/annotationparser.py b/giscanner/annotationparser.py
index 5ce7da7d..4faa2d38 100644
--- a/giscanner/annotationparser.py
+++ b/giscanner/annotationparser.py
@@ -293,7 +293,7 @@ EMPTY_LINE_RE = re.compile(
# Program matching SECTION identifiers.
#
# Results in 2 symbolic groups:
-# - group 1 = colon
+# - group 1 = delimiter
# - group 2 = section_name
SECTION_RE = re.compile(
r'''
@@ -301,7 +301,7 @@ SECTION_RE = re.compile(
[^\S\n\r]* # 0 or more whitespace characters
SECTION # SECTION
[^\S\n\r]* # 0 or more whitespace characters
- (?P<colon>:?) # colon
+ (?P<delimiter>:?) # delimiter
[^\S\n\r]* # 0 or more whitespace characters
(?P<section_name>\w\S+)? # section name
[^\S\n\r]* # 0 or more whitespace characters
@@ -313,7 +313,7 @@ SECTION_RE = re.compile(
#
# Results in 3 symbolic groups:
# - group 1 = symbol_name
-# - group 2 = colon
+# - group 2 = delimiter
# - group 3 = annotations
SYMBOL_RE = re.compile(
r'''
@@ -321,7 +321,7 @@ SYMBOL_RE = re.compile(
[^\S\n\r]* # 0 or more whitespace characters
(?P<symbol_name>[\w-]*\w) # symbol name
[^\S\n\r]* # 0 or more whitespace characters
- (?P<colon>:?) # colon
+ (?P<delimiter>:?) # delimiter
[^\S\n\r]* # 0 or more whitespace characters
(?P<annotations>(?:\(.*?\)[^\S\n\r]*)*) # annotations
[^\S\n\r]* # 0 or more whitespace characters
@@ -334,7 +334,7 @@ SYMBOL_RE = re.compile(
# Results in 4 symbolic groups:
# - group 1 = class_name
# - group 2 = property_name
-# - group 3 = colon
+# - group 3 = delimiter
# - group 4 = annotations
PROPERTY_RE = re.compile(
r'''
@@ -346,7 +346,7 @@ PROPERTY_RE = re.compile(
[^\S\n\r]* # 0 or more whitespace characters
(?P<property_name>[\w-]*\w) # property name
[^\S\n\r]* # 0 or more whitespace characters
- (?P<colon>:?) # colon
+ (?P<delimiter>:?) # delimiter
[^\S\n\r]* # 0 or more whitespace characters
(?P<annotations>(?:\(.*?\)[^\S\n\r]*)*) # annotations
[^\S\n\r]* # 0 or more whitespace characters
@@ -359,7 +359,7 @@ PROPERTY_RE = re.compile(
# Results in 4 symbolic groups:
# - group 1 = class_name
# - group 2 = signal_name
-# - group 3 = colon
+# - group 3 = delimiter
# - group 4 = annotations
SIGNAL_RE = re.compile(
r'''
@@ -371,7 +371,7 @@ SIGNAL_RE = re.compile(
[^\S\n\r]* # 0 or more whitespace characters
(?P<signal_name>[\w-]*\w) # signal name
[^\S\n\r]* # 0 or more whitespace characters
- (?P<colon>:?) # colon
+ (?P<delimiter>:?) # delimiter
[^\S\n\r]* # 0 or more whitespace characters
(?P<annotations>(?:\(.*?\)[^\S\n\r]*)*) # annotations
[^\S\n\r]* # 0 or more whitespace characters
@@ -384,7 +384,7 @@ SIGNAL_RE = re.compile(
# Results in 4 symbolic groups:
# - group 1 = parameter_name
# - group 2 = annotations
-# - group 3 = colon
+# - group 3 = delimiter
# - group 4 = description
PARAMETER_RE = re.compile(
r'''
@@ -396,7 +396,7 @@ PARAMETER_RE = re.compile(
:{1} # required colon
[^\S\n\r]* # 0 or more whitespace characters
(?P<annotations>(?:\(.*?\)[^\S\n\r]*)*) # annotations
- (?P<colon>:?) # colon
+ (?P<delimiter>:?) # delimiter
[^\S\n\r]* # 0 or more whitespace characters
(?P<description>.*?) # description
[^\S\n\r]* # 0 or more whitespace characters
@@ -409,7 +409,7 @@ PARAMETER_RE = re.compile(
# Results in 4 symbolic groups:
# - group 1 = tag_name
# - group 2 = annotations
-# - group 3 = colon
+# - group 3 = delimiter
# - group 4 = description
_all_tags = '|'.join(_ALL_TAGS).replace(' ', '\\ ')
TAG_RE = re.compile(
@@ -421,7 +421,7 @@ TAG_RE = re.compile(
:{1} # required colon
[^\S\n\r]* # 0 or more whitespace characters
(?P<annotations>(?:\(.*?\)[^\S\n\r]*)*) # annotations
- (?P<colon>:?) # colon
+ (?P<delimiter>:?) # delimiter
[^\S\n\r]* # 0 or more whitespace characters
(?P<description>.*?) # description
[^\S\n\r]* # 0 or more whitespace characters
@@ -435,14 +435,14 @@ TAG_RE = re.compile(
#
# Results in 3 symbolic groups:
# - group 2 = annotations
-# - group 3 = colon
+# - group 3 = delimiter
# - group 4 = description
MULTILINE_ANNOTATION_CONTINUATION_RE = re.compile(
r'''
^ # start
[^\S\n\r]* # 0 or more whitespace characters
(?P<annotations>(?:\(.*?\)[^\S\n\r]*)*) # annotations
- (?P<colon>:) # colon
+ (?P<delimiter>:) # delimiter
[^\S\n\r]* # 0 or more whitespace characters
(?P<description>.*?) # description
[^\S\n\r]* # 0 or more whitespace characters
@@ -1003,12 +1003,12 @@ class AnnotationParser(object):
comment_block = DocBlock(identifier_name)
comment_block.position = position
- if 'colon' in result.groupdict() and result.group('colon') != ':':
- colon_start = result.start('colon')
- colon_column = column_offset + colon_start
- marker = ' ' * colon_column + '^'
+ if 'delimiter' in result.groupdict() and result.group('delimiter') != ':':
+ delimiter_start = result.start('delimiter')
+ delimiter_column = column_offset + delimiter_start
+ marker = ' ' * delimiter_column + '^'
message.warn("missing ':' at column %s:\n%s\n%s" %
- (colon_column + 1, original_line, marker),
+ (delimiter_column + 1, original_line, marker),
position)
if 'annotations' in result.groupdict():
diff --git a/giscanner/maintransformer.py b/giscanner/maintransformer.py
index a12c807f..aed58b66 100644
--- a/giscanner/maintransformer.py
+++ b/giscanner/maintransformer.py
@@ -601,9 +601,9 @@ class MainTransformer(object):
if deprecated_tag is not None:
value = deprecated_tag.value
if ': ' in value:
- colon = value.find(': ')
- version = value[:colon]
- desc = value[colon + 2:]
+ delimiter = value.find(': ')
+ version = value[:delimiter]
+ desc = value[delimiter + 2:]
else:
desc = value
version = None
diff --git a/tests/scanner/annotationparser/test_patterns.py b/tests/scanner/annotationparser/test_patterns.py
index 97e66872..063b1916 100644
--- a/tests/scanner/annotationparser/test_patterns.py
+++ b/tests/scanner/annotationparser/test_patterns.py
@@ -47,223 +47,223 @@ identifier_section_tests = [
(SECTION_RE, 'section:test',
None),
(SECTION_RE, 'SECTION',
- {'colon': '',
+ {'delimiter': '',
'section_name': None}),
(SECTION_RE, 'SECTION \t ',
- {'colon': '',
+ {'delimiter': '',
'section_name': None}),
(SECTION_RE, ' \t SECTION \t ',
- {'colon': '',
+ {'delimiter': '',
'section_name': None}),
(SECTION_RE, 'SECTION: \t ',
- {'colon': ':',
+ {'delimiter': ':',
'section_name': None}),
(SECTION_RE, 'SECTION : ',
- {'colon': ':',
+ {'delimiter': ':',
'section_name': None}),
(SECTION_RE, ' SECTION : ',
- {'colon': ':',
+ {'delimiter': ':',
'section_name': None}),
(SECTION_RE, 'SECTION:gtkwidget',
- {'colon': ':',
+ {'delimiter': ':',
'section_name': 'gtkwidget'}),
(SECTION_RE, 'SECTION:gtkwidget ',
- {'colon': ':',
+ {'delimiter': ':',
'section_name': 'gtkwidget'}),
(SECTION_RE, ' SECTION:gtkwidget',
- {'colon': ':',
+ {'delimiter': ':',
'section_name': 'gtkwidget'}),
(SECTION_RE, ' SECTION:gtkwidget\t ',
- {'colon': ':',
+ {'delimiter': ':',
'section_name': 'gtkwidget'}),
(SECTION_RE, 'SECTION: gtkwidget ',
- {'colon': ':',
+ {'delimiter': ':',
'section_name': 'gtkwidget'}),
(SECTION_RE, 'SECTION : gtkwidget',
- {'colon': ':',
+ {'delimiter': ':',
'section_name': 'gtkwidget'}),
(SECTION_RE, 'SECTION gtkwidget \f ',
- {'colon': '',
+ {'delimiter': '',
'section_name': 'gtkwidget'})]
identifier_symbol_tests = [
(SYMBOL_RE, 'GBaseFinalizeFunc:',
- {'colon': ':',
+ {'delimiter': ':',
'symbol_name': 'GBaseFinalizeFunc',
'annotations': ''}),
(SYMBOL_RE, 'gtk_widget_show ',
- {'colon': '',
+ {'delimiter': '',
'symbol_name': 'gtk_widget_show',
'annotations': ''}),
(SYMBOL_RE, ' gtk_widget_show',
- {'colon': '',
+ {'delimiter': '',
'symbol_name': 'gtk_widget_show',
'annotations': ''}),
(SYMBOL_RE, ' gtk_widget_show ',
- {'colon': '',
+ {'delimiter': '',
'symbol_name': 'gtk_widget_show',
'annotations': ''}),
(SYMBOL_RE, 'gtk_widget_show:',
- {'colon': ':',
+ {'delimiter': ':',
'symbol_name': 'gtk_widget_show',
'annotations': ''}),
(SYMBOL_RE, 'gtk_widget_show :',
- {'colon': ':',
+ {'delimiter': ':',
'symbol_name': 'gtk_widget_show',
'annotations': ''}),
(SYMBOL_RE, 'gtk_widget_show: ',
- {'colon': ':',
+ {'delimiter': ':',
'symbol_name': 'gtk_widget_show',
'annotations': ''}),
(SYMBOL_RE, 'gtk_widget_show : ',
- {'colon': ':',
+ {'delimiter': ':',
'symbol_name': 'gtk_widget_show',
'annotations': ''}),
(SYMBOL_RE, ' gtk_widget_show:',
- {'colon': ':',
+ {'delimiter': ':',
'symbol_name': 'gtk_widget_show',
'annotations': ''}),
(SYMBOL_RE, ' gtk_widget_show :',
- {'colon': ':',
+ {'delimiter': ':',
'symbol_name': 'gtk_widget_show',
'annotations': ''}),
(SYMBOL_RE, ' gtk_widget_show: ',
- {'colon': ':',
+ {'delimiter': ':',
'symbol_name': 'gtk_widget_show',
'annotations': ''}),
(SYMBOL_RE, ' gtk_widget_show : ',
- {'colon': ':',
+ {'delimiter': ':',
'symbol_name': 'gtk_widget_show',
'annotations': ''}),
(SYMBOL_RE, 'gtk_widget_show (skip)',
- {'colon': '',
+ {'delimiter': '',
'symbol_name': 'gtk_widget_show',
'annotations': '(skip)'}),
(SYMBOL_RE, 'gtk_widget_show: (skip)',
- {'colon': ':',
+ {'delimiter': ':',
'symbol_name': 'gtk_widget_show',
'annotations': '(skip)'}),
(SYMBOL_RE, 'gtk_widget_show : (skip)',
- {'colon': ':',
+ {'delimiter': ':',
'symbol_name': 'gtk_widget_show',
'annotations': '(skip)'}),
(SYMBOL_RE, 'gtk_widget_show: (skip)',
- {'colon': ':',
+ {'delimiter': ':',
'symbol_name': 'gtk_widget_show',
'annotations': '(skip)'}),
(SYMBOL_RE, 'gtk_widget_show : (skip)',
- {'colon': ':',
+ {'delimiter': ':',
'symbol_name': 'gtk_widget_show',
'annotations': '(skip)'}),
(SYMBOL_RE, ' gtk_widget_show:(skip)',
- {'colon': ':',
+ {'delimiter': ':',
'symbol_name': 'gtk_widget_show',
'annotations': '(skip)'}),
(SYMBOL_RE, ' gtk_widget_show :(skip)',
- {'colon': ':',
+ {'delimiter': ':',
'symbol_name': 'gtk_widget_show',
'annotations': '(skip)'}),
(SYMBOL_RE, ' gtk_widget_show: (skip)',
- {'colon': ':',
+ {'delimiter': ':',
'symbol_name': 'gtk_widget_show',
'annotations': '(skip)'}),
(SYMBOL_RE, ' gtk_widget_show : (skip) \t ',
- {'colon': ':',
+ {'delimiter': ':',
'symbol_name': 'gtk_widget_show',
'annotations': '(skip) \t '}),
(SYMBOL_RE, ' gtk_widget_show : (skip) \t ',
- {'colon': ':',
+ {'delimiter': ':',
'symbol_name': 'gtk_widget_show',
'annotations': '(skip) \t '}),
(SYMBOL_RE, 'gtk_widget_show:(skip)(test1)',
- {'colon': ':',
+ {'delimiter': ':',
'symbol_name': 'gtk_widget_show',
'annotations': '(skip)(test1)'}),
(SYMBOL_RE, 'gtk_widget_show (skip)(test1)',
- {'colon': '',
+ {'delimiter': '',
'symbol_name': 'gtk_widget_show',
'annotations': '(skip)(test1)'}),
(SYMBOL_RE, 'gtk_widget_show: (skip) (test1)',
- {'colon': ':',
+ {'delimiter': ':',
'symbol_name': 'gtk_widget_show',
'annotations': '(skip) (test1)'}),
(SYMBOL_RE, 'gtk_widget_show : (skip) (test1)',
- {'colon': ':',
+ {'delimiter': ':',
'symbol_name': 'gtk_widget_show',
'annotations': '(skip) (test1)'}),
(SYMBOL_RE, 'gtk_widget_show: (skip) (test1)',
- {'colon': ':',
+ {'delimiter': ':',
'symbol_name': 'gtk_widget_show',
'annotations': '(skip) (test1)'}),
(SYMBOL_RE, 'gtk_widget_show : (skip) (test1)',
- {'colon': ':',
+ {'delimiter': ':',
'symbol_name': 'gtk_widget_show',
'annotations': '(skip) (test1)'}),
(SYMBOL_RE, ' gtk_widget_show:(skip) (test1)',
- {'colon': ':',
+ {'delimiter': ':',
'symbol_name': 'gtk_widget_show',
'annotations': '(skip) (test1)'}),
(SYMBOL_RE, ' gtk_widget_show :(skip) (test1)',
- {'colon': ':',
+ {'delimiter': ':',
'symbol_name': 'gtk_widget_show',
'annotations': '(skip) (test1)'}),
(SYMBOL_RE, ' gtk_widget_show: (skip) (test1)',
- {'colon': ':',
+ {'delimiter': ':',
'symbol_name': 'gtk_widget_show',
'annotations': '(skip) (test1)'}),
(SYMBOL_RE, ' gtk_widget_show : (skip) (test1) ',
- {'colon': ':',
+ {'delimiter': ':',
'symbol_name': 'gtk_widget_show',
'annotations': '(skip) (test1) '}),
(SYMBOL_RE, 'gtk_widget_show: (skip) (test1) (test-2)',
- {'colon': ':',
+ {'delimiter': ':',
'symbol_name': 'gtk_widget_show',
'annotations': '(skip) (test1) (test-2)'}),
(SYMBOL_RE, 'gtk_widget_show : (skip) (test1) (test-2)',
- {'colon': ':',
+ {'delimiter': ':',
'symbol_name': 'gtk_widget_show',
'annotations': '(skip) (test1) (test-2)'}),
(SYMBOL_RE, 'gtk_widget_show: (skip) (test1) (test-2)',
- {'colon': ':',
+ {'delimiter': ':',
'symbol_name': 'gtk_widget_show',
'annotations': '(skip) (test1) (test-2)'}),
(SYMBOL_RE, 'gtk_widget_show : (skip) (test1) (test-2)',
- {'colon': ':',
+ {'delimiter': ':',
'symbol_name': 'gtk_widget_show',
'annotations': '(skip) (test1) (test-2)'}),
(SYMBOL_RE, ' gtk_widget_show:(skip) (test1) (test-2)',
- {'colon': ':',
+ {'delimiter': ':',
'symbol_name': 'gtk_widget_show',
'annotations': '(skip) (test1) (test-2)'}),
(SYMBOL_RE, ' gtk_widget_show :(skip) (test1) (test-2)',
- {'colon': ':',
+ {'delimiter': ':',
'symbol_name': 'gtk_widget_show',
'annotations': '(skip) (test1) (test-2)'}),
(SYMBOL_RE, ' gtk_widget_show: (skip) (test1) (test-2)',
- {'colon': ':',
+ {'delimiter': ':',
'symbol_name': 'gtk_widget_show',
'annotations': '(skip) (test1) (test-2)'}),
(SYMBOL_RE, ' gtk_widget_show : (skip) (test1) (test-2) ',
- {'colon': ':',
+ {'delimiter': ':',
'symbol_name': 'gtk_widget_show',
'annotations': '(skip) (test1) (test-2) '}),
(SYMBOL_RE, ' gtk_widget_show : (skip) (test1) (test-2) ',
- {'colon': ':',
+ {'delimiter': ':',
'symbol_name': 'gtk_widget_show',
'annotations': '(skip) (test1) (test-2) '}),
# constants
(SYMBOL_RE, 'MY_CONSTANT:',
- {'colon': ':',
+ {'delimiter': ':',
'symbol_name': 'MY_CONSTANT',
'annotations': ''}),
# structs
(SYMBOL_RE, 'FooWidget:',
- {'colon': ':',
+ {'delimiter': ':',
'symbol_name': 'FooWidget',
'annotations': ''}),
# enums
(SYMBOL_RE, 'Something:',
- {'colon': ':',
+ {'delimiter': ':',
'symbol_name': 'Something',
'annotations': ''})]
@@ -272,57 +272,57 @@ identifier_property_tests = [
(PROPERTY_RE, 'GtkWidget:name (skip)',
{'class_name': 'GtkWidget',
'property_name': 'name',
- 'colon': '',
+ 'delimiter': '',
'annotations': '(skip)'}),
(PROPERTY_RE, 'GtkWidget:name',
{'class_name': 'GtkWidget',
'property_name': 'name',
- 'colon': '',
+ 'delimiter': '',
'annotations': ''}),
(PROPERTY_RE, ' GtkWidget :name',
{'class_name': 'GtkWidget',
'property_name': 'name',
- 'colon': '',
+ 'delimiter': '',
'annotations': ''}),
(PROPERTY_RE, 'GtkWidget: name ',
{'class_name': 'GtkWidget',
'property_name': 'name',
- 'colon': '',
+ 'delimiter': '',
'annotations': ''}),
(PROPERTY_RE, ' GtkWidget : name ',
{'class_name': 'GtkWidget',
'property_name': 'name',
- 'colon': '',
+ 'delimiter': '',
'annotations': ''}),
(PROPERTY_RE, 'GtkWidget:name:',
{'class_name': 'GtkWidget',
'property_name': 'name',
- 'colon': ':',
+ 'delimiter': ':',
'annotations': ''}),
(PROPERTY_RE, 'GtkWidget:name: ',
{'class_name': 'GtkWidget',
'property_name': 'name',
- 'colon': ':',
+ 'delimiter': ':',
'annotations': ''}),
(PROPERTY_RE, ' GtkWidget:name:',
{'class_name': 'GtkWidget',
'property_name': 'name',
- 'colon': ':',
+ 'delimiter': ':',
'annotations': ''}),
(PROPERTY_RE, 'Something:name:',
{'class_name': 'Something',
'property_name': 'name',
- 'colon': ':',
+ 'delimiter': ':',
'annotations': ''}),
(PROPERTY_RE, 'Something:name: ',
{'class_name': 'Something',
'property_name': 'name',
- 'colon': ':',
+ 'delimiter': ':',
'annotations': ''}),
(PROPERTY_RE, ' Something:name:',
{'class_name': 'Something',
'property_name': 'name',
- 'colon': ':',
+ 'delimiter': ':',
'annotations': ''}),
(PROPERTY_RE, 'Weird-thing:name:',
None),
@@ -331,63 +331,63 @@ identifier_property_tests = [
(PROPERTY_RE, 'GWin32InputStream:handle:',
{'class_name': 'GWin32InputStream',
'property_name': 'handle',
- 'colon': ':',
+ 'delimiter': ':',
'annotations': ''}),
# property name that contains a dash
(PROPERTY_RE, 'GtkWidget:double-buffered (skip)',
{'class_name': 'GtkWidget',
'property_name': 'double-buffered',
- 'colon': '',
+ 'delimiter': '',
'annotations': '(skip)'}),
(PROPERTY_RE, 'GtkWidget:double-buffered',
{'class_name': 'GtkWidget',
'property_name': 'double-buffered',
- 'colon': '',
+ 'delimiter': '',
'annotations': ''}),
(PROPERTY_RE, ' GtkWidget :double-buffered',
{'class_name': 'GtkWidget',
'property_name': 'double-buffered',
- 'colon': '',
+ 'delimiter': '',
'annotations': ''}),
(PROPERTY_RE, 'GtkWidget: double-buffered ',
{'class_name': 'GtkWidget',
'property_name': 'double-buffered',
- 'colon': '',
+ 'delimiter': '',
'annotations': ''}),
(PROPERTY_RE, ' GtkWidget : double-buffered ',
{'class_name': 'GtkWidget',
'property_name': 'double-buffered',
- 'colon': '',
+ 'delimiter': '',
'annotations': ''}),
(PROPERTY_RE, 'GtkWidget:double-buffered:',
{'class_name': 'GtkWidget',
'property_name': 'double-buffered',
- 'colon': ':',
+ 'delimiter': ':',
'annotations': ''}),
(PROPERTY_RE, 'GtkWidget:double-buffered: ',
{'class_name': 'GtkWidget',
'property_name': 'double-buffered',
- 'colon': ':',
+ 'delimiter': ':',
'annotations': ''}),
(PROPERTY_RE, ' GtkWidget:double-buffered:',
{'class_name': 'GtkWidget',
'property_name': 'double-buffered',
- 'colon': ':',
+ 'delimiter': ':',
'annotations': ''}),
(PROPERTY_RE, 'Something:double-buffered:',
{'class_name': 'Something',
'property_name': 'double-buffered',
- 'colon': ':',
+ 'delimiter': ':',
'annotations': ''}),
(PROPERTY_RE, 'Something:double-buffered: ',
{'class_name': 'Something',
'property_name': 'double-buffered',
- 'colon': ':',
+ 'delimiter': ':',
'annotations': ''}),
(PROPERTY_RE, ' Something:double-buffered:',
{'class_name': 'Something',
'property_name': 'double-buffered',
- 'colon': ':',
+ 'delimiter': ':',
'annotations': ''}),
(PROPERTY_RE, 'Weird-thing:double-buffered:',
None),
@@ -396,7 +396,7 @@ identifier_property_tests = [
(PROPERTY_RE, ' GMemoryOutputStream:realloc-function: (skip)',
{'class_name': 'GMemoryOutputStream',
'property_name': 'realloc-function',
- 'colon': ':',
+ 'delimiter': ':',
'annotations': '(skip)'})]
identifier_signal_tests = [
@@ -404,17 +404,17 @@ identifier_signal_tests = [
(SIGNAL_RE, 'GtkWidget::changed: (skip)',
{'class_name': 'GtkWidget',
'signal_name': 'changed',
- 'colon': ':',
+ 'delimiter': ':',
'annotations': '(skip)'}),
(SIGNAL_RE, 'GtkWidget::changed:',
{'class_name': 'GtkWidget',
'signal_name': 'changed',
- 'colon': ':',
+ 'delimiter': ':',
'annotations': ''}),
(SIGNAL_RE, 'Something::changed:',
{'class_name': 'Something',
'signal_name': 'changed',
- 'colon': ':',
+ 'delimiter': ':',
'annotations': ''}),
(SIGNAL_RE, 'Weird-thing::changed:',
None),
@@ -424,17 +424,17 @@ identifier_signal_tests = [
(SIGNAL_RE, 'GtkWidget::hierarchy-changed: (skip)',
{'class_name': 'GtkWidget',
'signal_name': 'hierarchy-changed',
- 'colon': ':',
+ 'delimiter': ':',
'annotations': '(skip)'}),
(SIGNAL_RE, 'GtkWidget::hierarchy-changed:',
{'class_name': 'GtkWidget',
'signal_name': 'hierarchy-changed',
- 'colon': ':',
+ 'delimiter': ':',
'annotations': ''}),
(SIGNAL_RE, 'Something::hierarchy-changed:',
{'class_name': 'Something',
'signal_name': 'hierarchy-changed',
- 'colon': ':',
+ 'delimiter': ':',
'annotations': ''}),
(SIGNAL_RE, 'Weird-thing::hierarchy-changed:',
None),
@@ -445,47 +445,47 @@ parameter_tests = [
(PARAMETER_RE, '@Short_description: Base class for all widgets ',
{'parameter_name': 'Short_description',
'annotations': '',
- 'colon': '',
+ 'delimiter': '',
'description': 'Base class for all widgets'}),
(PARAMETER_RE, '@...: the value of the first property, followed optionally by more',
{'parameter_name': '...',
'annotations': '',
- 'colon': '',
+ 'delimiter': '',
'description': 'the value of the first property, followed optionally by more'}),
(PARAMETER_RE, '@widget: a #GtkWidget',
{'parameter_name': 'widget',
'annotations': '',
- 'colon': '',
+ 'delimiter': '',
'description': 'a #GtkWidget'}),
(PARAMETER_RE, '@widget_pointer: (inout) (transfer none): '
'address of a variable that contains @widget',
{'parameter_name': 'widget_pointer',
'annotations': '(inout) (transfer none)',
- 'colon': ':',
+ 'delimiter': ':',
'description': 'address of a variable that contains @widget'}),
(PARAMETER_RE, '@weird_thing: (inout) (transfer none) (allow-none) (attribute) (destroy) '
'(foreign) (inout) (out) (transfer) (skip) (method): some weird @thing',
{'parameter_name': 'weird_thing',
'annotations': '(inout) (transfer none) (allow-none) (attribute) (destroy) '
'(foreign) (inout) (out) (transfer) (skip) (method)',
- 'colon': ':',
+ 'delimiter': ':',
'description': 'some weird @thing'}),
(PARAMETER_RE, '@data: a pointer to the element data. The data may be moved as elements '
'are added to the #GByteArray.',
{'parameter_name': 'data',
'annotations': '',
- 'colon': '',
+ 'delimiter': '',
'description': 'a pointer to the element data. The data may be moved as elements '
'are added to the #GByteArray.'}),
(PARAMETER_RE, '@a: a #GSequenceIter',
{'parameter_name': 'a',
'annotations': '',
- 'colon': '',
+ 'delimiter': '',
'description': 'a #GSequenceIter'}),
(PARAMETER_RE, '@keys: (array length=n_keys) (element-type GQuark) (allow-none):',
{'parameter_name': 'keys',
'annotations': '(array length=n_keys) (element-type GQuark) (allow-none)',
- 'colon': ':',
+ 'delimiter': ':',
'description': ''})]
tag_tests = [
@@ -494,17 +494,17 @@ tag_tests = [
(TAG_RE, 'Since: 3.0',
{'tag_name': 'Since',
'annotations': '',
- 'colon': '',
+ 'delimiter': '',
'description': '3.0'}),
(TAG_RE, 'Attributes: (inout) (transfer none): some note about attributes',
{'tag_name': 'Attributes',
'annotations': '(inout) (transfer none)',
- 'colon': ':',
+ 'delimiter': ':',
'description': 'some note about attributes'}),
(TAG_RE, 'Rename to: something_else',
{'tag_name': 'Rename to',
'annotations': '',
- 'colon': '',
+ 'delimiter': '',
'description': 'something_else'}),
(TAG_RE, '@Deprecated: Since 2.8, reference counting is done atomically',
None),
@@ -513,36 +513,36 @@ tag_tests = [
(TAG_RE, 'Returns: a #GtkWidget',
{'tag_name': 'Returns',
'annotations': '',
- 'colon': '',
+ 'delimiter': '',
'description': 'a #GtkWidget'}),
(TAG_RE, 'Return value: (transfer none): The binary data that @text responds. '
'This pointer',
{'tag_name': 'Return value',
'annotations': '(transfer none)',
- 'colon': ':',
+ 'delimiter': ':',
'description': 'The binary data that @text responds. This pointer'}),
(TAG_RE, 'Return value: (transfer full) (array length=out_len) (element-type guint8):',
{'tag_name': 'Return value',
'annotations': '(transfer full) (array length=out_len) (element-type guint8)',
- 'colon': ':',
+ 'delimiter': ':',
'description': ''}),
(TAG_RE, 'Returns: A boolean value, but let me tell you a bit about this boolean. It',
{'tag_name': 'Returns',
'annotations': '',
- 'colon': '',
+ 'delimiter': '',
'description': 'A boolean value, but let me tell you a bit about this boolean. '
'It'}),
(TAG_RE, 'Returns: (transfer container) (element-type GObject.ParamSpec): a',
{'tag_name': 'Returns',
'annotations': '(transfer container) (element-type GObject.ParamSpec)',
- 'colon': ':',
+ 'delimiter': ':',
'description': 'a'}),
(TAG_RE, 'Return value: (type GLib.HashTable<utf8,GLib.HashTable<utf8,utf8>>) '
'(transfer full):',
{'tag_name': 'Return value',
'annotations': '(type GLib.HashTable<utf8,GLib.HashTable<utf8,utf8>>) '
'(transfer full)',
- 'colon': ':',
+ 'delimiter': ':',
'description': ''})]
comment_end_tests = [