summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/tools/clang/lib/Format/TokenAnnotator.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm/tools/clang/lib/Format/TokenAnnotator.h')
-rw-r--r--contrib/llvm/tools/clang/lib/Format/TokenAnnotator.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/contrib/llvm/tools/clang/lib/Format/TokenAnnotator.h b/contrib/llvm/tools/clang/lib/Format/TokenAnnotator.h
index 36de010..ff8e32a 100644
--- a/contrib/llvm/tools/clang/lib/Format/TokenAnnotator.h
+++ b/contrib/llvm/tools/clang/lib/Format/TokenAnnotator.h
@@ -13,8 +13,8 @@
///
//===----------------------------------------------------------------------===//
-#ifndef LLVM_CLANG_FORMAT_TOKEN_ANNOTATOR_H
-#define LLVM_CLANG_FORMAT_TOKEN_ANNOTATOR_H
+#ifndef LLVM_CLANG_LIB_FORMAT_TOKENANNOTATOR_H
+#define LLVM_CLANG_LIB_FORMAT_TOKENANNOTATOR_H
#include "UnwrappedLineParser.h"
#include "clang/Format/Format.h"
@@ -27,12 +27,13 @@ namespace format {
enum LineType {
LT_Invalid,
- LT_Other,
- LT_PreprocessorDirective,
- LT_VirtualFunctionDecl,
+ LT_ImportStatement,
LT_ObjCDecl, // An @interface, @implementation, or @protocol line.
LT_ObjCMethodDecl,
- LT_ObjCProperty // An @property line.
+ LT_ObjCProperty, // An @property line.
+ LT_Other,
+ LT_PreprocessorDirective,
+ LT_VirtualFunctionDecl
};
class AnnotatedLine {
@@ -108,8 +109,8 @@ private:
/// \c UnwrappedLine.
class TokenAnnotator {
public:
- TokenAnnotator(const FormatStyle &Style, IdentifierInfo &Ident_in)
- : Style(Style), Ident_in(Ident_in) {}
+ TokenAnnotator(const FormatStyle &Style, const AdditionalKeywords &Keywords)
+ : Style(Style), Keywords(Keywords) {}
/// \brief Adapts the indent levels of comment lines to the indent of the
/// subsequent line.
@@ -139,11 +140,10 @@ private:
const FormatStyle &Style;
- // Contextual keywords:
- IdentifierInfo &Ident_in;
+ const AdditionalKeywords &Keywords;
};
} // end namespace format
} // end namespace clang
-#endif // LLVM_CLANG_FORMAT_TOKEN_ANNOTATOR_H
+#endif
OpenPOWER on IntegriCloud