diff options
Diffstat (limited to 'MoonParser/parser.hpp')
-rw-r--r-- | MoonParser/parser.hpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/MoonParser/parser.hpp b/MoonParser/parser.hpp index a84b9a3..cbf0168 100644 --- a/MoonParser/parser.hpp +++ b/MoonParser/parser.hpp | |||
@@ -1,5 +1,4 @@ | |||
1 | #ifndef PARSER_HPP | 1 | #pragma once |
2 | #define PARSER_HPP | ||
3 | 2 | ||
4 | 3 | ||
5 | //gcc chokes without rule::rule(const rule &), | 4 | //gcc chokes without rule::rule(const rule &), |
@@ -16,6 +15,8 @@ | |||
16 | #include <codecvt> | 15 | #include <codecvt> |
17 | #include <locale> | 16 | #include <locale> |
18 | 17 | ||
18 | namespace parserlib { | ||
19 | |||
19 | // const str hash helper functions | 20 | // const str hash helper functions |
20 | inline constexpr size_t hash(char const* input) | 21 | inline constexpr size_t hash(char const* input) |
21 | { | 22 | { |
@@ -35,9 +36,6 @@ typedef std::basic_string<wchar_t> input; | |||
35 | typedef input::iterator input_it; | 36 | typedef input::iterator input_it; |
36 | typedef std::wstring_convert<std::codecvt_utf8<input::value_type>> Converter; | 37 | typedef std::wstring_convert<std::codecvt_utf8<input::value_type>> Converter; |
37 | 38 | ||
38 | namespace parserlib { | ||
39 | |||
40 | |||
41 | class _private; | 39 | class _private; |
42 | class _expr; | 40 | class _expr; |
43 | class _context; | 41 | class _context; |
@@ -66,7 +64,7 @@ public: | |||
66 | int m_col; | 64 | int m_col; |
67 | 65 | ||
68 | ///null constructor. | 66 | ///null constructor. |
69 | pos() {} | 67 | pos():m_line(-1),m_col(0) {} |
70 | 68 | ||
71 | /** constructor from input. | 69 | /** constructor from input. |
72 | @param i input. | 70 | @param i input. |
@@ -425,6 +423,3 @@ template <class T> T &operator << (T &stream, const input_range &ir) { | |||
425 | 423 | ||
426 | 424 | ||
427 | } //namespace parserlib | 425 | } //namespace parserlib |
428 | |||
429 | |||
430 | #endif //PARSER_HPP | ||