diff options
author | Li Jin <dragon-fly@qq.com> | 2020-03-29 02:43:37 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2020-03-29 02:43:37 +0800 |
commit | 13c5e230e0fb1e64ddd0e4cd348aac2bd291bdb9 (patch) | |
tree | 12a30ab5b8d1aaa722f805ba2f4afa404c6e2030 | |
parent | 7abafe80f96c4a4cdcfb7711e451c938c17a60b7 (diff) | |
download | yuescript-13c5e230e0fb1e64ddd0e4cd348aac2bd291bdb9.tar.gz yuescript-13c5e230e0fb1e64ddd0e4cd348aac2bd291bdb9.tar.bz2 yuescript-13c5e230e0fb1e64ddd0e4cd348aac2bd291bdb9.zip |
change input method for moonp -- option.
-rw-r--r-- | src/moonp.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/moonp.cpp b/src/moonp.cpp index 795e6d2..ca5265f 100644 --- a/src/moonp.cpp +++ b/src/moonp.cpp | |||
@@ -233,10 +233,10 @@ int main(int narg, const char** args) { | |||
233 | std::cout << help; | 233 | std::cout << help; |
234 | return 1; | 234 | return 1; |
235 | } | 235 | } |
236 | char ch; | ||
236 | std::string codes; | 237 | std::string codes; |
237 | linenoise::SetMultiLine(false); | 238 | while ((ch = std::cin.get()) != EOF) { |
238 | for (std::string line; !linenoise::Readline("", line);) { | 239 | codes += ch; |
239 | codes += line; | ||
240 | } | 240 | } |
241 | MoonP::MoonConfig conf; | 241 | MoonP::MoonConfig conf; |
242 | conf.implicitReturnRoot = true; | 242 | conf.implicitReturnRoot = true; |