summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/FormatToken.h
diff options
context:
space:
mode:
authorMartin Probst <martin@probst.io>2016-05-20 11:24:24 +0000
committerMartin Probst <martin@probst.io>2016-05-20 11:24:24 +0000
commitc4a0dd49a3906ef86520d352562e3841672464f9 (patch)
tree80fe456d449b7d853502b490408916e6f6f3e39e /clang/lib/Format/FormatToken.h
parent6c9472c57fe6377aeb8d52bca4b63044d1bc4662 (diff)
downloadbcm5719-llvm-c4a0dd49a3906ef86520d352562e3841672464f9.tar.gz
bcm5719-llvm-c4a0dd49a3906ef86520d352562e3841672464f9.zip
clang-format: [JS] sort ES6 imports.
Summary: This change automatically sorts ES6 imports and exports into four groups: absolute imports, parent imports, relative imports, and then exports. Exports are sorted in the same order, but not grouped further. To keep JS import sorting out of Format.cpp, this required extracting the TokenAnalyzer infrastructure to separate header and implementation files. Reviewers: djasper Subscribers: cfe-commits, klimek Differential Revision: http://reviews.llvm.org/D20198 llvm-svn: 270203
Diffstat (limited to 'clang/lib/Format/FormatToken.h')
-rw-r--r--clang/lib/Format/FormatToken.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Format/FormatToken.h b/clang/lib/Format/FormatToken.h
index d80bd0af5f0..8052e5efd1f 100644
--- a/clang/lib/Format/FormatToken.h
+++ b/clang/lib/Format/FormatToken.h
@@ -535,6 +535,7 @@ struct AdditionalKeywords {
kw_NS_ENUM = &IdentTable.get("NS_ENUM");
kw_NS_OPTIONS = &IdentTable.get("NS_OPTIONS");
+ kw_as = &IdentTable.get("as");
kw_async = &IdentTable.get("async");
kw_await = &IdentTable.get("await");
kw_finally = &IdentTable.get("finally");
@@ -585,6 +586,7 @@ struct AdditionalKeywords {
IdentifierInfo *kw___except;
// JavaScript keywords.
+ IdentifierInfo *kw_as;
IdentifierInfo *kw_async;
IdentifierInfo *kw_await;
IdentifierInfo *kw_finally;
OpenPOWER on IntegriCloud