<div dir="ltr">Exposes Dmitri's new comment AST introspection APIs ( <a href="http://clang.llvm.org/doxygen/group__CINDEX__COMMENT.html">http://clang.llvm.org/doxygen/group__CINDEX__COMMENT.html</a> ) via the existing Python bindings.<div>
<br></div><div style>Unit tests included.</div><div><br></div><div style>Open questions:<br><br></div><div style><div style="font-family:arial,sans-serif;font-size:13px">1) For the comment AST methods, they're currently all in one (way-too-large) Comment class.</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">Should I split these into multiple Python classes, or leave them in a flat hierarchy to match the libclang API?</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">Splitting it up may make it easier to read the API, but makes it more fragile when the AST logic changes (and it probably will change over time).</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">Keeping it in one class makes it simpler to handle AST logic changes in the future, but the class is pretty bloated, and has a number of is_foo_type() methods.</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">2) For the methods that return HTML and XML, should they just return strings, or should I make the API return parser objects? (It seems like introducing a dependency on those modules is probably not the best idea, but I'm not sure what the state of the art is in HTML and XML in Python.)</div>
<div><br></div></div></div>