Open liudonghua123 opened 2 years ago
Thanks for filing this. Not sure what is causing it as I can't replicate it myself locally on Linux.
I assume you got this by globally activating the repl package using something like: dart pub global activate --source path D:\temp\repl>drepl
?
In which case I would expect you to have run into #12 which I also need to fix.
I'll try to look into this more soon.
I installed it via dart pub global activate repl
. And it failed with some errors https://github.com/maks/dart_repl/issues/8, then I modified the local code in C:\Users\Liu.D.H\AppData\Local\Pub\Cache\hosted\pub.flutter-io.cn\repl-0.1.0\lib\parser.dart
then run dart pub global activate repl
again.
I also found an interesting project on https://github.com/hetu-script/hetu-script#command-line-tool. The hetu
works well. But it is not using pure dart syntax.
Ah ok, thanks for letting me know, that makes sense now, you edited the local pub cache files.
I'd suggest editing local cache files is not the best approach though, I'd rather suggest use your local clone of this repo, edit it and use eg. the --source
for testing doing a global activate
from it.
In regards to Hetu, yes I've come across it before, its very impressive, but if you are interested in a scripting implementation use Dart syntax then you probably want to look at dart_eval though its not feature complete by any means yet.
After I installed this package, I just run
var a=123;
andprint(a)
, then it crashed.