spec-tool: strip comments from pod members
This commit is contained in:
parent
7fd225c0f1
commit
66354ace30
@ -278,16 +278,24 @@ class pod(type):
|
|||||||
self._depends += list(e.text for e in node.findall('.//enum'))
|
self._depends += list(e.text for e in node.findall('.//enum'))
|
||||||
self._depends += list(t.text for t in node.findall('.//type'))
|
self._depends += list(t.text for t in node.findall('.//type'))
|
||||||
|
|
||||||
self._members = list(map(
|
self._members = []
|
||||||
lambda x: {
|
|
||||||
'type': x.find('type').text,
|
for member in node.findall('./member'):
|
||||||
'name': x.find('name').text,
|
type = member.find('type').text
|
||||||
# we must include a space separator otherwise we get run-on
|
name = member.find('name').text
|
||||||
# types/names in the member definitions.
|
|
||||||
'code': " ".join(rename(c) for c in x.itertext())
|
comment = member.find('comment')
|
||||||
},
|
if not comment is None:
|
||||||
node.findall('./member'))
|
member.remove(comment)
|
||||||
)
|
code = " ".join(member.itertext())
|
||||||
|
|
||||||
|
#code = member.iter()
|
||||||
|
#code = filter(lambda x: x.tag != 'comment', code)
|
||||||
|
#code = map(lambda x: x.itertext(), code)
|
||||||
|
#code = map(lambda x: "".join(x), code)
|
||||||
|
#code = "".join(code)
|
||||||
|
|
||||||
|
self._members.append({'code': code, 'type': type, 'name': name})
|
||||||
|
|
||||||
def depends(self):
|
def depends(self):
|
||||||
return self._depends
|
return self._depends
|
||||||
|
Loading…
Reference in New Issue
Block a user