diff options
author | Daniel Jasper <djasper@google.com> | 2015-04-13 14:56:54 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2015-04-13 14:56:54 +0000 |
commit | 6a5d38d2ee30d74cb67f44d410d504d268e87046 (patch) | |
tree | 02b3c86593bb63969fd31ebbda02f929d20c9bf4 /clang/lib/Format | |
parent | 2ecf23bc5d001aeedc4b989341a91542282ef26d (diff) | |
download | bcm5719-llvm-6a5d38d2ee30d74cb67f44d410d504d268e87046.tar.gz bcm5719-llvm-6a5d38d2ee30d74cb67f44d410d504d268e87046.zip |
clang-format: [JS] Allow periods and commata in class declarations.
Patch by Martin Probst. Thank you.
llvm-svn: 234752
Diffstat (limited to 'clang/lib/Format')
-rw-r--r-- | clang/lib/Format/UnwrappedLineParser.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Format/UnwrappedLineParser.cpp b/clang/lib/Format/UnwrappedLineParser.cpp index 826356f474a..905f9c1ba5f 100644 --- a/clang/lib/Format/UnwrappedLineParser.cpp +++ b/clang/lib/Format/UnwrappedLineParser.cpp @@ -1541,7 +1541,8 @@ void UnwrappedLineParser::parseRecord() { // it is often token-pasted. while (FormatTok->is(tok::identifier) || FormatTok->is(tok::coloncolon) || FormatTok->is(tok::hashhash) || - (Style.Language == FormatStyle::LK_Java && + ((Style.Language == FormatStyle::LK_Java || + Style.Language == FormatStyle::LK_JavaScript) && FormatTok->isOneOf(tok::period, tok::comma))) nextToken(); |