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(t.text for t in node.findall('.//type'))
|
||||
|
||||
self._members = list(map(
|
||||
lambda x: {
|
||||
'type': x.find('type').text,
|
||||
'name': x.find('name').text,
|
||||
# we must include a space separator otherwise we get run-on
|
||||
# types/names in the member definitions.
|
||||
'code': " ".join(rename(c) for c in x.itertext())
|
||||
},
|
||||
node.findall('./member'))
|
||||
)
|
||||
self._members = []
|
||||
|
||||
for member in node.findall('./member'):
|
||||
type = member.find('type').text
|
||||
name = member.find('name').text
|
||||
|
||||
comment = member.find('comment')
|
||||
if not comment is None:
|
||||
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):
|
||||
return self._depends
|
||||
|
Loading…
Reference in New Issue
Block a user