[cfe-commits] [PATCH] Initial version of formatting library
Daniel Jasper
djasper at google.com
Thu Oct 25 09:47:20 PDT 2012
Yes, the goal is to attach AST nodes to tokens and use them to disambiguate in cases where a Lexer-based approach can't decide.
The thing is that we need a lexer-only approach anyway, e.g. to format code that has errors, is ifdef'd out or contains macros. Also, parsing the source code is time consuming, so invoking it should be optional, i.e. you can get a mostly well-formatted code quicker. So, I decided to start with that. However, there are definitely plans to use the power of Clang's parser in the future, this is just the very beginning.
http://llvm-reviews.chandlerc.com/D80
More information about the cfe-commits
mailing list