diff --git a/tools/spec.py b/tools/spec.py index 3c8b4cc..05d6275 100755 --- a/tools/spec.py +++ b/tools/spec.py @@ -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