Re: [PATCH] D21273: clang-format: [JS] Introduce WrapJavaScriptImports option.

2016-06-13 Thread Martin Probst via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL272558: clang-format: [JS] Introduce JavaScriptWrapImports option. (authored by mprobst). Changed prior to commit: http://reviews.llvm.org/D21273?vs=60532=60552#toc Repository: rL LLVM

Re: [PATCH] D21273: clang-format: [JS] Introduce WrapJavaScriptImports option.

2016-06-13 Thread Daniel Jasper via cfe-commits
djasper accepted this revision. djasper added a comment. This revision is now accepted and ready to land. Looks good. http://reviews.llvm.org/D21273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D21273: clang-format: [JS] Introduce WrapJavaScriptImports option.

2016-06-13 Thread Martin Probst via cfe-commits
mprobst updated this revision to Diff 60532. mprobst added a comment. - classify as LT_ImportStatement, re-enable wrapping later - no early exist in TokenAnnotator: while loop is required for consumeToken(). http://reviews.llvm.org/D21273 Files: include/clang/Format/Format.h

Re: [PATCH] D21273: clang-format: [JS] Introduce WrapJavaScriptImports option.

2016-06-13 Thread Daniel Jasper via cfe-commits
djasper added inline comments. Comment at: lib/Format/TokenAnnotator.cpp:789 @@ -788,3 +788,3 @@ if (Style.Language == FormatStyle::LK_JavaScript && -CurrentToken->is(Keywords.kw_import)) +CurrentToken->is(Keywords.kw_import) && !Style.JavaScriptWrapImports)

Re: [PATCH] D21273: clang-format: [JS] Introduce WrapJavaScriptImports option.

2016-06-13 Thread Martin Probst via cfe-commits
mprobst updated this revision to Diff 60519. mprobst added a comment. - rename to JavaScriptWrapImports - re-alphabetize options list http://reviews.llvm.org/D21273 Files: include/clang/Format/Format.h lib/Format/Format.cpp lib/Format/TokenAnnotator.cpp

Re: [PATCH] D21273: clang-format: [JS] Introduce WrapJavaScriptImports option.

2016-06-13 Thread Daniel Jasper via cfe-commits
djasper added inline comments. Comment at: include/clang/Format/Format.h:631 @@ +630,3 @@ + /// \brief Whether to wrap JavaScript import/export statements. + bool WrapJavaScriptImports; + Wondering whether we should call this JavaScriptWrapImports so that the

[PATCH] D21273: clang-format: [JS] Introduce WrapJavaScriptImports option.

2016-06-12 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. When turned on, clang-format wraps JavaScript imports (and importing exports), instead of forcing the entire import statement onto one line.