Re: [PATCH] D17385: clang-format: [JS] single quote double quoted strings.

2016-02-26 Thread Martin Probst via cfe-commits
mprobst updated this revision to Diff 49214. mprobst added a comment. - Move code closer together by piping Replacements into the FormatTokenLexer. - remove sstream import - * Treat JavaScript single quoted string literals as tok::string_literal, not http://reviews.llvm.org/D17385 Files: incl

Re: [PATCH] D17385: clang-format: [JS] single quote double quoted strings.

2016-02-26 Thread Daniel Jasper via cfe-commits
djasper added a comment. Sounds like a good plan. Should also mention the corresponding style guide reference in the commit message: https://google.github.io/styleguide/javascriptguide.xml?showone=Strings#Strings http://reviews.llvm.org/D17385 ___

Re: [PATCH] D17385: clang-format: [JS] single quote double quoted strings.

2016-02-26 Thread Martin Probst via cfe-commits
> > Nice, the behavior now seems nicely isolated. Is this a purely stylistic > kind of change or do you think every JS developer working on any kind of > codebase will want it? Generally this feels like something we should > carefully enable with a dedicated style option. Where can I find more > in

Re: [PATCH] D17385: clang-format: [JS] single quote double quoted strings.

2016-02-26 Thread Daniel Jasper via cfe-commits
djasper added a comment. Nice, the behavior now seems nicely isolated. Is this a purely stylistic kind of change or do you think every JS developer working on any kind of codebase will want it? Generally this feels like something we should carefully enable with a dedicated style option. Where c

Re: [PATCH] D17385: clang-format: [JS] single quote double quoted strings.

2016-02-24 Thread Martin Probst via cfe-commits
mprobst updated this revision to Diff 48946. mprobst marked an inline comment as done. mprobst added a comment. - Move code closer together by piping Replacements into the FormatTokenLexer. - remove sstream import http://reviews.llvm.org/D17385 Files: lib/Format/Format.cpp unittests/Format/

Re: [PATCH] D17385: clang-format: [JS] single quote double quoted strings.

2016-02-24 Thread Martin Probst via cfe-commits
mprobst marked an inline comment as done. Comment at: lib/Format/Format.cpp:1579 @@ +1578,3 @@ + // The width of the extra \ escapes is taken into account in getNextToken. + void requoteJSStringLiterals(tooling::Replacements &Replaces, + FormatToken

Re: [PATCH] D17385: clang-format: [JS] single quote double quoted strings.

2016-02-24 Thread Martin Probst via cfe-commits
mprobst updated this revision to Diff 48945. mprobst marked an inline comment as done. mprobst added a comment. - Move code closer together by piping Replacements into the FormatTokenLexer. http://reviews.llvm.org/D17385 Files: lib/Format/Format.cpp unittests/Format/FormatTestJS.cpp Index:

Re: [PATCH] D17385: clang-format: [JS] single quote double quoted strings.

2016-02-24 Thread Daniel Jasper via cfe-commits
djasper added inline comments. Comment at: lib/Format/Format.cpp:1579 @@ +1578,3 @@ + // The width of the extra \ escapes is taken into account in getNextToken. + void requoteJSStringLiterals(tooling::Replacements &Replaces, + FormatToken *Current)

Re: [PATCH] D17385: clang-format: [JS] single quote double quoted strings.

2016-02-18 Thread Martin Probst via cfe-commits
mprobst updated this revision to Diff 48338. mprobst added a comment. Fixed typo. http://reviews.llvm.org/D17385 Files: lib/Format/Format.cpp unittests/Format/FormatTestJS.cpp Index: unittests/Format/FormatTestJS.cpp === --- u

[PATCH] D17385: clang-format: [JS] single quote double quoted strings.

2016-02-18 Thread Martin Probst via cfe-commits
mprobst created this revision. mprobst added a reviewer: djasper. mprobst added a subscriber: cfe-commits. Herald added a subscriber: klimek. http://reviews.llvm.org/D17385 Files: lib/Format/Format.cpp unittests/Format/FormatTestJS.cpp Index: unittests/Format/FormatTestJS.cpp ===