diff options
| author | Li Jin <dragon-fly@qq.com> | 2019-10-29 11:25:27 +0800 |
|---|---|---|
| committer | Li Jin <dragon-fly@qq.com> | 2019-10-29 11:25:27 +0800 |
| commit | 975167856ed0b11c2ede03c6eb750ca4e4a6a7fc (patch) | |
| tree | fa4369fe7e7d49c63cae93d6c5b52b78116f58cd /MoonParser/moon_parser.h | |
| parent | 726fee3152c81fdac7e3ad5f663bfbea8f99ddd8 (diff) | |
| download | yuescript-975167856ed0b11c2ede03c6eb750ca4e4a6a7fc.tar.gz yuescript-975167856ed0b11c2ede03c6eb750ca4e4a6a7fc.tar.bz2 yuescript-975167856ed0b11c2ede03c6eb750ca4e4a6a7fc.zip | |
complete moon compiler in C++.
Diffstat (limited to 'MoonParser/moon_parser.h')
| -rw-r--r-- | MoonParser/moon_parser.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/MoonParser/moon_parser.h b/MoonParser/moon_parser.h index 0c45538..07380cc 100644 --- a/MoonParser/moon_parser.h +++ b/MoonParser/moon_parser.h | |||
| @@ -6,9 +6,11 @@ | |||
| 6 | #include <stack> | 6 | #include <stack> |
| 7 | #include <algorithm> | 7 | #include <algorithm> |
| 8 | #include <vector> | 8 | #include <vector> |
| 9 | #include "parserlib.hpp" | 9 | #include "ast.hpp" |
| 10 | using namespace parserlib; | 10 | using namespace parserlib; |
| 11 | 11 | ||
| 12 | namespace MoonP { | ||
| 13 | |||
| 12 | struct State { | 14 | struct State { |
| 13 | State() { | 15 | State() { |
| 14 | indents.push(0); | 16 | indents.push(0); |
| @@ -21,3 +23,5 @@ struct State { | |||
| 21 | static std::unordered_set<std::string> luaKeywords; | 23 | static std::unordered_set<std::string> luaKeywords; |
| 22 | static std::unordered_set<std::string> keywords; | 24 | static std::unordered_set<std::string> keywords; |
| 23 | }; | 25 | }; |
| 26 | |||
| 27 | } // namespace MoonP | ||
