[cfe-commits] [PATCH] Clang-format: extracted FormatTokenSource from UnwrappedLineParser.
Manuel Klimek
klimek at google.com
Fri Dec 7 06:11:08 PST 2012
================
Comment at: lib/Format/UnwrappedLineParser.h:91
@@ +90,3 @@
+
+ virtual void parseToken() = 0;
+};
----------------
I think this is the crucial part of the interface, and would put the rest back into the UnwrappedLineParser.
================
Comment at: lib/Format/UnwrappedLineParser.h:94
@@ +93,3 @@
+
+class FormatTokenLexer : public FormatTokenSource {
+ bool GreaterStashed;
----------------
I think this can live in Format.cpp, as it's only needed there.
================
Comment at: lib/Format/UnwrappedLineParser.h:81
@@ +80,3 @@
+class FormatTokenSource {
+protected:
+ FormatToken FormatTok;
----------------
In general, I prefer "public-first" style, because the normal reading sequence is top-down, and the most important things about a class should be first; this way, implementation details come first.
http://llvm-reviews.chandlerc.com/D186
More information about the cfe-commits
mailing list