Files
weaseljson/src/tables.h
2025-05-18 17:23:22 -04:00

19 lines
413 B
C++

#pragma once
constexpr inline struct Tables {
constexpr Tables() {
whitespace[' '] = true;
whitespace['\n'] = true;
whitespace['\r'] = true;
whitespace['\t'] = true;
invalidUtf8[0xc0] = true;
invalidUtf8[0xc1] = true;
for (int i = 0xf5; i <= 0xff; ++i) {
invalidUtf8[i] = true;
}
}
alignas(16) bool whitespace[256]{};
alignas(16) bool invalidUtf8[256]{};
} tables;