History log of /llvm-project/clang/unittests/Format/FormatTestJS.cpp (Results 226 – 250 of 353)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 41a2bf74 21-Dec-2015 Daniel Jasper <djasper@google.com>

clang-format: [JS] Change Google-style default for aligning operands.

The style guide allows both, but apparently, this is the more dominant use.

llvm-svn: 256154


Revision tags: llvmorg-3.7.1, llvmorg-3.7.1-rc2
# 71e57454 20-Nov-2015 Daniel Jasper <djasper@google.com>

clang-format: [JS] Make AllowShortFunctionsOnASingle line value "Empty"
work properly.

llvm-svn: 253674


# f95b1f45 20-Nov-2015 Daniel Jasper <djasper@google.com>

clang-format: [JS] Properly add a space after "in" in for loops.

llvm-svn: 253672


# 09840efd 20-Nov-2015 Daniel Jasper <djasper@google.com>

clang-format: [JS] struct and union aren't keywords / reserved words.

llvm-svn: 253671


Revision tags: llvmorg-3.7.1-rc1
# b488a74f 29-Oct-2015 Daniel Jasper <djasper@google.com>

clang-format: [JS] Add goog.setTestOnly to the list of stuff that
is import-statement-like and shouldn't be wrapped.

llvm-svn: 251643


# 6501f7e8 27-Oct-2015 Daniel Jasper <djasper@google.com>

clang-format: Add an additional value to AlignAfterOpenBracket: AlwaysBreak.

Summary:
If this option is set, clang-format will always insert a line wrap, e.g.
before the first parameter of a functio

clang-format: Add an additional value to AlignAfterOpenBracket: AlwaysBreak.

Summary:
If this option is set, clang-format will always insert a line wrap, e.g.
before the first parameter of a function call unless all parameters fit
on the same line. This obviates the need to make a decision on the
alignment itself.

Use this style for Google's JavaScript style and add some minor tweaks
to correctly handle nested blocks etc. with it. Don't use this option
for for/while loops.

Reviewers: klimek

Subscribers: klimek, cfe-commits

Differential Revision: http://reviews.llvm.org/D14104

llvm-svn: 251405

show more ...


# 265309e3 18-Oct-2015 Daniel Jasper <djasper@google.com>

clang-format: [JS] Handle string literals spanning character classes.

If a RegExp contains a character group with a quote (/["]/), the
trailing end of it is first tokenized as a string literal, whic

clang-format: [JS] Handle string literals spanning character classes.

If a RegExp contains a character group with a quote (/["]/), the
trailing end of it is first tokenized as a string literal, which leads
to the merging code seeing an unbalanced bracket.

This change parses regex literals from the left hand side. That
simplifies the parsing code and also allows correctly handling escapes
and character classes, hopefully correctly parsing all regex literals.

Patch by Martin Probst, thank you.
Review: http://reviews.llvm.org/D13765

llvm-svn: 250648

show more ...


# 8d0e2234 12-Oct-2015 Daniel Jasper <djasper@google.com>

clang-format: [JS] handle character classes in regexes.

Slashes in regular expressions do not need to be escaped and do not
terminate the regular expression even without a preceding backslash.

Patc

clang-format: [JS] handle character classes in regexes.

Slashes in regular expressions do not need to be escaped and do not
terminate the regular expression even without a preceding backslash.

Patch by Martin Probst. Thank you.

llvm-svn: 250009

show more ...


# ba52fcb7 28-Sep-2015 Daniel Jasper <djasper@google.com>

clang-format: [JS] Support pseudo-keywords

JavaScript allows keywords to appear in IdenfierName positions, e.g.
fields, or object literal members, but not as plain identifiers.

Patch by Martin Prob

clang-format: [JS] Support pseudo-keywords

JavaScript allows keywords to appear in IdenfierName positions, e.g.
fields, or object literal members, but not as plain identifiers.

Patch by Martin Probst. Thank you!

llvm-svn: 248714

show more ...


# 9f642f7d 28-Sep-2015 Daniel Jasper <djasper@google.com>

clang-format: [JS] handle let (ES6)

Patch by Martin Probst. Thank you!

llvm-svn: 248713


Revision tags: llvmorg-3.7.0, llvmorg-3.7.0-rc4, llvmorg-3.7.0-rc3, studio-1.4, llvmorg-3.7.0-rc2, llvmorg-3.7.0-rc1
# b9a52814 10-Jul-2015 Daniel Jasper <djasper@google.com>

clang-format: [JS] Assign proper penalties when breaking a type annotation

Before:
class Test {
aaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaa:
aaaaaaaaaaaaaaaaaaaaaaaa): aaaaaaaaaa

clang-format: [JS] Assign proper penalties when breaking a type annotation

Before:
class Test {
aaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaa:
aaaaaaaaaaaaaaaaaaaaaaaa): aaaaaaaaaaaaaaaaaaaaaa {}
}

After:
class Test {
aaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaa: aaaaaaaaaaaaaaaaaaaaaaaa):
aaaaaaaaaaaaaaaaaaaaaa {}
}

llvm-svn: 241908

show more ...


# 5c235c09 06-Jul-2015 Daniel Jasper <djasper@google.com>

clang-format: [JS] Properly reset parse state after parsing interface.

llvm-svn: 241446


# b2328b1e 06-Jul-2015 Daniel Jasper <djasper@google.com>

clang-format: [JS] Prevent confusing TypeScript parameters wraps.

Before:
aaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaa: aaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaa:
aaaaaaaaaaaaaaaaaa): aaaaa

clang-format: [JS] Prevent confusing TypeScript parameters wraps.

Before:
aaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaa: aaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaa:
aaaaaaaaaaaaaaaaaa): aaaaaaaaaaaaaaaaaaaaaa {}

