[gobject-introspection/wip/docs: 9/16] sectionparser: Add support for <INCLUDE>
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection/wip/docs: 9/16] sectionparser: Add support for <INCLUDE>
- Date: Thu, 4 Apr 2013 19:45:13 +0000 (UTC)
commit 838835a7d87f88151f1173694a6dc8a702f2c6aa
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Wed Mar 27 17:46:03 2013 -0400
sectionparser: Add support for <INCLUDE>
giscanner/sectionparser.py | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/giscanner/sectionparser.py b/giscanner/sectionparser.py
index 85ef3a2..ee023f3 100644
--- a/giscanner/sectionparser.py
+++ b/giscanner/sectionparser.py
@@ -27,6 +27,7 @@ class Section(object):
def __init__(self):
self.file = None
self.title = None
+ self.includes = None
self.main_subsection = Subsection(None)
self.subsections = []
@@ -66,6 +67,11 @@ def parse_sections_file(lines):
current_section.title = match.groupdict['contents']
continue
+ match = re.match(r"<INCLUDE>(?P<contents>.*)</INCLUDE>", line)
+ if match:
+ current_section.includes = match.groupdict['contents']
+ continue
+
match = re.match(r"<SUBSECTION(?: (?P<name>.*))?>", line)
if match:
current_subsection = Subsection(match.groupdict.get('name', None))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]