summaryrefslogtreecommitdiffstats
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-01-13 20:06:30 (GMT)
committerBrad King <brad.king@kitware.com>2014-02-26 16:54:50 (GMT)
commit242191122a06bd7c4934e0670d38da2de42cdba2 (patch)
tree05e73edefca31dd8454a53343c5af843bed68f20 /src/CMakeLists.txt
parentcf203e1c6933a409a65811bc7a3c771c71f4e53d (diff)
downloadCastXML-242191122a06bd7c4934e0670d38da2de42cdba2.zip
CastXML-242191122a06bd7c4934e0670d38da2de42cdba2.tar.gz
CastXML-242191122a06bd7c4934e0670d38da2de42cdba2.tar.bz2
Set up Clang AST visitor infrastructure for XML output
Create an API to perform the AST walk and XML output generation. Create a queue that can hold both clang::Decl and clang::QualType nodes. Add the main translation unit Decl to the queue. Follow the queue until empty while adding new nodes to the queue only if they represent complete types or declarations. Then queue the incomplete nodes and follow the queue again until empty. This will allow all complete class types to be output as needed followed by types that are referenced but do not need complete output (like a pointed-to type). Use "clang/AST/DeclNodes.inc" and "clang/AST/TypeNodes.def" to dispatch visitation to a method dedicated to each AST node kind/type-class. Use a visitor base class to provide an implementation for every visitation method that simply reports the node as Unimplemented. This will allow us to incrementally implement output for each AST node.
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 9412dde..9ab1db5 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -45,6 +45,7 @@ add_executable(castxml
Detect.cxx Detect.h
Options.h
+ Output.cxx Output.h
RunClang.cxx RunClang.h
Utils.cxx Utils.h
)