After:
aaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaa: aaaaaaaaaaaaaaaaaa,
aaaaaaaaaaaaaaaa: aaaaaaaaaaaaaaaaaa):
aaaaaaaaaaaaaaaaaaaaaa {}

llvm-svn: 241444

show more ...


# 5a3de1d0 03-Jul-2015 Daniel Jasper <djasper@google.com>

clang-format: [JS] Allow line breaks after TypeScript type colons.

llvm-svn: 241339


# f144620c 02-Jul-2015 Daniel Jasper <djasper@google.com>

clang-format: [JS] Treat regex literals like string literals.

Using the token type "unknown" can interfere badly with
WhitespaceManager's way of handling multiline comments.

llvm-svn: 241273


# f7372152 02-Jul-2015 Daniel Jasper <djasper@google.com>

clang-format: [JS] Skip comments when applying the regex-literal heuristic

llvm-svn: 241264


# 55c384e0 02-Jul-2015 Daniel Jasper <djasper@google.com>

clang-format: [JS] Fix bug in regex literal parsing.

The lexer wasn't properly reset leading to unexpected deletions.

llvm-svn: 241262


# c553ae13 02-Jul-2015 Daniel Jasper <djasper@google.com>

clang-format: [JS] Support regex literals at the start of a file.

llvm-svn: 241259


# 553a5b00 02-Jul-2015 Daniel Jasper <djasper@google.com>

clang-format: [JS] Fix character counting in template strings.

Some counts were off, we don't need to take the leading newlines of the
first ` into account and some tests were just wrong.

llvm-svn:

clang-format: [JS] Fix character counting in template strings.

Some counts were off, we don't need to take the leading newlines of the
first ` into account and some tests were just wrong.

llvm-svn: 241257

show more ...


Revision tags: llvmorg-3.6.2
# 6b8d26c2 24-Jun-2015 Daniel Jasper <djasper@google.com>

clang-format: [JS] Support regex literals containing quotes (' and ").

llvm-svn: 240548


Revision tags: llvmorg-3.6.2-rc1
# ab9db510 22-Jun-2015 Alexander Kornienko <alexfh@google.com>

Revert r240270 ("Fixed/added namespace ending comments using clang-tidy").

llvm-svn: 240353


# 3d9d929e 22-Jun-2015 Alexander Kornienko <alexfh@google.com>

Fixed/added namespace ending comments using clang-tidy. NFC

The patch is generated using this command:

$ tools/extra/clang-tidy/tool/run-clang-tidy.py -fix \
-checks=-*,llvm-namespace-comme

Fixed/added namespace ending comments using clang-tidy. NFC

The patch is generated using this command:

$ tools/extra/clang-tidy/tool/run-clang-tidy.py -fix \
-checks=-*,llvm-namespace-comment -header-filter='llvm/.*|clang/.*' \
work/llvm/tools/clang

To reduce churn, not touching namespaces spanning less than 10 lines.

llvm-svn: 240270

show more ...


# ed3f3957 18-Jun-2015 Daniel Jasper <djasper@google.com>

clang-format: [JS] Add a special case for indenting function literals.

Before:
var func =
function() {
doSomething();
};

After:
var func =
function() {
doSomething

clang-format: [JS] Add a special case for indenting function literals.

Before:
var func =
function() {
doSomething();
};

After:
var func =
function() {
doSomething();
};

This is a very narrow special case which fixes most of the discrepency
with what our users do. In the long run, we should try to come up with
a more generic fix for indenting these.

llvm-svn: 240014

show more ...


# e6fcf7d3 17-Jun-2015 Daniel Jasper <djasper@google.com>

clang-format: clang-format (NFC)

llvm-svn: 239903


# 9f4ec152 17-Jun-2015 Daniel Jasper <djasper@google.com>

clang-format: [JS] Don't put top-level typescript enums on a single line.

This makes this consistent with non-typescript enums.

Also shuffle the language-dependent stuff in mustBreakBefore to a
sin

clang-format: [JS] Don't put top-level typescript enums on a single line.

This makes this consistent with non-typescript enums.

Also shuffle the language-dependent stuff in mustBreakBefore to a
single location.

Patch initiated by Martin Probst.

llvm-svn: 239894

show more ...


12345678910>>...15