This commit is contained in:
BLUELOVETH 2023-06-04 17:01:12 +08:00
parent 6ffcbce647
commit 671cbc3f24

View File

@ -8,7 +8,11 @@
int main(int argc, char** argv){
pkpy::VM* vm = pkpy_new_vm();
vm->bind_builtin_func<0>("input", [](pkpy::VM* vm, pkpy::ArgsView args){
return VAR(pkpy::getline());
// TODO: we do not use pkpy::getline() here. It doesn't accept unicode characters.
// pkpy::getline() has bugs for PIPE input
static std::string buffer;
std::cin >> buffer;
return VAR(buffer);
});
if(argc == 1){
pkpy::REPL* repl = pkpy_new_repl(vm);