| 83 | static constexpr uint8_t kCharMask = static_cast<uint8_t>((8 * sizeof(FilterType)) - 1); |
| 84 | |
| 85 | FilterType MakeFilter(const ParseOptions& options) { |
| 86 | FilterType filter = 0; |
| 87 | auto add_char = [&](char c) { filter |= CharFilter(c); }; |
| 88 | add_char('\n'); |
| 89 | add_char('\r'); |
| 90 | add_char(options.delimiter); |
| 91 | if (options.escaping) { |
| 92 | add_char(options.escape_char); |
| 93 | } |
| 94 | if (options.quoting) { |
| 95 | add_char(options.quote_char); |
| 96 | } |
| 97 | return filter; |
| 98 | } |
| 99 | |
| 100 | // A given character value will set/test one bit in the 64-bit filter, |
| 101 | // whose bit number is taken from low bits of the character value. |
nothing calls this directly
no outgoing calls
no test coverage detected