aboutsummaryrefslogtreecommitdiff
path: root/MoonParser/moon_parser.h
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2019-10-29 11:25:27 +0800
committerLi Jin <dragon-fly@qq.com>2019-10-29 11:25:27 +0800
commit975167856ed0b11c2ede03c6eb750ca4e4a6a7fc (patch)
treefa4369fe7e7d49c63cae93d6c5b52b78116f58cd /MoonParser/moon_parser.h
parent726fee3152c81fdac7e3ad5f663bfbea8f99ddd8 (diff)
downloadyuescript-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.h6
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"
10using namespace parserlib; 10using namespace parserlib;
11 11
12namespace MoonP {
13
12struct State { 14struct 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