diff options
| author | Li Jin <dragon-fly@qq.com> | 2023-01-30 11:26:08 +0800 |
|---|---|---|
| committer | Li Jin <dragon-fly@qq.com> | 2023-01-30 11:26:08 +0800 |
| commit | 5fa51d49705e25d284c4adb16edb625d85e0c601 (patch) | |
| tree | 1cf2cd74e4dca88d19124627ea34c421cf3c176c /src | |
| parent | 0d5ead2f203557e454409f43fb24cf2a850cdb88 (diff) | |
| download | yuescript-0.15.25.tar.gz yuescript-0.15.25.tar.bz2 yuescript-0.15.25.zip | |
fix a build warning.v0.15.25
Diffstat (limited to 'src')
| -rw-r--r-- | src/yuescript/parser.hpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/yuescript/parser.hpp b/src/yuescript/parser.hpp index 5a0afa8..83682ae 100644 --- a/src/yuescript/parser.hpp +++ b/src/yuescript/parser.hpp | |||
| @@ -207,16 +207,6 @@ public: | |||
| 207 | */ | 207 | */ |
| 208 | rule(const expr& e); | 208 | rule(const expr& e); |
| 209 | 209 | ||
| 210 | #ifndef NDEBUG | ||
| 211 | |||
| 212 | /** constructor from a expression name. | ||
| 213 | @param name name of expression. | ||
| 214 | */ | ||
| 215 | struct initTag { }; | ||
| 216 | rule(const char* name, initTag); | ||
| 217 | |||
| 218 | #endif // NDEBUG | ||
| 219 | |||
| 220 | /** constructor from rule. | 210 | /** constructor from rule. |
| 221 | @param r rule. | 211 | @param r rule. |
| 222 | */ | 212 | */ |
| @@ -271,6 +261,17 @@ public: | |||
| 271 | 261 | ||
| 272 | rule& operator=(const expr&); | 262 | rule& operator=(const expr&); |
| 273 | 263 | ||
| 264 | #ifndef NDEBUG | ||
| 265 | |||
| 266 | /** constructor from a expression name. | ||
| 267 | @param name name of expression. | ||
| 268 | */ | ||
| 269 | struct initTag { }; | ||
| 270 | rule(const char* name, initTag); | ||
| 271 | const char* get_name() const { return m_name; } | ||
| 272 | |||
| 273 | #endif // NDEBUG | ||
| 274 | |||
| 274 | private: | 275 | private: |
| 275 | // mode | 276 | // mode |
| 276 | enum _MODE { | 277 | enum _MODE { |
