diff options
Diffstat (limited to 'src/MoonP/parser.hpp')
-rw-r--r-- | src/MoonP/parser.hpp | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/src/MoonP/parser.hpp b/src/MoonP/parser.hpp index 01d1050..14abe1a 100644 --- a/src/MoonP/parser.hpp +++ b/src/MoonP/parser.hpp | |||
@@ -28,17 +28,6 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | |||
28 | 28 | ||
29 | namespace parserlib { | 29 | namespace parserlib { |
30 | 30 | ||
31 | // const str hash helper functions | ||
32 | inline constexpr size_t hash(char const* input) { | ||
33 | return *input ? *input + 33ull * hash(input + 1) : 5381; | ||
34 | } | ||
35 | inline size_t hash(const char* input, int size, int index) { | ||
36 | return index < size ? input[index] + 33ull * hash(input, size, index + 1) : 5381; | ||
37 | } | ||
38 | inline size_t constexpr operator"" _id(const char* s, size_t) { | ||
39 | return hash(s); | ||
40 | } | ||
41 | |||
42 | ///type of the parser's input. | 31 | ///type of the parser's input. |
43 | typedef std::basic_string<wchar_t> input; | 32 | typedef std::basic_string<wchar_t> input; |
44 | typedef input::iterator input_it; | 33 | typedef input::iterator input_it; |