diff options
| author | Li Jin <dragon-fly@qq.com> | 2020-01-10 16:30:34 +0800 |
|---|---|---|
| committer | Li Jin <dragon-fly@qq.com> | 2020-01-10 16:30:34 +0800 |
| commit | 52a6536103f46c26a3ba9b149b0fe7b40d524d8c (patch) | |
| tree | 67e4759f8e1ea922079d0e162d84ecba5e558261 /MoonParser/moonc.cpp | |
| parent | 975167856ed0b11c2ede03c6eb750ca4e4a6a7fc (diff) | |
| download | yuescript-52a6536103f46c26a3ba9b149b0fe7b40d524d8c.tar.gz yuescript-52a6536103f46c26a3ba9b149b0fe7b40d524d8c.tar.bz2 yuescript-52a6536103f46c26a3ba9b149b0fe7b40d524d8c.zip | |
update.
Diffstat (limited to '')
| -rw-r--r-- | MoonParser/moonc.cpp | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/MoonParser/moonc.cpp b/MoonParser/moonc.cpp deleted file mode 100644 index 1a383fe..0000000 --- a/MoonParser/moonc.cpp +++ /dev/null | |||
| @@ -1,21 +0,0 @@ | |||
| 1 | #include <iostream> | ||
| 2 | #include "moon_compiler.h" | ||
| 3 | |||
| 4 | int main() | ||
| 5 | { | ||
| 6 | std::string s = R"TestCodesHere( | ||
| 7 | print nil + 1 | ||
| 8 | )TestCodesHere"; | ||
| 9 | std::list<MoonP::GlobalVar> globals; | ||
| 10 | auto result = MoonP::moonCompile(s, globals, true, false); | ||
| 11 | if (!result.first.empty()) { | ||
| 12 | std::cout << result.first << '\n'; | ||
| 13 | } else { | ||
| 14 | std::cout << result.second << '\n'; | ||
| 15 | } | ||
| 16 | std::cout << "globals:\n"; | ||
| 17 | for (const auto& var : globals) { | ||
| 18 | std::cout << var.name << '\n'; | ||
| 19 | } | ||
| 20 | return 0; | ||
| 21 | } | ||
