Commit c4e0dd74 authored by Simon Zünd's avatar Simon Zünd Committed by Commit Bot

[cleanup] Re-enable clang-format for BuildAsciiCharFlags

With the added parenthesis from a previous CL, clang-format does a
decent job of formatting the nested ternary operator statement.

R=leszeks@chromium.org

Change-Id: If2f5db766b6234a44f771c167f9831adda5dbd43
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1762301
Auto-Submit: Simon Zünd <szuend@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63308}
parent ea42cf70
......@@ -81,14 +81,14 @@ enum AsciiCharFlags {
kIsWhiteSpaceOrLineTerminator = 1 << 3
};
constexpr uint8_t BuildAsciiCharFlags(uc32 c) {
// clang-format off
return
((IsAsciiIdentifier(c) || c == '\\') ? (
kIsIdentifierPart | (!IsDecimalDigit(c) ? kIsIdentifierStart : 0)) : 0) |
((c == ' ' || c == '\t' || c == '\v' || c == '\f') ?
kIsWhiteSpace | kIsWhiteSpaceOrLineTerminator : 0) |
((c == '\r' || c == '\n') ? kIsWhiteSpaceOrLineTerminator : 0);
// clang-format on
return ((IsAsciiIdentifier(c) || c == '\\')
? (kIsIdentifierPart |
(!IsDecimalDigit(c) ? kIsIdentifierStart : 0))
: 0) |
((c == ' ' || c == '\t' || c == '\v' || c == '\f')
? kIsWhiteSpace | kIsWhiteSpaceOrLineTerminator
: 0) |
((c == '\r' || c == '\n') ? kIsWhiteSpaceOrLineTerminator : 0);
}
const constexpr uint8_t kAsciiCharFlags[128] = {
#define BUILD_CHAR_FLAGS(N) BuildAsciiCharFlags(N),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment