#
83709086 |
| 18-Feb-2015 |
Daniel Jasper <djasper@google.com> |
clang-format: [JS] Support classes.
This adds support for JavaScript class definitions (again following TypeScript & AtScript style). This only required support for visibility modifiers in JS, every
clang-format: [JS] Support classes.
This adds support for JavaScript class definitions (again following TypeScript & AtScript style). This only required support for visibility modifiers in JS, everything else was already working.
Patch by Martin Probst, thank you.
llvm-svn: 229701
show more ...
|
#
b10bdff3 |
| 18-Feb-2015 |
Daniel Jasper <djasper@google.com> |
clang-format: [JS] Support type annotations.
This patch adds support for type annotations that follow TypeScript's, Flow's, and AtScript's syntax style.
Patch by Martin Probst, thank you. Review: h
clang-format: [JS] Support type annotations.
This patch adds support for type annotations that follow TypeScript's, Flow's, and AtScript's syntax style.
Patch by Martin Probst, thank you. Review: http://reviews.llvm.org/D7721
llvm-svn: 229700
show more ...
|
Revision tags: llvmorg-3.6.0-rc3, llvmorg-3.6.0-rc2, llvmorg-3.6.0-rc1, llvmorg-3.5.1, llvmorg-3.5.1-rc2 |
|
#
0580ff0e |
| 17-Dec-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: Fix incorrect calculation of token lenghts.
This led, e.g. to break JavaScript regex literals too early.
llvm-svn: 224419
|
#
11a0ac66 |
| 12-Dec-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: Revamp nested block formatting.
This fixed llvm.org/PR21804 and hopefully a few other strange cases.
Before: if (blah_blah(whatever, whatever, [] { doo_dah(); doo_dah(
clang-format: Revamp nested block formatting.
This fixed llvm.org/PR21804 and hopefully a few other strange cases.
Before: if (blah_blah(whatever, whatever, [] { doo_dah(); doo_dah(); })) { } }
After: if (blah_blah(whatever, whatever, [] { doo_dah(); doo_dah(); })) { } }
llvm-svn: 224112
show more ...
|
Revision tags: llvmorg-3.5.1-rc1 |
|
#
a4e55f4d |
| 04-Dec-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: [JS] Don't put top-level dict literals on a single line.
These are often used for enums which apparently are easier to read if formatted with one element per line.
llvm-svn: 223367
|
#
41368e9e |
| 27-Nov-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: [JS] Contract fewer functions to a single line.
Before: var someVariable = function(x) { return x.zIsTooLongForOneLineWithTheDeclarationLine(); };
After: var someVariable =
clang-format: [JS] Contract fewer functions to a single line.
Before: var someVariable = function(x) { return x.zIsTooLongForOneLineWithTheDeclarationLine(); };
After: var someVariable = function(x) { return x.zIsTooLongForOneLineWithTheDeclarationLine(); };
llvm-svn: 222893
show more ...
|
#
4087432f |
| 27-Nov-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: [JS] Try not to break in container literals.
Before: var obj = { fooooooooo: function(x) { return x.zIsTooLongForOneLineWithTheDeclarationLine(); } };
After: var obj
clang-format: [JS] Try not to break in container literals.
Before: var obj = { fooooooooo: function(x) { return x.zIsTooLongForOneLineWithTheDeclarationLine(); } };
After: var obj = { fooooooooo: function(x) { return x.zIsTooLongForOneLineWithTheDeclarationLine(); } };
llvm-svn: 222892
show more ...
|
#
79121238 |
| 27-Nov-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: [JS] new and delete are valid function names.
Before: someObject.new (); someObject.delete ();
After: someObject.new(); someObject.delete();
llvm-svn: 222890
|
#
53c38f4e |
| 27-Nov-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: [JS] Make Closure module detection more narrow.
Before: var MyLongClassName = goog.module.get('my.long.module.name.followedBy.MyLongClassName');
After: var MyLongClassName =
clang-format: [JS] Make Closure module detection more narrow.
Before: var MyLongClassName = goog.module.get('my.long.module.name.followedBy.MyLongClassName');
After: var MyLongClassName = goog.module.get('my.long.module.name.followedBy.MyLongClassName');
llvm-svn: 222888
show more ...
|
#
616de864 |
| 23-Nov-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: [JS] Support Closure's module statements.
These are like import statements and should not be line-wrapped. Minor restructuring of the handling of other import statements.
llvm-svn: 22
clang-format: [JS] Support Closure's module statements.
These are like import statements and should not be line-wrapped. Minor restructuring of the handling of other import statements.
llvm-svn: 222637
show more ...
|
#
e551bb70 |
| 05-Nov-2014 |
Daniel Jasper <djasper@google.com> |
Revert "clang-format: [js] Updates to Google's JavaScript style."
This reverts commit eefd2eaad43c5c2b17953ae7ed1e72b28e696f7b.
Apparently, this change was a bit premature.
llvm-svn: 221365
|
#
f739b0db |
| 31-Oct-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: [js] Updates to Google's JavaScript style.
The style guide is changing..
llvm-svn: 220977
|
#
49a9a283 |
| 29-Oct-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: [JS] Support more regex literals.
Previously a regex-literal containing "/*" would through clang-format off, e.g.: var regex = /\/*$/;
Would lead to none of the following code to be
clang-format: [JS] Support more regex literals.
Previously a regex-literal containing "/*" would through clang-format off, e.g.: var regex = /\/*$/;
Would lead to none of the following code to be formatted.
llvm-svn: 220860
show more ...
|
#
67f8ad25 |
| 30-Sep-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: [JS] Support AllowShortFunctionsOnASingleLine.
Specifically, this also counts for stuff like (with style "inline"): var x = function() { return 1; };
llvm-svn: 218689
|
#
1779d438 |
| 29-Sep-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: [JS] Improve formatting of function literals in chains
Before: getSomeLongPromise(.....) .then( function(value) { body(); body();
clang-format: [JS] Improve formatting of function literals in chains
Before: getSomeLongPromise(.....) .then( function(value) { body(); body(); }) .thenCatch(function(error) { body(); body(); });
After: getSomeLongPromise(.....) .then(function(value) { body(); body(); }) .thenCatch(function(error) { body(); body(); });
llvm-svn: 218595
show more ...
|
#
3549ea1a |
| 19-Sep-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: [JS] add space before operator 'in'.
Before: return ('aaa')in bbbb;
After: return ('aaa') in bbbb;
llvm-svn: 218119
|
#
23376259 |
| 09-Sep-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: [JS] Support regex literals with trailing escaped slash.
Before: var regex = / a\//; int i;
After: var regex = /a\//; int i;
This required pushing the Lexer into its wrapper cl
clang-format: [JS] Support regex literals with trailing escaped slash.
Before: var regex = / a\//; int i;
After: var regex = /a\//; int i;
This required pushing the Lexer into its wrapper class and generating a new one in this specific case. Otherwise, the sequence get lexed as a //-comment. This is hacky, but I don't know a better way (short of supporting regex literals in the Lexer).
Pushing the Lexer down seems to make all the call sites simpler.
llvm-svn: 217444
show more ...
|
#
90ebc98e |
| 05-Sep-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: [JS] Format embedded function literals more efficently.
Before: return { a: a, link: function() { f(); // }, link: function() {
clang-format: [JS] Format embedded function literals more efficently.
Before: return { a: a, link: function() { f(); // }, link: function() { f(); // } };
After: return { a: a, link: function() { f(); // }, link: function() { f(); // } };
llvm-svn: 217238
show more ...
|
#
3a038de3 |
| 05-Sep-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: [JS] JavaScript does not have the */&/&& madness.
Before: e&& e.SomeFunction();
After: e && e.SomeFunction();
Yeah, this might be useful for C++, too, but it is not such a freque
clang-format: [JS] JavaScript does not have the */&/&& madness.
Before: e&& e.SomeFunction();
After: e && e.SomeFunction();
Yeah, this might be useful for C++, too, but it is not such a frequent pattern there (plus the fix is much harder).
llvm-svn: 217237
show more ...
|
#
3f69ba10 |
| 05-Sep-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: [JS] Better support for empty function literals.
Before: SomeFunction(function(){});
After: SomeFunction(function() {});
llvm-svn: 217236
|
#
97bfb7b1 |
| 05-Sep-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: [JS] Fix indentation in dict literals.
Before: return { 'finish': // a };
After: return { 'finish': // a };
llvm-svn: 217235
|
#
4db69bd5 |
| 04-Sep-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: [JS] Support alternative operator names as identifiers.
Before: not. and . or . not_eq = 1;
After: not.and.or.not_eq = 1;
llvm-svn: 217179
|
#
8f2e94c8 |
| 04-Sep-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: [JS] Supprot "catch" as function name.
Before: someObject.catch ();
After: someObject.catch();
llvm-svn: 217158
|
#
94e11d02 |
| 04-Sep-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: [JS] Support comments in dict literals.
Before: var stuff = { // comment for update update : false, // comment for update modules : false, // c
clang-format: [JS] Support comments in dict literals.
Before: var stuff = { // comment for update update : false, // comment for update modules : false, // comment for update tasks : false };
After: var stuff = { // comment for update update : false, // comment for update modules : false, // comment for update tasks : false };
llvm-svn: 217157
show more ...
|
Revision tags: llvmorg-3.5.0, llvmorg-3.5.0-rc4, llvmorg-3.5.0-rc3, llvmorg-3.5.0-rc2, llvmorg-3.5.0-rc1 |
|
#
ad9eb0d7 |
| 30-Jun-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: [JS] support free-standing functions again.
This worked initially but was broken by r210887.
Before: function outer1(a, b) { function inner1(a, b) { return a; } inner1(a, b);
clang-format: [JS] support free-standing functions again.
This worked initially but was broken by r210887.
Before: function outer1(a, b) { function inner1(a, b) { return a; } inner1(a, b); } function outer2(a, b) { function inner2(a, b) { return a; } inner2(a, b); }
After: function outer1(a, b) { function inner1(a, b) { return a; } inner1(a, b); } function outer2(a, b) { function inner2(a, b) { return a; } inner2(a, b); }
Thanks to Adam Strzelecki for working on this.
llvm-svn: 212038
show more ...
|