diff options
author | Martin Probst <martin@probst.io> | 2017-07-03 15:31:28 +0000 |
---|---|---|
committer | Martin Probst <martin@probst.io> | 2017-07-03 15:31:28 +0000 |
commit | 063721498032b28ccb1bc0a4cb257882317113bb (patch) | |
tree | dd777ea3b9bb9810b8dbf3dbf848e2d7bc7afc79 /lib/Format | |
parent | 650ea04ef9a1eaa5513713a2cda0b980512aa7b5 (diff) |
Revert "clang-format: [JS] space between pseudo keywords and template literals."
This reverts commit 71d3b5cd916106005ef23467e3f6c7fbca7bc499.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307034 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Format')
-rw-r--r-- | lib/Format/TokenAnnotator.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/Format/TokenAnnotator.cpp b/lib/Format/TokenAnnotator.cpp index 888b6b6745..a7250cf169 100644 --- a/lib/Format/TokenAnnotator.cpp +++ b/lib/Format/TokenAnnotator.cpp @@ -2319,11 +2319,7 @@ bool TokenAnnotator::spaceRequiredBefore(const AnnotatedLine &Line, if ((Left.is(TT_TemplateString) && Left.TokenText.endswith("${")) || (Right.is(TT_TemplateString) && Right.TokenText.startswith("}"))) return false; - // In tagged template literals ("html`bar baz`"), there is no space between - // the tag identifier and the template string. getIdentifierInfo makes sure - // that the identifier is not a pseudo keyword like `yield`, either. - if (Left.is(tok::identifier) && Left.Tok.getIdentifierInfo() == nullptr && - Right.is(TT_TemplateString)) + if (Left.is(tok::identifier) && Right.is(TT_TemplateString)) return false; if (Right.is(tok::star) && Left.isOneOf(Keywords.kw_function, Keywords.kw_yield)) |