drepl
                                
                                 drepl copied to clipboard
                                
                                    drepl copied to clipboard
                            
                            
                            
                        Error parsing
I just quickly wanted to find the smallest file in a directory with this code:
D> size_t minSize = size_t.max; string minName = "invalid"; foreach (file; dirEntries(getcwd, SpanMode.breadth)) {
 | if (file.isFile && file.size < minSize) {
 | minSize = file.size;
 | minName = cast(string) file;
 | }
 | } writefln("%s with %s bytes", minName, minSize);
It didn't even try to run that code and just said "Error parsing", however it is valid D code because running it using rdmd --eval worked
It doesn't support multi statement evaluation atm. A REPL needs to perform some transformations to support declaring variables, thus we first need to classify the input into expression (returned from function), statement (evaluated in function), declaration (evaluated at module level). That parsing is done using libdparse and still has some gotchas atm.