Start organizing code
This commit is contained in:
18
src/tables.h
Normal file
18
src/tables.h
Normal file
@@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
|
||||
constexpr inline struct Tables {
|
||||
constexpr Tables() {
|
||||
whitespace[' '] = true;
|
||||
whitespace['\n'] = true;
|
||||
whitespace['\r'] = true;
|
||||
whitespace['\t'] = true;
|
||||
for (int i = 0; i < 10; ++i) {
|
||||
number['0' + i] = true;
|
||||
}
|
||||
number['.'] = true;
|
||||
number['+'] = true;
|
||||
number['-'] = true;
|
||||
}
|
||||
alignas(16) bool whitespace[256]{};
|
||||
alignas(16) bool number[256]{};
|
||||
} tables;
|
||||
Reference in New Issue
Block a user