llvm-project/clang/lib/Format
Martin Probst f785fd94c6 clang-format: [JS] support fields with case/switch/default labels.
Summary:
`case:` and `default:` would normally parse as labels for a `switch` block.
However in TypeScript, they can be used in field declarations, e.g.:

    interface I {
      case: string;
    }

This change special cases parsing them in declaration lines to avoid wrapping
them.

Reviewers: djasper

Subscribers: klimek, cfe-commits

Differential Revision: https://reviews.llvm.org/D36148

llvm-svn: 310070
2017-08-04 17:07:15 +00:00
..
AffectedRangeManager.cpp Added Fixer implementation and fix() interface in clang-format for removing redundant code. 2016-04-25 15:09:22 +00:00
AffectedRangeManager.h removed redundant '#' 2016-04-28 07:52:06 +00:00
BreakableToken.cpp [clang-format] Put '/**' and '*/' on own lines in multiline jsdocs 2017-07-20 22:29:39 +00:00
BreakableToken.h [clang-format] Put '/**' and '*/' on own lines in multiline jsdocs 2017-07-20 22:29:39 +00:00
CMakeLists.txt [clang-format] Support sorting using declarations 2017-06-21 12:03:12 +00:00
ContinuationIndenter.cpp [clang-format] Fix indent of 'key <...>' and 'key {...}' in text protos 2017-08-03 14:17:29 +00:00
ContinuationIndenter.h [clang-format] Refactor WhitespaceManager and friends 2017-01-31 11:25:01 +00:00
Encoding.h [Format] Remove dead code. 2016-12-19 21:10:50 +00:00
Format.cpp [clang-format] Support text proto messages 2017-07-03 15:05:14 +00:00
FormatToken.cpp clang-format: Fix bug in handling of single-column lists. 2016-12-21 17:02:06 +00:00
FormatToken.h clang-format: [JS] no whitespace between typeof operator and l_paren. 2017-08-01 17:42:16 +00:00
FormatTokenLexer.cpp clang-format: [JS] exponentiation operator 2017-05-04 15:04:04 +00:00
FormatTokenLexer.h [clang-format] Handle NSString literals by merging tokens. 2017-04-11 09:55:00 +00:00
NamespaceEndCommentsFixer.cpp [clang-format] Fix a clang-tidy warning, NFC 2017-06-27 14:07:45 +00:00
NamespaceEndCommentsFixer.h [clang-format] Add a NamespaceEndCommentsFixer 2017-02-27 13:28:36 +00:00
SortJavaScriptImports.cpp clang-format: [JS] support default imports. 2017-08-01 15:54:43 +00:00
SortJavaScriptImports.h clang-format: [JS] sort ES6 imports. 2016-05-20 11:24:24 +00:00
TokenAnalyzer.cpp Don't copy replacements in for-range loop. NFC. 2016-10-19 13:50:17 +00:00
TokenAnalyzer.h [Format] Remove dead code. 2016-12-19 21:10:50 +00:00
TokenAnnotator.cpp clang-format: [JS] no whitespace between typeof operator and l_paren. 2017-08-01 17:42:16 +00:00
TokenAnnotator.h [clang-format] Add a NamespaceEndCommentsFixer 2017-02-27 13:28:36 +00:00
UnwrappedLineFormatter.cpp clang-format: merge short case labels with trailing comments 2017-07-28 07:56:18 +00:00
UnwrappedLineFormatter.h [clang-format] Replace IncompleteFormat by a struct with Line 2017-04-21 14:35:20 +00:00
UnwrappedLineParser.cpp clang-format: [JS] support fields with case/switch/default labels. 2017-08-04 17:07:15 +00:00
UnwrappedLineParser.h clang-format: fix block OpeningLineIndex around preprocessor 2017-07-28 07:56:14 +00:00
UsingDeclarationsSorter.cpp [clang-format] Support sorting using declarations 2017-06-21 12:03:12 +00:00
UsingDeclarationsSorter.h [clang-format] Support sorting using declarations 2017-06-21 12:03:12 +00:00
WhitespaceManager.cpp [clang-format] Fix alignment of preprocessor trailing comments 2017-06-07 14:05:06 +00:00
WhitespaceManager.h [clang-format] Document the StartOfTokenColumn parameter, NFC 2017-06-13 14:58:55 +00:00