|
1 | 1 | #include "prism/util/pm_char.h" |
2 | 2 |
|
3 | | -#define PRISM_CHAR_BIT_WHITESPACE (1 << 0) |
4 | | -#define PRISM_CHAR_BIT_INLINE_WHITESPACE (1 << 1) |
5 | 3 | #define PRISM_CHAR_BIT_REGEXP_OPTION (1 << 2) |
6 | 4 |
|
7 | 5 | #define PRISM_NUMBER_BIT_BINARY_DIGIT (1 << 0) |
|
13 | 11 | #define PRISM_NUMBER_BIT_HEXADECIMAL_DIGIT (1 << 6) |
14 | 12 | #define PRISM_NUMBER_BIT_HEXADECIMAL_NUMBER (1 << 7) |
15 | 13 |
|
16 | | -static const uint8_t pm_byte_table[256] = { |
| 14 | +const uint8_t pm_byte_table[256] = { |
17 | 15 | // 0 1 2 3 4 5 6 7 8 9 A B C D E F |
18 | 16 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 3, 3, 3, 0, 0, // 0x |
19 | 17 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x |
@@ -126,21 +124,6 @@ pm_char_is_char_kind(const uint8_t b, uint8_t kind) { |
126 | 124 | return (pm_byte_table[b] & kind) != 0; |
127 | 125 | } |
128 | 126 |
|
129 | | -/** |
130 | | - * Returns true if the given character is a whitespace character. |
131 | | - */ |
132 | | -bool |
133 | | -pm_char_is_whitespace(const uint8_t b) { |
134 | | - return pm_char_is_char_kind(b, PRISM_CHAR_BIT_WHITESPACE); |
135 | | -} |
136 | | - |
137 | | -/** |
138 | | - * Returns true if the given character is an inline whitespace character. |
139 | | - */ |
140 | | -bool |
141 | | -pm_char_is_inline_whitespace(const uint8_t b) { |
142 | | - return pm_char_is_char_kind(b, PRISM_CHAR_BIT_INLINE_WHITESPACE); |
143 | | -} |
144 | 127 |
|
145 | 128 | /** |
146 | 129 | * Scan through the string and return the number of characters at the start of |
|
0 commit comments